Skip to content

A C++/WASM/TS implementation of an MCTS-based AI for Recursive Tic-Tac-Toe.

Notifications You must be signed in to change notification settings

rohits2/mcts-tictactoe

Repository files navigation

MCTS Recursive Tic-Tac-Toe

Web Interface

What is this?

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.

Where is the code?

You're looking at it! A write-up is coming soon .

What are the rules?

  • 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.

About

A C++/WASM/TS implementation of an MCTS-based AI for Recursive Tic-Tac-Toe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published