A Chess AI and Engine that runs entirely client-side with no backend or external dependencies.
You can test it yourself right here.
After I've done a Sudoku bot, I've decided I wanted a bigger challenge in the same area, so I started developing this idea. This project was built as a learning exercise in chess engine design and search optimization, which took around a month and a half, but there's still a lot I would love to add, and experiment.
I used Javascript for the whole thing, creating classes for the engine, the renderer, the AI, and some other small stuff. This project uses a bunch of techniques to optimize performance like bitboards, zobrist hashes, etc... most of these were added after I completed the first stage of the project.
In the first stage I had made a fully working engine and AI, but it was too slow, so I tried remaking it for optimization, that's when I found the bitboards, and the zobrist hashes. The stage two, didn't go very well, it was faster but the AI was worse, so I remade it again for a final time. This new version, stage three, is now capable of doing evaluating roughly 11k nodes per second, this allowed for a much faster and possibly deeper AI.
- Bitboards
- Zobrist hashing
- Negamax with alpha–beta pruning
- Transposition Tables
- Quiescence Search
- Late Move Reductions
- Killer & History Heuristics
- Delta & Futility Pruning
- Game Phases
- Null-move Pruning
- Static Exchange Evaluation
- Razoring
- Iterative Deepening
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Distributed under the MIT License. See LICENSE for more information.
🔗 Project Link: github.com/dig0w/JavaScript-Chess-AI