A step-by-step guide to building a simple chess AI (2017)
Let』s explore some basic concepts that will help us create a simple chess AI:
- board evaluation
- and alpha beta pruning.
At each step, we』ll improve our algorithm with one of these time-tested chess-programming techniques. I』ll demonstrate how each affects the algorithm』s playing style.
You can view the final AI algorithm here on GitHub .
Step 1: Move generation and board visualization
We』ll use the chess.js library for move generation, and chessboard.js for visualizing the board. The move generation library basically implements all the rules of chess. Based on this, we can calculate all legal moves for a given board state.
原文 : Hacker News