You could add this resource to Wiki. Very simple source code for beginners.
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?
You could add this resource to Wiki. Very simple source code for beginners.
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.
pedrox wrote:DanaSah is an engine that is based on FirstChess.
DanaSah comments, functions and variables names are not in English...
True, in DanaSah the comments and the majority of functions and variables are in spanish.
I might add if it is interesting code to firstchess in english (bad english) the things necessary for the generator moves make castling and ep.
Another of the things that the generator moves not advance the pawns 2 squares.
I would recommend for beginners study the code FirstChess as it is, then once understood, consider for example the code TSCP. TSCP make castling and ep and the code is easy to implement in FirstChess.