Board & Cards5-15 min
Gomoku
Five in a row, and the board is yours
How to play
- 1Choose your opponent (computer or two players), the level, your stone colour and the rule, then press Start. The defaults are computer, Normal, you as Black, Freestyle. Black always moves first.
- 2If you take White, the computer opens as Black in the centre of the board. If you are Black, put your first stone on any intersection; the computer answers immediately on one of the eight points next to it.
- 3Tap an intersection to place a stone. With a mouse one click plays; on a phone the first tap is a preview and tapping the same point again commits it.
- 4Line up five stones of your colour with no gaps, across, down or diagonally. The winning line lights up, and the stone you just played carries a red dot.
- 5Playing Black under Renju, forbidden points show a cross. Tapping one does not place a stone - it tells you which ban you hit: double three, double four or overline.
- 6Made a mistake? Use undo, three times per game. Against the computer one undo returns both its reply and your own last move.
- 7Turn on the numbers button to see the order each stone was played in. Once a game is over, replay the moves one at a time, or let it play through automatically.
- 8The result screen shows your record and streak for that rule and level. Abandoning a game against the computer part-way is recorded as a resignation loss.
Controls
- Click / tap the same point twice
- Place a stone (on touch the first tap is a preview)
- Arrow keys + Enter or Space
- Click the board once, then move the cursor and play with the keyboard
- Undo button / Z, Backspace
- Take back one move, three times per game
- Numbers button
- Show or hide the move number on each stone
- Replay the moves (after a game)
- Step through from the first move, or auto-play
- Settings button
- Change opponent, level, stone colour and rule
Tips
- An open three - three in a row with both ends empty - becomes an unstoppable open four with one more stone. The moment you see your opponent make one, block an end.
- A four has to be answered, every time. The surest winning pattern is the four-three: make a four while the same stone creates an open three on another line. Under Renju the four-three is not forbidden, so it works there too.
- Play near the centre in the opening. Along the edge one side is a wall, so open shapes rarely form.
- Blocking alone loses. Before you block, check whether the blocking point also extends a line of your own - and take that one.
- Playing Black under Renju, the double-three attack is closed to you, so attack with fours instead. Playing White, do the opposite: aim for lines that pass through Black's crossed points, because Black can never complete them.
- Under Black: exactly 5 and under Renju, six in a row is not a win for Black. When you fill a gap, count first and make sure you are not making an overline.
- The Easy computer leaves open threes alone and has a lot of randomness mixed into its scoring. Practise building four-threes against Easy first, then learn to defend against Normal.
- The Hard computer never misses a sequence of consecutive fours. Cut those shapes off before they can repeat, and after a loss use the replay to find the move where it turned.
What is Gomoku?
You place your first stone and the computer puts one straight down beside it. From there it is a running argument: you build a three, it gets blocked, the block builds a line of its own. Whoever first gets five stones of their colour in an unbroken line - across, down or diagonally - wins.
The board is 15 lines by 15, so 225 intersections. Stones go on the intersections, not inside the squares, and the five small dots printed on the board simply mark the centre and the four quarters; they carry no rule. If all 225 points fill up with no line, the game is a draw.
Gomoku spread from Japan, where it is called gomoku narabe, five stones in a row. The rules are trivial and the first player is enormously favoured: in the early 1990s Victor Allis and his colleagues proved by computer search that on an empty 15x15 board Black wins with perfect play. That is why tournament Renju rules forbid Black - and only Black - the double three, the double four and the overline.
Three rules are offered here: Freestyle, Black: exactly 5, and Renju with its forbidden points. Under Renju the points Black may not play are marked on the board with a cross before you touch them, and tapping one tells you whether it is a double three, a double four or an overline. The computer scores shapes like the open three and the four to pick its move, and on Hard it reads several moves ahead and hunts for a sequence of consecutive fours that forces a win.
Frequently asked questions
I am completely new to gomoku - how do I start?
Press Start and you are playing the computer on Normal as Black under Freestyle. You take turns placing stones on the intersections of a 15x15 board, and whoever first lines up five of their colour across, down or diagonally wins. If all 225 points fill with no line, it is a draw. If you have no feel for it yet, drop to Easy first.
What is the difference between Freestyle, Black: exactly 5 and Renju?
Under Freestyle both sides win with five or more in a row and nothing is forbidden. Under Black: exactly 5, Black wins only with exactly five while White still wins with six or more, and there is no ban on double threes or double fours. Renju adds the forbidden points on top: Black may not play a double three, a double four or an overline at all. Under all three rules White plays with no restriction whatsoever.
What exactly are the forbidden points - double three, double four, overline?
They are the three moves only Black is barred from under Renju. A double three makes two open threes with one stone, a double four makes two fours with one stone, and an overline makes a row of six or more. An open four has two completion points but comes from the same four stones, so it counts as one four and is not forbidden; a four together with an open three - the four-three - is not forbidden either. A three with one end blocked, or running into the edge, can never become an open four and is not counted as a three. And a move that completes five wins the game, so it is never forbidden whatever shape it makes.
Does playing a forbidden point mean I lose on the spot?
Under the tournament rules of the international Renju federation, yes - Black loses the instant a forbidden point is played. Here it works differently: forbidden points are marked with a cross in advance and simply cannot be played, and the game tells you which ban applies. Seeing why a point is closed teaches the rule faster than an unrecoverable loss. So a Renju game won here has the same result as under the official rules; only the handling of a forbidden point differs.
Does the computer respect the forbidden points too?
Yes. When the computer plays Black under Renju it removes forbidden points from its candidate moves. Playing White it has no restrictions, so it plays freely.
How do the three levels differ?
All three take an immediate five when it is there and block your five before anything else. Beyond that, Easy mixes a lot of randomness into its scoring and will not hurry to block an open three. Normal blocks open threes and goes for open fours, but chooses among the moves with similar scores, so games vary. Hard adds a search for sequences of consecutive fours and reads two to three moves ahead, taking roughly 0.4 seconds per move.
How many undos do I get, and how do I review a game?
Three undos per game. Against the computer one undo returns your move together with its reply; in two-player mode it returns the single last move. Once a game has ended you cannot undo, but you can step through the moves with first, previous, next and last, or watch them play out automatically. Turning on the numbers button shows the move order on each stone as you review.
Where is my record kept?
Wins, losses and draws, your current streak and your best streak are paired to the rule and level - Freestyle Normal, Renju Hard, and so on - and stored in this browser only. The streak accumulates for that pair regardless of which colour you took, and abandoning a game against the computer part-way is recorded as a resignation loss, which ends the streak. Adding new rules did not disturb the existing Freestyle record, and clearing your browser data clears all of it.
What achievements are there?
Twelve. First game played; beat the Easy, Normal and Hard computer; win as Black; win as White; win with 20 or fewer stones on the board; make an open four with both ends empty; three wins in a row at one level; beat Normal or above under the Black: exactly 5 rule; ten wins overall; and beat the Hard computer playing White. The ten-win total counts every rule and level together. Each one pops up at the top right as you earn it, and the trophy button in the toolbar collects them.
Can I play on a phone or with a keyboard?
Both. On a phone the first tap on an intersection shows a preview and a second tap on the same point places the stone, so misplaced stones are rare, and a forbidden point tells you on the first tap. With a keyboard, click the board once, move with the arrow keys, play with Enter or Space, and undo with Z or Backspace.