Fri, 26 Dec 2008

SRV-1 Blackfin now plays chess !

Okay ... this is a bit off-the-wall, but I came across a very nice chess engine called TSCP - Tom Kerrigan's Simple Chess Program, and couldn't resist the exercise of porting it to the SRV-1 Blackfin camera board.

TSCP isn't going to take down any chess grandmasters, but this is a pretty good engine, and it fits into slightly more than 3kB of code space. The code is currently loaded into SDRAM rather than L1 cache, but it could run 4x faster just by changing the srv1.x load table. There is a set of book openings, "book.txt", but to incorporate them, we had to add some firmware commands to read and write other flash sectors to store the data. At the moment, the book functions aren't generating random openings, but we should have that fixed soon.

This is what the program looks like when invoked using the 'C' command via a terminal connection:

Besides being an interesting exercise in porting new functions to the SRV-1, part of the concept was that someone might eventually want to add vision processing functions to actually recognize chess piece positions on a board and even a manipulator to move the pieces. If anyone went to that much trouble, they might want a stronger chess engine or an adaptive engine that learned, but TSCP is certainly a good starting point.

Discussion of this latest version of firmware, along with download links, is found here.

Posted Fri, 26 Dec 2008 18:47 | HTML Link | see additional stories ...