Skip to content

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.

Notifications You must be signed in to change notification settings

sa7890722/Chess-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

Chess-AI

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.

How to run the AI game :

1: Download the zip file and extract it.
2: Run a local server on your system by typing the command in the terminal :

python -m SimpleHTTPServer

  1. Go to a web browser and enter the url :

localhost:8000

  1. Go to the extracted file.
  2. Go to the AI Game folder.
  3. The game is displayed on the screen.
  4. To receive instructios regarding the game open the Console in Inspect Elemnt by using right click.

Types of instructions :

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.

Be aware :

Always be attentive because the game does not tell whether you are in check or not and it immediately captures the king if possible.

git_2

"Enjoy playing"

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published