This is an AI for Recursive Tic-Tac-Toe. It uses a variant of MCTS called PUCT. MCTS is implemented in C++ and compiled to WASM via Emscripten. The webapp was written in TypeScript/HTML, and is served via Python3/Sanic.
You're looking at it! A write-up is coming soon .
-
The board is a 3×3 grid of supercells.
-
Each supercell contains a normal tic-tac-toe board.
-
Whenever a player gets a three-in-a-row in a small grid, they "win" that supercell.
-
The game ends when a player gets three-in-a-row on the supergrid or when the supergrid is tied.
-
X starts the game. They may pick any location to begin.
-
Each player then makes their move in the big cell aligned to the tiny cell that their opponent picked. For example, if X moves in the bottom-right of the center square, the squares highlighted in green are valid for O:
-
If your opponent makes a move that would cause you to play in a supercell that is won or tied, you get to freely choose amongst all of the availiable cells on the board.