repetition: Revert detect 3-fold repetition during searching follow Stockfish

And change to tscp181c-like

Because:

Stockfish-like Vs tscp181c-like
played 9000

12 men without fly
11.45% : 86.55% : 1.99%
12.93% : 86.12% : 0.94%
= 48.79% : 49.74%

9 men with fly
26.16% : 37.62% : 36.21%
28.59% : 38.09% : 33.31%
= 32.13% : 33.11%
This commit is contained in:
Calcitem 2021-01-14 00:42:54 +08:00
parent effab83b44
commit cf2db5c6b5
1 changed files with 11 additions and 1 deletions

View File

@ -211,7 +211,7 @@ Value search(Position *pos, Sanmill::Stack<Position> &ss, Depth depth, Depth ori
}
}
#ifdef THREEFOLD_REPETITION
#ifdef THREEFOLD_REPETITION_TEST
// Check if we have an upcoming move which draws by repetition, or
// if the opponent had an alternative move earlier to this position.
if (/* alpha < VALUE_DRAW && */
@ -329,6 +329,16 @@ Value search(Position *pos, Sanmill::Stack<Position> &ss, Depth depth, Depth ori
return bestValue;
}
#ifdef THREEFOLD_REPETITION
// if this isn't the root of the search tree (where we have
// to pick a move and can't simply return VALUE_DRAW) then check to
// see if the position is a repeat. if so, we can assume that
// this line is a draw and return VALUE_DRAW.
if (depth != originDepth && pos->has_repeated(ss)) {
return VALUE_DRAW;
}
#endif // THREEFOLD_REPETITION
MovePicker mp(*pos);
Move nextMove = mp.next_move();
const int moveCount = mp.move_count();