Created a chess AI from scratch using p5.js. Used the minimax algorithm with alpha beta pruning for move evaluation. Can play pretty well at an amatuer level. This has got a ply depth of 4. Also created a game with ply depth of 7 : https://github.com/sa7890722/Chess-AI-Improved Need to make some changes to the readme. some more changes. making some more changes. adding some changes here. change another change is coming up now. making another change here.
1: Download the zip file and extract it.
2: Run a local server on your system by typing the command in the terminal :
- Go to a web browser and enter the url :
- Go to the extracted file.
- Go to the AI Game folder.
- The game is displayed on the screen.
- To receive instructios regarding the game open the Console in Inspect Elemnt by using right click.
You can only play the game as the Black player.
1: picked : It means that the chess piece has been picked and now you must choose a valid location to place it.
(all of the valid locations are displayed in the console).
2: placed : It means that the piece that was picked has now been placed and now you are ready to pic another piece.
3: pick again : It means that some incorrect action has been done and you now need to repick the piece.
4: Game Over : It means that the game is over and the side which won is displayed thereafter.
5: Move is OK : If it was your turn to move and you moved.
6: Move is not OK : If it is not your turn to move.
Always be attentive because the game does not tell whether you are in check or not and it immediately captures the king if possible.