DAPReinforcement Learning

AlphaZero Checkers

A checkers AI trained through reinforcement learning and self-play, combining a residual neural network with Monte Carlo Tree Search to choose its moves.

About the Project

AlphaZero Checkers is a checkers-playing AI inspired by AlphaZero. The model was trained through reinforcement learning, learning strategies by repeatedly playing against itself rather than relying on recorded human matches or hand-crafted strategies.

The deployed web application uses a fixed, pretrained version of the resulting model. Games played by users do not retrain or modify it.

Rationale

We created the project to understand how self-play can be used to train game-playing artificial intelligence. We began by experimenting with simpler games such as tic-tac-toe before progressing to the larger state space and more complex decisions involved in checkers.

Reinforcement Learning

During training, Monte Carlo Tree Search (MCTS) explored possible moves with guidance from a neural network. Each self-play game generated training examples using the board positions encountered, the moves explored by MCTS, and the final result.

A dual-head residual neural network was trained to predict:

  • which moves were most promising from a given position; and
  • the expected outcome of the game.

Newly trained versions were evaluated against the previous best model. A candidate was retained only when it demonstrated stronger performance, allowing the agent to improve over successive training iterations.

From Model to Web App

After training, we integrated the selected model checkpoint into an interactive web application. Players can challenge the AI at different difficulty levels, which adjust how extensively it searches for its next move.

In an evaluation against a random-move opponent, the selected model won 97 out of 100 games, indicating that it had learnt consistent checkers strategies during training.

Project Satisfaction

5/5. We progressed from being unable to train a successful tic-tac-toe agent to developing a model that consistently learns checkers strategies. Successfully completing the full self-play, training, and evaluation pipeline made the project especially rewarding.

Key Takeaway

Choosing the right architecture early matters. A plain neural network was not expressive enough for the complexity of checkers, and we would have benefited from exploring a deeper residual architecture sooner.