This is a GUI based checkers game. Additionaly it has an Artificial Intelligence based playing agent you can play against.
To get this project up and running on your local machine, all you need to do is clone or download this project, and complie this in any java compiler.
JavaFx liberaries are required to run the GUI based features.
-
As soon as the game starts, the user is asked to choose a mode to continue playing. There are three modes available viz a viz AI vs AI, AI vs Human, Human vs Human.
- From the drop down if the user chooses the AI vs Human mode then the user is again given 5 options to choose the difficulty.
- If the game mode chosen is AI vs AI. The user is required to click anywhere on the screen to make the artificial agents play the next moves.
-
In order to make a human move, the user clicks on his respective pieces. Upon clicking the piece the possible moves applicable on the piece are reflected on the board in the form of pink circles.
- Upon clicking on the pink circles, the respective piece moves to the new location.
- The rules of the game suggest that if a player in one of his chances can capture the other players piece, then he must do that. However, if there are multiple pieces in capturing position the player is free to choose any one of them. So, in such a situation the pink circles only show up for the pieces that are in a capturing position and if the user clicks on another piece, he is given the given below persistent notification. Note that a similar notification shows up if the players tries to move a piece that is blocked by the opponents or one of his own pieces.
- The game GUI also features a score board at the bottom of the screen which shows the scores of the two players and the color of the player who plays next.
- Upon completion of the game, a dialogue is shown which tells the name of the winner.
The game uses MiniMax algorithm with alpha beta pruning for the artificial agents. The game rules which have been implemented are given here
- JavaFx - Used for a the GUI.
I am open to contributions. Contact me on Facebook for any queries.
- Prateek Mishra
See also the list of contributors who participated in the project.
- I am thankful to Dr. Rahul Kala (My AI instructor) for giving me this project and teaching me the basics of Artificial Intelligence.