Cool project. You could also use the front-end of GNU chess to save some lines, and implement only a back-end.
Bug report:
a b c d e f g h
8 r n b q k b n r 8
7 . . p p p p p p 7
6 . p . . . . . . 6
5 p . . . . . . . 5
4 P . . P P . . . 4
3 . . . . . . . . 3
2 . P P . . P P P 2
1 R N B Q K B N R 1
a b c d e f g h
move: b2b3
ai: b6b4
The pawn is not permitted to move two fields after it has already beeen moved once before: b6b4 isn't a valid move after b7b6. (First moving two fields, and then one would have been okay, in contrast.)
Thanks for pointing it out! I will try to patch it.
Appreciate you taking the time to test it.