Closed UlisseMini closed 3 years ago
It does seem weird though that it runs out of time since once it gets low it should be running a very small depth. Maybe there is a bug I've overlooked.
I found the bug, it was an infinite loop in get_pv()
when a transposition occurs. Fixed with a HashSet.
Reopening, time management is not fixed, though I did fix the deadlock. We still use too much time in iterative deepening.
This is going to be the mother of all refactors, I've got to implement threading to do this right, and rust ownership being what it is, well...
Since we don't exit the search immediately in
alphabeta
, thethinking_time
argument will almost always be exceeded. This can be fixed two waysEngine.thinking_time
calculationquit
function throughalphabeta
and quit immediately. Be careful that you passquit
the rightSearchResult
though.