Стратегия игры в крестики-нолики
How to win tic-tac-toe: open in a corner, answer every opening correctly, build forks and block your opponent's. Perfect play is a draw. Play free online.
Опубликовано · Время чтения: 5 мин
To win tic-tac-toe, go first and start in a corner, then try to create a fork: a move that makes two lines of two at once, so your opponent can block only one. To never lose, learn the right reply to each opening: answer a corner with the centre, the centre with a corner, and always block a fork before it happens. With perfect play from both sides the game is always a draw. Test yourself against the unbeatable computer in the free Tic-Tac-Toe game.
We checked every line below by computer, searching all 255,168 possible games.
The three kinds of square
The board has nine squares, and they're not equal:
- Centre: on four lines (a row, a column and both diagonals).
- Corners: on three lines each.
- Edges (the middle of each side): on only two lines each.
More lines means more chances to make threats, which is why the centre and corners are stronger than edges.
Rule 1: Win if you can, block if you must
Every turn, check in this order:
- Can you complete a line? Do it.
- Can your opponent complete a line next turn? Block it.
- Can you make a fork? Do it.
- Can your opponent make a fork next turn? Stop it, ideally by making a two-in-a-row that forces them to block you instead.
Most casual games are lost at step 2: someone misses a block. Most "good player" games are decided at steps 3 and 4.
Как это сделать win tic-tac-toe with a fork
Here's a real example. You're X and start in the top-left corner. O takes the centre. You take the bottom-right corner. O now makes a mistake and takes the top-right corner, threatening the diagonal from top-right to bottom-left.
You must block in the bottom-left corner, but look what that block does: you now threaten the left-hand column and the bottom row at the same time. O can stop only one, and you complete the other. That double threat is a fork, and it's the only way to beat a player who never misses a simple block.
Going first: the corner opening
Opening in a corner is the most testing start. Of the eight replies, only the centre avoids a loss for O. If your opponent plays anything else, there's a forced win:
- O takes the opposite corner: take one of the two remaining corners. You threaten a line and will set up a fork.
- O takes an edge or an adjacent corner: you can also force a win, usually by taking another corner that creates a threat and then a fork.
If O correctly takes the centre, the game should be a draw, but there's still a trap. Take the opposite corner. Now O must reply on an edge; if O takes a corner instead, you can fork and win.
Going first: the centre opening
Starting in the centre is solid. Here O must reply in a corner: any edge reply loses. After centre, then a corner from O, try the corner opposite O's. Now O has to take another corner; an edge loses.
Edge openings are the weakest start for X, though still not a losing one.
Going second: how to never lose
You'll often move second. In our game, X and O take turns starting each new game, so against the computer you play second every other game. The safe replies:
| Opponent opens | Your safe reply | Replies that lose |
|---|---|---|
| Corner | The centre | Any other square |
| Centre | Any corner | Any edge |
| Edge | The centre, either corner next to it, or the opposite edge | The other four squares |
Then keep applying Rule 1. Two further traps to remember when playing second:
- You have the centre and X has two opposite corners: play an edge, not a corner.
- X has the centre and the corner opposite yours: take another corner, not an edge.
Playing the computer
Choose Against the computer and a level:
| Level | How it plays | Can you win? |
|---|---|---|
| Easy | Often places marks at random | Yes, often. Practise setting up forks. |
| Medium | Usually plays the best move, sometimes slips | Yes, when it slips. Punish mistakes. |
| Unbeatable | Always plays a perfect move | No. A draw is the best result. |
On Unbeatable, your goal is never to lose. If you can draw ten games in a row, including the ones where the computer moves first, you've learned the game. The score for each side and the draws are kept in your browser; Reset score clears them.
Choose Two players to play a friend on the same device, which is great for teaching children the fork idea.
Why perfect tic-tac-toe is a draw
Because the board is so small, every position can be worked out completely. When both sides follow the rules above, no one ever gets a fork that can't be stopped, so the game always fills up with no line. That's why tic-tac-toe is a good first strategy game: you can master it in an afternoon.
For a bigger challenge built on the same "make two threats at once" idea, try Four in a Row. Our guide on how to win Connect 4 shows how forks work on a bigger board.
Попробуйте сейчас
Pick Unbeatable and see if you can hold it to a draw from both sides. The free Tic-Tac-Toe game runs in your browser with no download or sign-up.
Частые вопросы
- Вопрос: is the best first move in tic-tac-toe?
- A corner. It leaves your opponent only one safe reply, the centre, and every other reply loses to correct play.
- Вопрос: you always win tic-tac-toe if you go first?
- No. If your opponent plays perfectly, the game is a draw. You can only force a win if they make a mistake.
- Вопрос: do you beat the unbeatable level?
- You can't, because it never makes a mistake. The best result against it is a draw.
- Вопрос: is a fork in tic-tac-toe?
- A move that creates two lines of two at once, so your opponent can block only one of them.
- Вопрос: should I do if my opponent starts in the centre?
- Take a corner. An edge reply loses against correct play.
Игры
Попробуйте Крестики-нолики
Бесплатно, без регистрации, работает в браузере. Играйте в крестики-нолики онлайн против компьютера или с другом на одном устройстве.