Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 1.56 KB

README.md

File metadata and controls

18 lines (10 loc) · 1.56 KB

aima-checkers

NPM version GitHub Actions status

This is a formulation of the checkers game in the formal paradigm presented in Artificial Intelligence - A Modern Approach (AIMA) by Stuart Russell and Peter Norvig. This module can be used in combination with the search algorithms from aima-coffee, specifically the minimaxDecision and the alphaBetaSearch algorithms.

Rules

There are several versions of checkers out there and I have not attempted to systematize them.

These are the rules of this implementation:

You win the game if your opponent cannot do any moves and you have more pieces than them. In each round, you can move one of your checkers forward to a neighbouring empty black square. If this square is occupied by your opponent but the next square in this direction is free, then you can jump to the free square whilst your opponent will lose their checker. After a jump, you can perform another jump in the same round. If you reach the last row with a checker, it will be crowned and from the next round you can also move and jump backwards with it. When a checker jumps over a crowned checker, it will take over the crown. The same rules apply to both players. The player with the brown checkers starts.

Graphical implementation