Friday, 18 May 2018

An easy chess engine example

If you are interested in how chess engines work (and can read/understand Javascript). then 'A step-by-step guide to building a simple chess AI' might be worth a read. It is a simple explanation/tutorial about how chess engines are coded.
It  mainly looks at the evaluation and search functions, using the existing chess.js library for move generation and validation. As it is a very basic implementation, it is missing a few things that makes a chess program really strong. There is no quiescence search (a search extension which follows capture sequences beyond the specified search depth), no transposition table, and no move ordering.
However, if you are interested in tinkering with a chess program, the source is free and downloadable from the above links, and if you are feeling energetic, you can probably add those features yourself.

No comments: