Wednesday, October 19, 2011

Fixing a severe time control bug

In a recent game iCE 0.2 played against cheng in Chess Wars Division G my engine lost on time. The position was lost anyway with cheng being 2 pawns up but as a fellow programmer once stated "time losses are a bad thing" this was somehow embarrassing.

I used the log and it showed that the problem hits when the game is close to the next time control and the search score drops suddenly quite a lot. If the search score drops iCE desperately allocates more time for the move to maybe find a way out of the mess when searching a bit longer. And in some cases it allocated more additional time than it had until the next time control (therefore losing on time).

This is rather severe and also a bit embarrassing so although I already closed the iCE 0.2 development branch I decided to reopen it and fixing the bug there, not waiting for the release of iCE 0.3 somewhere next year.

So a new version of iCE 0.2 (with build number 1092) is available at my homepage where the bug is fixed. Whether it has a big impact on the playing strength I don't know but I assume not, because it caused mainly losses in games that were lost anyway.

One interesting observation yet

In order to test the new release I let the fixed iCE 0.2 play 250 games against the most recent iCE 0.3 beta (also with fixed TC) using a 40 moves in 1 minute time control setting and it shows that the new book feature of iCE 0.3 helps the engine more than I thought (at least when using short TCs).

   Engine       Score   
1: iCE 0.3    146,5/250 
2: iCE 0.2    103,5/250