I get a lot of "3-fold repetition" endings.
What are ways to prevent this?
I was thinking of:
Code: Select all
int global_extension = 0;
for(move in moves) {
doMove()
score = search(a, b, depth + global_extension);
if (score > alpha) {
if (move repeats)
global_extension = 1;
...
remember move
update alpha, beta-cut-off, etc
}
}
Another approach could be:
Code: Select all
for(...) {
if (score >= alpha) { // notice the >= instead of >
if (!move_repeats && score == alpha)
continue;
...
remember move
update alpha, beta-cut-off, etc
}
}
What do you think?
