mjlef wrote:
Yes, it is simple, but lacking castling and en-passant, which are some of the harder parts for beginners to get right. Any chance of adding those to make it a complete example?
Mark
DanaSah is an engine that is based on FirstChess.
Now, DanaSah has an ELO around 2500 points and is using the generator moves of FirstChess and IsInCheck. I seem to remember that the generator move had some minor bug in promotions. The board of FirstChess is an array of 64 elements, it does not use any trick as mailbox, 0x88 or bitboards.
I added the ability to castling and ep in the code. FirstChess not available quisce and therefore has no generator of captures, which also had to do. FirstChess not check repetition of moves and the rule of 50 moves.
I make FirstChess to do play and I realized as in the move number 4 was left one-piece, FirstChess evaluates only the material, but that is no reason to lose a piece.
Human - Program
1.e4 Na6
2.d4 Rb8
3.Nf3 Ra8
4.Bxa6 Rb8
Best,
Pedro