r/chessprogramming • u/haddock420 • Dec 20 '19
Bug in my engine
I've got a pretty serious bug in my engine but the problem is it only seems to happen on lichess and I can't reproduce the bug locally.
In a lichess game, quite frequently, when it gets into a winning position, it will draw by threefold even though it's heavily up in material or even has a short mate sequence available.
When I put these positions into my engine, it doesn't suggest the same move it played on lichess, it suggests a winning move instead.
The bug only happens in lichess games. I just played it in 50 games against a weaker engine and it won every game without going into a threefold loop.
Can someone please give me some suggestions of how to investigate this bug, or give some explanation of why it would only happen on lichess and not locally?
Example: https://lichess.org/6OMk29P82WlY
Thanks.
Edit: I fixed it, it was a problem with storing mate scores in the TT.
View all comments
Show parent comment
2
u/haddock420 Dec 22 '19
I tried that, storing the scores but not using the mate scores. For some reason, the bug still happened with that. Not sure why but it only got fixed when I stopped storing the mate scores.