Skip to content

How to play Five in a Row

By Ari Hlynsson · 1 player vs computer, or 2 online · Updated

Play Five in a Row now

Line up five of your own stones before your opponent does, in any direction, on a fifteen-by-fifteen board where a stone may go on any empty square.

Stones on the fifteen-by-fifteen board. A stone may go on any empty point, and five in an unbroken line wins in any direction.

The rules, step by step

  1. 1

    Tap an empty square to aim at it. A faint stone and a crosshair show where you are pointing.

  2. 2

    Tap the same square again to place your stone there. Tapping anywhere else just moves the aim.

  3. 3

    Players alternate, one stone per turn. A stone is never moved or removed once it is down.

  4. 4

    Five of your own stones in an unbroken line wins, horizontally, vertically or diagonally.

  5. 5

    A line of six or more wins too. There is no penalty here for overshooting.

  6. 6

    If all two hundred and twenty-five squares fill with nobody lined up, the game is drawn. In practice this almost never happens.

Tips that change how you play

The shapes that decide a game

The shapes that decide a game
ShapeWhat it looks likeWhat it demands
FiveFive of one colour in an unbroken line, in any direction.The game is over. Six or more in a line wins here too.
Open fourFour in a row with the square at each end empty.Nothing can stop it. There are two winning squares and only one block.
FourFour stones and one empty square that would make five, whether the gap is at an end or in the middle.It must be blocked on the very next move.
Open threeThree that could become an open four in one move. A gap inside, as in stone, stone, gap, stone, still counts.Answer it now, or it becomes an open four.
Closed threeThree with one end already blocked.It can wait. The most it can become is a four.

A short game, move by move

To follow along, letter the columns A to O from the left and number the rows 1 to 15 from the bottom, the way gomoku books do, so the centre point is H8. The board on screen has no labels, so count out from the middle. You move first and open on H8. Your opponent answers diagonally at I9. You play G8, beside your first stone, and they play G7. You play J7. It looks loose, but it sits on a diagonal you will want later. They play F9. Now F8 gives you three in a row, F8, G8 and H8, with both ends empty. That is an open three, and it has to be answered. Your opponent blocks at E8, and that is the move that loses. The right block was I8, the end that also touches your stone on J7, and the medium and hard computer opponents both play I8 here. You play K6, so J7 and K6 now point straight at I8. Your opponent plays J10 and misses it a second time. Now I8 does two things at once. It makes four in a row, F8 to I8, with one winning square left at J8. It also makes a diagonal three, I8, J7 and K6, with both ends open. The four has to be blocked, so they play J8. You play L5, and the diagonal is an open four, I8 to L5, with H9 and M4 both empty. They block one end, you play the other, and that is five. One stone made a four and a three at the same time. Players call it a four-three, and it is the pattern to look for in every game.

Winning with fours, and what to answer first

A four leaves your opponent no choice: they block it or they lose. That makes every four a free stone for you. If you can make a four, then another, then another, every block is forced. If the last one leaves you an open four, or two fours at once, the game is won before your opponent gets a move of their own. Players call this winning by continuous fours. Before you make a quiet move, look for a string of fours that is already there.

When both sides have threats, answer them in this order. Make five if you can. If not, block their four. If they have no four, make an open four of your own, because it wins before their three can become anything. Only then block their open three. Blocking a three when you had an open four waiting is how won games slip away.

Other rule sets, and how this one differs

The same game goes by several names, and the rules differ in a few places. This version is free-style: a line of six or more wins, no move is ever banned, and against the computer, who opens alternates from one game to the next. Standard gomoku counts exactly five, so a line of six wins nothing. Renju, the tournament form, bars the first player from making two open threes or two fours with a single stone, and from making six. Some people play on the nineteen-by-nineteen board of a go set rather than fifteen by fifteen.

If you learned one of those, one thing carries over unchanged. The four-three from the game above is legal under all of them, so it is the pattern worth practising.

Mistakes that cost beginners the game

Blocking every line the opponent starts.
A closed three is not a threat, and answering it hands over the initiative for nothing. Check whether the line still has two open ends before you spend a move on it. If it does not, leave it and build your own.
Building one long line and pushing it as far as it will go.
A single line, however long, is stopped by one stone at each end. Wins come from two lines that cross. Build shapes that overlap, so that answering one of them creates the other.
Treating a line as broken because there is a hole in it.
Stone, gap, stone, stone is a four, not a pair of twos. The empty square in the middle is the winning square, and it is the threat players miss most often in both directions.

Common questions about Five in a Row

Is Five in a Row the same as gomoku and omok?

The goal is the same, and the rules differ at the edges. Gomoku is the Japanese name and the one used in tournaments, omok is the Korean one, and five in a row is the plain English description. This is the free-style version, where any line of five or more wins and no move is banned. Tournament renju bans some moves for the first player. The section on other rule sets above has the details.

Does the first player always win?

In free-style gomoku with perfect play, yes, which is why competitive play adds extra opening rules to even it out. Nobody plays perfectly, so in practice moving first is an advantage rather than a result. That is why the opening alternates between games here.

Why does it take two taps to place a stone?

Fifteen columns across a phone screen makes each square about twenty-two pixels wide, which is smaller than a thumb. The first tap aims and the second commits, so a mis-tap moves the crosshair instead of losing you the game. On a desktop the second tap is just a confirming click.

Play Five in a Row now

The board opens in this tab and the first move is yours. Nothing to install, no account, and your progress stays in this browser.

Start a game