All Projects → zeyu2001 → Chess Ai

zeyu2001 / Chess Ai

Licence: mit
Simple chess AI in Javascript. Uses the chess.js and chessboard.js libraries.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Chess Ai

Colamone js
A two-player strategy board game /オリジナルのボードゲームを作ってみる。
Stars: ✭ 13 (-88.5%)
Mutual labels:  chess
Download
UI mod for Dota 2 Auto Chess that adds several QoL improvements to the UI
Stars: ✭ 65 (-42.48%)
Mutual labels:  chess
Arasan Chess
Arasan chess engine
Stars: ✭ 75 (-33.63%)
Mutual labels:  chess
Countergo
UCI chess engine (golang)
Stars: ✭ 32 (-71.68%)
Mutual labels:  chess
Galvanise zero
Learning from zero (mostly based off of AlphaZero) in General Game Playing.
Stars: ✭ 60 (-46.9%)
Mutual labels:  chess
Lichs
♟ Play chess against real players in your terminal using Lichess
Stars: ✭ 70 (-38.05%)
Mutual labels:  chess
Ancientbeast
Turn Based Strategy Game. Master your beasts! 🐺
Stars: ✭ 907 (+702.65%)
Mutual labels:  chess
Python Chess
A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication
Stars: ✭ 1,341 (+1086.73%)
Mutual labels:  chess
Chessli
A free and open source chess improvement app that combines the power of Lichess and Anki.
Stars: ✭ 64 (-43.36%)
Mutual labels:  chess
Stockfish
Integrates the Stockfish chess engine with Python
Stars: ✭ 75 (-33.63%)
Mutual labels:  chess
Sunfish rs
Rust rewrite of the sunfish simple chess engine
Stars: ✭ 41 (-63.72%)
Mutual labels:  chess
Lichobile
lichess.org mobile application
Stars: ✭ 1,043 (+823.01%)
Mutual labels:  chess
React Chessground
React wrapper of Chessground
Stars: ✭ 71 (-37.17%)
Mutual labels:  chess
Cc65 Chess
Portable chess game in C. Commodore 64, Apple 2, Atari, Oric, Commander X16, curses terminal, etc.
Stars: ✭ 21 (-81.42%)
Mutual labels:  chess
Allie
Allie: A UCI compliant chess engine
Stars: ✭ 89 (-21.24%)
Mutual labels:  chess
Game Server
Distributed Java game server, including cluster management server, gateway server, hall server, game logic server, background monitoring server and a running web version of fishing. State machine, behavior tree, A* pathfinding, navigation mesh and other AI tools
Stars: ✭ 916 (+710.62%)
Mutual labels:  chess
Pgn2gif
A small tool that generates gif of a chess game
Stars: ✭ 65 (-42.48%)
Mutual labels:  chess
Vue Chessboard
Chessboard vue component to load positions, create positions and see threats
Stars: ✭ 109 (-3.54%)
Mutual labels:  chess
Chess Inspector
Visualize move, protection and threat status
Stars: ✭ 94 (-16.81%)
Mutual labels:  chess
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞
Stars: ✭ 10,315 (+9028.32%)
Mutual labels:  chess

chess-ai

A chess engine by someone who doesn't know how to play chess.

About

chess-ai is a simple chess AI in JavaScript.

The primary concern of chess-ai is the decision-making part of the application. All functionality outside the scope of the AI are implemented using external libraries:

  • Chessboard GUI: Using the chessboard.js API
  • Game Mechanics: Using the chess.js API

The AI uses the minimax algorithm, which is optimised by alpha-beta pruning.

The evaluation function uses piece square tables adapted from Sunfish.py, and eliminates the need for nested loops by updating the sum based on each move instead of re-computing the sum of individual pieces at each leaf node.

A global sum is used to keep track of black's evaluation score after each move, which is used to display the 'advantage' bar.

How to Play?

  1. Head over to https://zeyu2001.github.io/chess-ai/.

  2. Play as white by dragging a piece to your desired location. The AI plays as black. The AI's minimax search depth (which is directly related to how well it will play) can be customised using the 'Search Depth (Black)' dropdown. Using a higher value will improve the AI's accuracy, but it will take longer to decide on the next move.

  3. To pit the AI against itself, click the 'Start Game' button under Computer vs. Computer. You can stop the game at any time using the 'Stop and Reset' button.

License

Use of this project is governed by the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].