Jogo de tabuleiro · Grátis

LIG4

Conecte quatro peças em linha antes do adversário.

Vez do vermelho.

Free online Connect 4

Connect 4 is the vertical-grid game where you drop discs and try to line up four of your colour before your opponent does. Gravity is what makes it more than tic-tac-toe on a bigger board: you never pick a square, only a column, so every move trades what you build now against what you hand your rival one row higher. Play free against the computer or a friend on the same device, and read on for how to beat the computer, why the maths favours whoever starts, and which threats actually win games.

History

The game went on sale in 1974 from Milton Bradley as Connect Four, with Howard Wexler and Ned Strongin credited as its creators. The gravity-fed vertical grid is what separates it from older line-up games. In Brazil it is known as Lig 4 and in the Spanish-speaking world as Conecta 4.

In 1988 it became one of the first well-known games to be completely solved, with James Dow Allen and Victor Allis reaching the result independently.

How to play

Click or tap any square in a column and the disc falls to the lowest free spot in that column. You play red and always move first; the computer answers in green after a short pause. Four in a row, horizontally, vertically or diagonally, wins. If all 42 squares fill up with no four in a row, the game is drawn.

The 2-player and vs-CPU buttons switch modes, and switching resets the game in progress. There is no scoreboard and no saved record: every game stands alone, and the new-game button restarts at any moment.

Rules

Strategies

How the computer decides

The computer follows three rules, always in this order, and nothing else.

There is no randomness: if you repeat the same moves it replies identically, and when two columns tie for a win or a block it takes the leftmost. The limit of this logic is that it only sees one move ahead. It does not notice double threats, it does not check whether its own disc hands you the square above, and when nothing is urgent it simply stacks up the centre until the column is full.

The trap that beats it: the double threat

A double threat appears when one disc creates two different squares that each complete four. The computer can block only one per turn, and you play the other. The shortest example against this opponent uses just the bottom row (columns numbered 1 to 7 from the left):

Odd rows and even rows

Number the rows from the bottom, 1 to 6. The rule of thumb among experienced players: the player who moves first (red) wants threats on odd rows, and the player who moves second (green) wants threats on even rows.

The reason is arithmetic. Each column has 6 cells, an even number. If the second player always answers in the same column as the opponent, they end up with every even-row cell and the first player with every odd-row cell. That is why a red threat on row 3 or 5 is hard to neutralise, and so is a green threat on row 2, 4 or 6. Threats on the wrong parity rarely force the opponent to play underneath them.

What the maths says

In 1988 James Dow Allen and Victor Allis independently solved the game: with perfect play the first player wins, but only by opening in the centre column. Opening in either neighbouring column leads to a draw, and opening in any of the four outer columns hands the win to the second player.

That does not make it easy. There are more than four trillion possible positions on the 7×6 grid, and only a computer memorises the perfect path. The practical lesson for you: column 4 sits on 51 of the 69 possible ways to line up four, against 15 for an outer column.

Common mistakes

Most lost games here trace back to one of these.

Tips for beginners

Trivia

Mobile version

On a phone, tap any square of the column you want; you do not need to hit the top one. The grid takes up to 88% of the screen width, capped at 420 px, so there is no sideways scrolling and the squares stay big enough for a thumb. In 2-player mode red and green alternate automatically.

Frequently asked questions

Does moving first give an advantage?

Yes. With perfect play the first player wins by opening in the centre column; opening in a neighbouring column only draws. In practice the centre gives the first player more possible lines from the start.

Do diagonals count?

Yes. Four in a row horizontally, vertically or diagonally, in either direction, wins equally.

How does the computer choose its move?

In order: it wins if it can, blocks your immediate four, and otherwise prefers the columns closest to the centre (4, 3, 5, 2, 6, 1, 7). There is no randomness.

Can the computer be beaten?

Yes. It looks only one move ahead and always answers the same way. Three discs on the bottom row with both ends open, such as 4, 2, 3 and then whichever end is left, create a double threat it cannot stop.

Does the computer always play the same way?

Yes. There is no randomness: if you repeat the same moves, it repeats its replies. That lets you learn from a loss and test variations.

Can the game end in a draw?

Yes. If all 42 squares fill up with no four in a row, the game is drawn.

Can I undo a move?

No. Once the disc has dropped the move stands. Use the new-game button to start over.

Do I need to install anything or create an account?

No. Connect 4 runs straight in your browser, free and with no sign-up.

Similar games