How to Play Tic-Tac-Toe
Tic-Tac-Toe — also known as Noughts and Crosses in the United Kingdom, Australia, and Pakistan — is one of the oldest and most universally recognised two-player strategy games in the world. The game is played on a three-by-three grid. One player marks squares with an X and the other with an O, taking turns until one player places three of their marks in a horizontal, vertical, or diagonal row, or until all nine squares are filled with no winner — a result called a draw.
Game Rules
On MIA Games, you always play as X and move first. Click or tap any empty square on the board to place your mark. In vs AI mode, the computer responds immediately with its move. In 2 Players mode, two people take turns on the same device. The game ends when:
- A player fills three squares in a horizontal row (top, middle, or bottom)
- A player fills three squares in a vertical column (left, centre, or right)
- A player fills three squares diagonally (top-left to bottom-right, or top-right to bottom-left)
- All nine squares are filled with no three-in-a-row — this is a draw
Press Restart at any time to reset the board while keeping your score. Scores persist across sessions using your browser's localStorage — they will still be there when you return.
AI Difficulty Levels Explained
MIA Games offers three AI difficulty settings, each using a different decision-making strategy:
Easy mode makes the AI play randomly. It picks any available square with no strategy whatsoever. This is ideal for young players or complete beginners who want to learn the game without being overwhelmed. You should win most rounds on Easy.
Medium mode gives the AI partial intelligence. It will take a winning move if one is available, and it will block an obvious player threat — but it does not plan more than one move ahead. With good strategy, an experienced player can consistently beat the Medium AI by setting up two simultaneous winning threats (a fork).
Hard mode uses the Minimax algorithm, a decision-tree search technique used in classical game theory and artificial intelligence. Minimax evaluates every possible sequence of moves from the current board state and selects the move that minimises your best possible outcome while maximising the AI's. In mathematical terms, Tic-Tac-Toe on Hard is a solved game — a perfect Hard AI will never lose. The best result you can achieve is a draw, and only by playing perfectly yourself.
Winning Strategy Tips
Against Easy and Medium AI, these strategies will significantly improve your win rate:
- Take the centre square first. The centre (position 5) is involved in four of the eight possible winning lines — more than any other square. Claiming it early gives you the most flexibility.
- Play corners over edges. Corner squares are involved in three winning lines each, while edge squares (top, bottom, left, right midpoints) are involved in only two. Corners give you more attacking options.
- Create a fork. A fork is a position where you have two simultaneous winning threats. Your opponent can only block one, guaranteeing your win. Setting up a fork usually takes three moves and requires placing your marks in non-adjacent corners.
- Block immediately. If your opponent has two marks in a row with the third square empty, block that square on your next turn. Even on Medium difficulty, failure to block is the most common reason players lose.
A Brief History of Tic-Tac-Toe
The origins of Tic-Tac-Toe trace back to ancient Rome, where a similar game called Terni Lapilli was played around the 1st century BC. Evidence of the game has been found scratched into Roman tiles and stone. The modern English name "Tic-Tac-Toe" appeared in the United States in the 20th century, while "Noughts and Crosses" became established in the United Kingdom. The game became one of the first ever programmed on an electronic computer — OXO, written by Alexander Douglas in 1952 for his PhD thesis at Cambridge University, is widely considered the first graphical computer game in history.