Monday, December 7, 2015

Opening Book Struggle



In Ed Schroders YAT tournament iCE experienced an unexpected program termination, which is the euphemistic way of saying it damn crashed. First I though it might be related to my implementation of the permanent brain protocol which contains a known bug in version 2  release 2240. But it wasn't.

iCE did crash while playing book moves in the Two knights defence, which is an opening that I know to a certain extent as I recently taught my sons the Lolli Attack lines (which I prefer over the Fried Liver attack). At the 11th move the only book move (100%) was the en passent capture 11... exd3 and here it crashed.

Problem was that the book was build for version 0.3 of iCE and never changed. However I did change the internal structure how iCE stores chess moves later on. The bit positions that indicate an en passent capture and those that indicate a promotion were changed. Now the move that iCE finds in the book has an invalid structure if it is an en passent capture or promotion. Fortunately promotions are not so common in the opening but ep captures seem at least to be common enough to show up.

So I have to change my book building code and rebuild the books to fix that which is not a quick fix. I have to live with the problem for the YAT tournament and hope that iCE will not chose a lot of erroneous lines.

But fixing the book code made it at the top of my todo list. I'm happy to have learned about this problem before I release version 3 of iCE which I intend to do early next year.

No comments:

Post a Comment