A two-player game on nine positions arranged in a three-by-three grid. Players alternate marking empty positions and stop when one has a full row, column or diagonal, or when the board is full. A game search must stop at the first win. Distinct move histories can reach the same position; canonical occupancy sets or bitboards make that equality available to memoization. Quotienting by board symmetry changes the requested output unless distinct oriented positions are subsequently restored.

Articles by others on the same topic (2)

Tic-tac-toe is a simple, traditional two-player game played on a 3x3 grid. The objective of the game is for one player to place three of their marks (either an "X" or an "O") in a row—horizontally, vertically, or diagonally—before the other player does.