Simple Chess AI using minimax with alpha-beta pruning implemented in Javascript; with rudimentary move-ordering and transposition table.
Requires nodejs/npm.
The chess engine may be installed locally as follows:
git clone https://github.com/FreeTheOtter/js-minimax-chessai.git
cd js-minimax-chessai
npm install
Once installed locally, one may play against the chess engine by running npm start
and accessing http://127.0.0.1:8080
The main script is under src/
.
It contains both the engine part and the board visualization and actual game state handling.
index.html
and style.css
for the GUI.
composer.json
and index.php
are for hosting on Heroku.
Nick Zhang ([email protected])
Makes use of:
- Chessboardjs for board visualization.
- Chessjs, a Javascript chess library that handles chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection.
Chess Programming Wiki is an incredible resource for both theory, ideas, applications and pseudocode for chess engines.
Minimax:
Wikipedia
Chess Programming Wiki
Alphabeta:
Wikipedia
Chess Programming Wiki
Final Project for the course Computer Science (Algorithms) - 20602, with professors C.Feinauer and F.Pittorino.