Skip to content

dig0w/JavaScript-Chess-AI

Repository files navigation


JavaScript Chess AI

A Chess AI and Engine that runs entirely client-side with no backend or external dependencies.

You can test it yourself right here.

Index
  1. About The Project
  2. Techniques Used
  3. Possible Future Work
  4. Contributing
  5. License

About The Project

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.

(back to top)

Techniques Used

  • Bitboards
  • Zobrist hashing
  • Negamax with alpha–beta pruning
  • Transposition Tables
  • Quiescence Search
  • Late Move Reductions
  • Killer & History Heuristics
  • Delta & Futility Pruning

(back to top)

Possible Future Work

  • Game Phases
  • Null-move Pruning
  • Static Exchange Evaluation
  • Razoring
  • Iterative Deepening

(back to top)

Contributing

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".

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

🔗 Project Link: github.com/dig0w/JavaScript-Chess-AI

About

A Chess AI and Engine that runs entirely client-side with no backend or external dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published