Exploring Minimax

I’ve been playing around with the GNU Chess code trying to understand the minimax algorithm and its alpha-beta pruning. The pruning offers a chance for a huge optimization if you can immediately refute candidate moves. Unforunately, refuting a move often requires finding the best response, which means searching the whole subtree, which defeats the purpose of the optimization. So implementers typically guess at the best refutations with checks, captures and moves that scored well in other subtrees (a.k.a. “killer” moves). My tinkering didn’t have any real impact on performance, but I’m getting a better idea about how things work.

Anyway, in the process of exploring the code, I noticed some of the output was being duplicated. I’ve posted a new version to chessbox.org with the minor bug fixes.

Leave a Reply