]> git.sesse.net Git - stockfish/commit
Fix divide by zero bug in late game
authorMatthew Sullivan <mattsullivan14916@gmail.com>
Fri, 25 Oct 2013 16:22:43 +0000 (11:22 -0500)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 27 Oct 2013 07:03:58 +0000 (08:03 +0100)
commitd454cd42166d71789e8c5a4d099a0c3d96ab517e
tree1b61bd9bd3f7e208ad158c1261838dfd177d940e
parent48f38f3092626f0dfef3728568ad5d85ca6c2f92
Fix divide by zero bug in late game

If the game got late enough that move_importance(currentPly) * slowMover / 100
rounds to 0, then we ended up dividing 0 by 0 when only looking 1 move ahead.

This apparently caused the search to almost immediately abort and Stockfish
would blunder in long games. So convert thisMoveImportance to a double.

No functional change.
src/timeman.cpp