Skip to content

AI for Hexapawn (Reinforcement)

Perfect playlearned from scratch

Challenge

Build an AI that masters a board game without any pre-programmed strategy.

Solution

Python game engine plus reinforcement learning: the AI records winning states and prunes losing branches over many games.

Impact

Reached perfect play. Scaled the board size and generated the full game tree for instant win-state calculation.

PythonReinforcement learning
View code (opens in a new tab)