You move as with pawns in chess! You win by eliminating all the enemy's pieces, preventing the enemy from making a legitimate move or bringing a pawn to the enemy's front line
This is an adaptaion of Martin Gardner's Hexapawn Game, a simple example of machine learning.
The AI will learn from it's mistakes and does not make a move again which led to a loss.
After losing 11 times the AI's game becomes close to perfect making it harder for the player to score a win.