Thursday, March 09, 2017

Scratch Chess

My personal project "Chess"... no, not the IBM 1980/81 one! :-)

I implemented this ply4 minimax / alpha-beta pruning / move ordering chess game using Scratch, MIT's programming environment for children. Now one could consider Scratch not really a suited platform for such an untertaking, given its built-in performance throttle, and the fact it does not support local variables, return values or changing parameter values (quite a constraint for recursions). But it was exactly that challenge that kept me trying. Also I noticed that while there were some really good chess engines in Scratch, but they missed an easy-to-use UI. And vice versa.

I didn't know too much about chess programming, so the resources at turned out really helpful The outcome was well-received by the chess community on Scratch. And I gained enough experience to work on a .NET port next. I think ply8 should be possible there on commodity hardware.

I also provided a Scratch Chess tutorial (in German) for the CoderDojo Linz programming club.