Ultimate tic-tac-toe (also known as super tic-tac-toe, meta tic-tac-toe or (tic-tac-toe)²[1]) is a board game composed of nine tic-tac-toe boards arranged in a 3 × 3 grid.[2] [3] Players take turns playing on the smaller tic-tac-toe boards until one of them wins on the larger board. Compared to traditional tic-tac-toe, strategy in this game is conceptually more difficult and has proven more challenging for computers.[4]
Just like in regular tic-tac-toe, the two players (X and O) take turns, starting with X. The game starts with X playing wherever they want in any of the 81 empty spots. Next the opponent plays, however they are forced to play in the small board indicated by the relative location of the previous move. For example, if X plays in the top right square of a small (3 × 3) board, then O has to play in the small board located at the top right of the larger board. Playing any of the available spots decides in which small board the next player plays.
If a move is played so that it is to win a small board by the rules of normal tic-tac-toe, then the entire small board is marked as won by the player in the larger board. Once a small board is won by a player or it is filled completely, no more moves may be played in that board. If a player is sent to such a board, then that player may play in any other board. Game play ends when either a player wins the larger board or there are no legal moves remaining, in which case the game is a draw.
Super tic-tac-toe is significantly more complex than most other variations of tic-tac-toe, as there is no clear strategy to playing. This is because of the complicated game branching in this game. Even though every move must be played in a small board, equivalent to a normal tic-tac-toe board, each move must take into account the larger board in several ways:
While tic-tac-toe is elementary to solve[5] and can be done nearly instantly using depth-first search, ultimate tic-tac-toe cannot be reasonably solved using any brute-force tactics. Therefore, more creative computer implementations are necessary to play this game.
The most common artificial intelligence (AI) tactic, minimax, may be used to play ultimate tic-tac-toe, but has difficulty playing this. This is because, despite having relatively simple rules, ultimate tic-tac-toe lacks any simple heuristic evaluation function. This function is necessary in minimax, for it determines how good a specific position is. Although elementary evaluation functions can be made for ultimate tic-tac-toe by taking into account the number of small board victories, these largely overlook positional advantage that is much harder to quantify. Without any efficient evaluation function, most typical computer implementations are weak, and therefore there are few computer opponents that can consistently outplay humans.
However, artificial intelligence algorithms that don't need evaluation functions, like the Monte Carlo tree-search algorithm, have no problem in playing this game. The Monte Carlo tree search relies on random simulations of games to determine how good a position is instead of a positional evaluation and is therefore able to accurately assess how good a current position is. Therefore, computer implementations using these algorithms tend to outperform minimax solutions and can consistently beat human opponents.[6]
A variant of the game allows players to continue playing in already won boxes if there are still empty spaces. This allows the game to last longer and involves further strategic moves. It was shown in 2020 that this set of rules for the game admits a winning strategy for the first player to move, meaning that the first player to move can always win assuming perfect play.[7] If playing with this rule set is still preferred, the forced-win problem can be practically solved by generating the first 4 moves at random. This is most effectively done by randomly generating a 5-digit number, then using the first digit to select a larger board and the next four digits to place "X"s and "O"s in the appropriate small board.[8]
Tic-Tac-Ku, a game invented by Mark Asperheim and Cris Van Oosterum,[9] [10] [11] has similar rules to ultimate tic-tac-toe, however a player wins the game by winning at least five small boards, instead of three in a line.