HEXAPAWN

The game that learns to play itself.

Invented by Martin Gardner.
Programmed by Nathan Boehm.




How to Play:

White (you) goes first. You can move a pawn forward one space to an empty tile, or diagonally forward one space to capture an enemy pawn.
There are 3 ways to win:
-Move a pawn to the opposite end of the board.
-Capture all enemy pawns.
-Achieve a position in which your opponent cannot move.

You are playing against a machine comprising of 24 matchmoxes, each with a game state printed on it and each containing colored beads.
Every time you move, the matchbox indicating the current game state is found, and a random bead is taken out.
The AI moves following the arrow of whatever color bead is taken.
Every time you win, the bead that caused the AI to lose is taken out of its matchbox.

At first, the AI starts by making random moves that most likely cause it to lose. But over time, it learns from its mistakes, and eventually becomes a perfect player.

Make Your Own:



You will need:
24 Matchboxes
Red, Green, Blue, and Yellow Beads (14 of Each)
Scissors & Glue

Included in the download is a folder of 14 additional (and optional) matchboxes.
Hexapawn is a symetrical game, and therefore, most matchboxes correspond an equal, mirrored gamestate to save on materials and training time.
These optional matchboxes allow you to train the AI with every possible gamestate, seperate from their mirrored counterparts.
In practice, this means it will take longer for the AI to achieve perfect play.

Interestingly, this game really only needs 19 matchboxes to work properly.
5 of the 24 matchboxes in Martin Gardner's original publication are mirrored versions of existing matchboxes.
They have been preserved here to maintain the exact training experience of Martin Gardner's version.


2 boxes for turn 2:


11 boxes for turn 4:


11 boxes for turn 6: