Fifty move counter and Null move
Posted: Wed Aug 09, 2017 4:57 pm
Hi!
Senpai and Fruit set the fifty move counter = 0 before null move and copy from history after null move.
So not detecting draw.
Stockfish and Sungorus increase the fifty move counter by 1 before null move and decrease after null move.
Which one is correct?
I think stockfish and sungorus good, but then "Senpai" is wrong?
Apropo: I do not see this in many engines.
-Tamas
Senpai and Fruit set the fifty move counter = 0 before null move and copy from history after null move.
Code: Select all
void move_null() {
//..........
p_copy.moves = 0; // HACK: conversion
//..........
}
Code: Select all
for (int i = 4; i < p_copy.moves; i += 2) {
if (p_stack[p_sp - i].copy.key == key) {
return true;
}
}
Code: Select all
void Position::do_null_move(StateInfo& newSt) {
//..........
++st->rule50;
//...........
}
Code: Select all
for (int i = 2, e = std::min(st->rule50, st->pliesFromNull); i <= e; i += 2)
{
stp = stp->previous->previous;
if (stp->key == st->key)
return true; // Draw at first repetition
}
Which one is correct?
I think stockfish and sungorus good, but then "Senpai" is wrong?
Apropo: I do not see this in many engines.
-Tamas