syzygy1 / Cfish

C port of Stockfish
GNU General Public License v3.0
137 stars 59 forks source link

Polyglot opening book played a draw #77

Open jjoshua2 opened 6 years ago

jjoshua2 commented 6 years ago

It would be good to at least have not option to not allow book to play a draw. Polyglot doesn't know what move history is or even move number, only position, so its possible for it to sometimes be a draw. I had a 14 move draw moving bishop between c1 and g5 one to many times when Knight attacked it. I would rather be dropped out of book than get a draw in book as white. Thanks!

MichaelB7 commented 6 years ago

Make a new book. It’s not the engine fault.

jjoshua2 commented 6 years ago

That is possible, but it works in asmfish. See what they do:

if BestBookMove = true
   if length(movelist) > 1
       filter out moves from movelist that lead to repetitions
       filter out moves from movelist without highest weight
   end if
else
   filter out moves from movelist that lead to repetitions
end if

I'm not sure how to fix it because the best move is to put your bishop back if Knight attacks it, and if knight doesn't attack it's best to keep your bishop out. So ideally you try it and see if he does that, and then if he does you bring bishop back and try something else. But its not possible to do this with only polyglot. And there is no other good spot for bishop besides brining back, so any filtering would have to look at several moves in advance... Since polyglot does not know move number or history its not a good place to solve this problem...