Skip to content

Simple Chess AI in JS using minimax with alpha-beta pruning. Final Project for the course Computer Science (Algorithms) 20602.

Notifications You must be signed in to change notification settings

nzhang98/js-minimax-chessai

Repository files navigation

Minimax with AlphaBeta Pruning for Chess

Simple Chess AI using minimax with alpha-beta pruning implemented in Javascript; with rudimentary move-ordering and transposition table.

Installation

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

Usage

Once installed locally, one may play against the chess engine by running npm start and accessing http://127.0.0.1:8080

Structure

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.

Credits and Resources

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.

About

Simple Chess AI in JS using minimax with alpha-beta pruning. Final Project for the course Computer Science (Algorithms) 20602.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages