Free online Infinite Tic-Tac-Toe
Infinite Tic-Tac-Toe keeps the X and O you know but gives each player only three marks. Once they are down, you have to move them, one per turn and to any empty square, until you line up three. Because the board never fills up, there is no draw by a full board: a game ends when someone wins or when the same position appears for the third time, which is a draw. This guide covers the exact rules of this version, the L-shaped trap that decides games, and what a complete analysis reveals about the computer.
History
Lining up three pieces is ancient. The Roman game known as terni lapilli, in which each player has three pebbles that are then shifted around the board, is mentioned by the poet Ovid in the Art of Love, and the same family reappears in the Middle Ages as three men's morris. Paper tic-tac-toe, with nine squares and no movement, reached a landmark in 1952 with OXO, a program by A. S. Douglas for the EDSAC computer at the University of Cambridge, one of the first computer games.
How to play
In the default 2-player mode, X and O alternate on the same device; in vs-CPU mode you play X and the computer plays O. X always moves first, in every game. There are two phases. During placement, the first three moves of each player, you tap an empty square to put a mark down.
In the movement phase each turn takes two taps: first one of your marks, which lights up, then an empty square. It can be any empty square on the board, not just a neighbouring one. Tapping the lit mark again cancels the choice, and tapping a different mark of yours switches the selection.
Rules
- A 3×3 board with eight winning lines: three rows, three columns and two diagonals.
- Each player has exactly 3 marks, and they never leave the game.
- X always starts, even after a game that X won or lost.
- Placement: one new mark per turn on an empty square, until you have 3 on the board. The first movement turn belongs to X, on the seventh turn of the game.
- Movement: one of your marks goes to any empty square. Passing is not allowed.
- Three marks of one colour in a line win, and the winning line is highlighted.
- The scoreboard tracks wins during the session and resets when you switch modes. Nothing is saved on the device.
- Draw by repetition: if the same arrangement of marks, with the same player to move, occurs for the third time in a game, the game ends in a draw and nobody scores. The count starts over with every new game and when you switch modes.
Strategies
- Take the centre during placement: it blocks four of your opponent's lines at once.
- Do not build an open L by accident. A corner plus its two neighbours (such as 1, 2 and 4), with squares 3 and 7 empty, is already a double threat; the same goes for the other three corners.
- Create threats that force your opponent to block with the piece they wanted to keep still.
- Before every move, simulate the reply. Ask what your opponent does if you leave that square.
- Keep one free piece so that you always have a safe move.
How a game can end in a draw
With 6 pieces on 9 squares there are always 3 empty squares, so a move always exists and the board never fills up. A complete analysis of the game, covering all 5,390 reachable positions, shows that with perfect play on both sides nobody can force a win: the theoretical result is a draw.
So that perfect play cannot go on forever, this version uses a threefold-repetition rule: if the same arrangement of marks, with the same player to move, occurs for the third time, the game ends in a draw. Positions can only repeat during the movement phase, and the history starts over with every new game and when you switch modes. A move that completes three in a row wins on the spot, repetition or not.
The L-shaped trap: the double threat
In the movement phase everything revolves around one idea. Two of your marks on a line with the third square empty form a threat: your third mark, wherever it is, jumps there and completes the line. Whoever has the move with a threat on the board wins; whoever faces a threat must occupy the empty square with one of their own marks.
The disaster is the double threat. Number the squares 1 to 9, left to right and top to bottom. With marks on 1, 2 and 4, you threaten square 3 (completing 1-2-3 with the mark from 4) and square 7 (completing 1-4-7 with the mark from 2). The defender can plug only one, and the other side wins. The analysis confirms it: with X on 1, 2 and 4 and O on 5, 6 and 8, it is O's turn and O loses in two moves, despite holding the centre.
Centre, blockers and the free piece
A few structural facts help you read any position.
- The centre sits on 4 lines (middle row, middle column and both diagonals); each corner on 3; each edge square on 2.
- A mark standing on your opponent's line blocks it. Moving that mark reopens the threat, so before you move, find out what it is holding back.
- Since moving is compulsory, move the free piece, the one that blocks nothing and is not part of your own threat.
- Pieces can jump far, so your opponent's mark on the other side of the board can still reach the empty square you thought was too distant.
How the computer plays
The computer plays O with a six-ply minimax search: it sees its own move plus five more, and it prefers a quick win to a slow one. That covers every forced win that exists in this game, because the complete analysis shows none lasts longer than three moves by the winner. The upshot is blunt:
- We tested every possible sequence of X moves against the computer's replies, and none ends in a win for X.
- Against random moves the computer won 19,996 of 20,000 simulated games, around the seventh turn; the other 4 ended in a draw by repetition.
- Playing without error, X can hold out until the threefold repetition and draw, but the computer does not err either: the best possible result against it is a draw. To win, use the 2-player mode.
- In the opening, if you start in a corner the computer answers in the centre; if you start in the centre it answers on square 1.
The movement phase is merciless
With all three marks of each side on the board and no winner yet, the analysis classified every position that can arise in a game. In about 77% of them the side to move wins by force. In about 15% neither side can force a win: with perfect play it is a draw. In about 8% the side to move is already lost.
In other words, the movement phase is short and tactical: one mistake usually decides the game, which is why placement, when you still choose where each mark is born, matters so much.
Common mistakes
These account for most lost games.
- Moving the blocker that stands on an opponent's line.
- Defending only one threat when two already exist. By then it is too late: the defence happens before the second one appears.
- Assuming marks only step to a neighbouring square. Here they jump to any empty square.
- Forgetting the diagonals when looking for threats.
- Shuffling back and forth without a plan. If both sides keep repeating the same arrangement, the third time ends the game in a draw.
Tips for beginners
- Treat placement like ordinary tic-tac-toe: centre, corner and block.
- Say the square numbers out loud as you think: it makes the lines easier to see.
- In 2-player mode, take turns playing X, since X always starts.
- If you are losing, look for a block that also creates a threat of your own.
Trivia
- Here a mark jumps to any square; older versions usually let it step only to a neighbouring one, which changes the strategy considerably.
- In ordinary tic-tac-toe, perfect play always ends in a draw, closed off by the full board. Here it is also a draw, but since the board never fills up, it is the threefold repetition of the position that closes it.
- The whole game has just over five thousand reachable positions, which a computer can solve in one go.
Mobile version
On a phone, tap an empty square to place a mark. In the movement phase, tap your mark and then the destination square; the marks you can choose and the empty destination squares light up, and the board fits the screen width with no sideways scrolling.
Frequently asked questions
Why can I move my pieces?
This version has a movement phase: after you place your 3 marks, each turn consists of moving one of them to an empty square, in search of three in a row.
Can I move a piece to any empty square?
Yes. The square does not have to be a neighbour: any empty square on the board will do. The only thing you cannot do is pass.
Can the game end in a draw?
Yes, by repetition: if the same arrangement of marks, with the same player to move, occurs for the third time, the game ends in a draw. There is no draw by a full board, since 3 squares are always empty, and a draw does not score on the scoreboard.
Can I beat the computer?
According to a complete analysis of the game, no: no sequence of X moves beats the computer's replies, and with perfect play nobody can force a win. The best result against it is a draw by repetition. To win, play 2-player mode.
What is the best first move?
The centre is the soundest, since it sits on 4 lines. With perfect play, though, every opening leads to the same theoretical result, a draw.
Who starts the game?
X, always. In vs-CPU mode you are X and the computer plays O. In 2-player mode it is fair to take turns playing X.
Is the score saved?
No. The score lasts for the session and resets when you switch modes; nothing is stored on the device.
Do I need to install anything or create an account?
No. Infinite Tic-Tac-Toe runs straight in your browser, free and with no sign-up.