AI based checkers game-bot
The game of checkers is considered a complicated game with possible legal positions in the English draughts version (
board) alone (much more on higher dimensions). In this attempt to create a game agent, a tree traversal approach has been used. This approach is not only fast but also efficient given that good heuristics are used. The agent has been created which is capable of playing the game of draughts or checkers with a remarkable win rate against average players. Draughts is a 1vs1 zero-sum game. Minimax or Minimax algorithm is best suited for such types of games. Following is the development procedure practised during the development of the project.
![]() | ![]() |
![]() | ![]() |
Two types of evaluation functions have been used depending upon the state of the game. These are mid evaluation and end game evaluation function. Following is the report for the same.
List all the evaluation functions:
Where and
are the player’s and opponent’s pawns and
and
are the player’s and Opponent’s Kings respectively.
Where and
are the player’s and Opponent’s Pawns in their own respective halves and
and
are their Pawns in their respective enemies halves.
and
are the player’s and Opponent’s Kings respectively.
Where and
is the player’s and Opponent’s Pawns and
and
are the player’s and Opponent’s Kings respectively.
,
are the row number of the respective piece.
Where and
is the player’s and Opponent’s Pawns in their own respective halves and
and
are their Pawns in their respective enemies’ halves.
and
are the player’s and Opponent’s Kings respectively.
is the number of pieces on the board.
= Distance of ith king of the player from jth King of the adversary.
where is total number of kings of the player in the board and
is total number of kings of the adversary in the board.
Minimise if player has more number of pieces than adversary else maximise.
= Distance of ith King of player from jth King of the enemy.
where is total number of kings of the player in the board and
is total number of kings of the adversary in the board.
Minimise if player has more number of pieces than adversary else maximise.
First install Requirements
pip3 install -r requirements.txt
python3 main.py
You can tweak the parameters of the game bot from main file
Found a bug? Create an issue.