Jogo de tabuleiro · Grátis

Jogo da Velha

Jogue Jogo da Velha (X e O) online grátis: faça três em linha no tabuleiro 3×3. Contra a CPU imbatível ou 2 jogadores, sem cadastro.

Jogador X
0
Empates
0
Jogador O
0

Tic-tac-toe online free

Tic-tac-toe is the classic game of X and O: two players take turns marking a 3×3 grid, and the first to line up three of their own symbols wins. It takes thirty seconds to learn and years to notice that, played properly, it should never produce a winner at all. Play free against the unbeatable computer or against a friend on the same device — this guide explains why the computer never loses and how you can always force the draw.

History

It is one of the oldest games still in play. Three-by-three grids scratched into stone turn up across Roman sites, associated with terni lapilli — which, curiously, was not quite our game: each player had only three pieces and, once all of them were placed, began moving them around the board. That is the same idea as the infinite variant.

The modern fixed-mark format settled in England under the name noughts and crosses. In 1952 A. S. Douglas programmed OXO on the EDSAC computer at the University of Cambridge as part of his doctoral work on human-computer interaction — one of the earliest video games with a graphical display on record.

Ever since, the game has been a rite of passage for anyone learning to program: small enough to finish in an afternoon, complete enough to teach search trees, minimax and basic game theory.

How to play

Each player takes a symbol, X or O, and you alternate marking one empty square at a time. The first to form a line of three matching symbols — horizontally, vertically or diagonally — wins. If all nine squares fill up with nobody lining up three, the game is drawn.

In vs computer mode you always play X and always move first. That is not a convenience: moving first is an advantage in tic-tac-toe, and even so, against this computer the best result available to you is a draw. In 2 players mode both sides share one device, taking turns tapping.

Rules

Strategies

The board is not symmetrical

The nine squares look interchangeable and are not. What separates them is how many of the eight winning lines each one belongs to.

Hence the preference order every experienced player follows by instinct: centre, then corner, side last. A side square is only a good move when it blocks something or creates a concrete threat.

The three openings, and the reply to each

Since X always starts, everything depends on where X opens. There are only three genuinely distinct openings — everything else is a rotation or a mirror image.

If you remember one thing, make it this: when your opponent opens in a corner, take the centre. It is the single rule that prevents the most losses in practice.

Why the computer never loses

The computer here uses minimax: before every move it walks the entire tree of possible continuations to the end of the game, scores each ending as a win, draw or loss, and picks the move whose worst outcome is the best available. Tic-tac-toe has so few positions that it solves the whole thing instantly — there is no approximation and no randomness involved.

There is one detail in the tie-breaking: among moves that all win, it prefers the one that wins in fewer moves. So when you slip, it does not drag the game out; it closes at the first opportunity.

The practical consequence is blunt: you cannot beat it. You can draw every single time, and that is the goal worth chasing. If a game ended in defeat, there was exactly one wrong move on your side — usually a reply other than the centre after a corner opening.

Tips for beginners

Trivia

Mobile version

On a phone, tap an empty square to place your symbol. The board scales to the screen width with no zooming or sideways scrolling, and the squares are large enough that mis-taps are rare.

In 2-player mode one device serves both sides: the indicator above the board always shows whose turn it is, which avoids the common confusion of one player tapping twice in a row.

Frequently asked questions

How do you win at tic-tac-toe?

By lining up three of your symbols horizontally, vertically or diagonally before your opponent. Against an attentive opponent that only happens through a fork: a move that creates two threats at the same time.

Can I beat the computer?

No. It calculates the whole game before every move and plays perfectly. The best available result is a draw — and that is entirely achievable.

What is the best first move?

The centre, because it belongs to four of the eight winning lines. Corners come next with three each; the sides are the weakest squares with two.

My opponent opened in a corner. What do I do?

Take the centre. It is the only reply that guarantees a draw — anything else lets them build a fork and win.

Does tic-tac-toe always end in a draw?

Between two players who do not make mistakes, yes. A win only appears when someone departs from correct play, and the game is mathematically solved in that sense.

What is a fork?

A move that creates two three-in-a-row threats at once. Since your opponent can only block one per turn, the other becomes a win on the following move.

Do I need to install anything or create an account?

No. Tic-tac-toe runs straight in your browser, free and with no sign-up.

Similar games