This is the game of hexapawn, against an AI. The rules are simple: each player starts with 3 pawns. Like in chess, a pawn can move forwards or take an enemy pawn in a diagonal. The goal is to get one of your pawns to the other side, take all of the opponent's pawns or block them.
This AI is a very simple one, each board positions it will know all the possible moves. It will then play randomly. The catch is, every time it loses, it takes out it's last move from the possibilities, never making the same mistake twice. This is part of the AI games series, go check them out with the rest of my games: https://scratch.mit.edu/studios/31156643