Monday, October 20, 2008

Some chess ramblings

I am spending some free time rewriting the first generation of my UCI chess engine BikJump into the second generation by replacing the "mailbox" representation with a home-brewed bitboard representation, while carefully revisiting all other parts of the engine as well. The switch to bitboards has improved search speed substantially. In a typical middle game position, the nodes-per-second rating of the search increased from around 500Kns to close to 2000Kns on a Intel Core 2 Quad Q6700 2.66GHz (single-threaded 64-bit binary).

Interesting enough, the strength increase is still disappointing given the major rewrite. Therefore, I am now performing experiments with tournaments and test positions to find more opportunities to enhance its strength.

I like this test position (white to move wins), which I found on TalkChess, one of my favorite forums on chess (thanks to Chess Imager for generating the diagram).





This is an anti "null move" position. The old BikJump, which tries a null move after full move generation only when sufficient moves are possible, found the forced mate very quickly. The new BikJump performs the null move prior to full move generation to enhance searching speed. As a result, however, the mate is no longer found in reasonable time (just like many strong chess engines fail to find it quickly). Common wisdom is that the second approach is better, since the position above is unlikely to occur in real games. It leaves me somewhat weary though. Would a strong human chess player find the mate quickly? And if so, do current chess engines, which beat the strongest players but struggle on positions like this, truly pass the Turing test? Opinions?