Play Go Online

The ancient strategy game of Go (Weiqi / Baduk). Place stones, capture groups & control territory. Three board sizes, three AI levels, or play a friend.

Created by Brian Hamilton

⚫ Captures
0
⚪ Captures
0
Turn
Black
Time
0:00

Black to play — click an intersection

How to play Go

Take turns placing stones on the intersections. Surround more of the board than your opponent.

  • A stone's liberties are the empty points directly beside it — never diagonally. Touching stones of one colour form a group and share their liberties.
  • Fill a group's last liberty and the whole group is captured and removed, however big it is.
  • You may not play a stone that would leave its own group with no liberties. That is suicide — unless the move captures first, which frees a liberty and makes it legal.
  • A group with two separate eyes can never be captured, because playing into either one would be suicide.
  • Ko: you may not immediately recapture in a way that repeats the previous position. Play elsewhere first.
  • Two passes in a row end the game. Scoring is Chinese area — your stones plus the empty points only you surround — and White gets 7.5 komi for playing second.

Controls: click an intersection to place a stone. Choose the board size, AI difficulty or two-player mode above the board; Pass, Undo and Resign are below it.

Go strategy game — surround territory and capture stones on the board

The whole game rests on one idea: liberties

A stone's liberties are the empty points directly beside it — up, down, left and right, never diagonally. Stones of the same colour that touch along those lines form a single group, and a group shares its liberties: it lives as long as any one of them is still empty. Fill the last one and the whole group is lifted off the board at once, however large it is.

Liberties, and a stone in atari A board with a connected pair of black stones and a single white stone. The six empty points touching the black pair are its liberties, marked with dots. The white stone is surrounded on three sides and has only one liberty left, which is called atari; the circled point is where Black plays to fill it and capture the stone.
The dots are the black pair's six liberties. The white stone has one left, which is called atari; Black plays the circled point and it comes off the board.

That single rule generates almost everything else. A group down to its final liberty is in atari, one move from death. You may not play a stone that would leave its own group with no liberties — that is suicide, and it is illegal — unless the same move captures something first, which frees a liberty and makes it legal after all. Captures are resolved before suicide is checked, and that ordering is the whole of the rule.

Two eyes, and why they are permanent

A group that surrounds two separate empty points can never be captured. Not "is hard to capture" — cannot be, by anyone, ever. This is the single most important idea in Go, and it is worth seeing why it falls out of the rules rather than being a rule of its own.

Why a group with two eyes can never be captured Two positions side by side. On the left a black group encloses two separate empty points. White cannot play either one: because the other eye still gives the group a liberty, a white stone placed in an eye would have no liberties itself, which is suicide and illegal. The group can never be captured. On the right a black group encloses only one empty point and is surrounded by white everywhere else, so White plays that single point and captures all eight stones.
Two eyes cannot be filled, because filling either one would be suicide while the other still gives the group a liberty. One eye offers no such protection.

To capture the group your opponent must fill every liberty, and the two eyes are liberties. Playing into the first eye would give that new stone no liberty of its own, because the group still has the second eye and so is not captured — the placement is plain suicide and the rules forbid it. The same is true of the other eye. Neither can ever be played, so neither can ever be filled, so the group lives for the rest of the game.

Change it to one eye and the whole thing inverts. Once the group's outside liberties are gone, that single eye is its last liberty; playing there is not suicide, because it captures — and the entire group comes off the board. On this page's own engine, the eight-stone group on the right of the diagram above dies to exactly one move.

This is what "living" and "dead" mean in Go, and it is why strong players spend moves making eye shape in positions that look quiet. A group with one eye is not nearly alive. It is dead, and both players know it.

Ko: the rule that stops the game repeating

One shape breaks the rules as stated so far. A single stone is captured, and the capturing stone is itself left with exactly one liberty — at the point just vacated. Taking it straight back would restore the position exactly, and the two players could do it for ever.

The ko rule: no immediate recapture Two boards side by side. On the left, a single white stone has one liberty and Black plays the circled point to capture it. On the right, the resulting position: the black stone that made the capture now has exactly one liberty itself, at the point the white stone just left. White is forbidden from playing there immediately, because doing so would recreate the previous position and the two stones could be taken back and forth for ever. White must play elsewhere first.
Black captures; White is then forbidden from taking straight back, because that would restore the previous position exactly.

The ko rule forbids that immediate recapture. You must play somewhere else first, and only then may you come back. That elsewhere-move is a ko threat: a move big enough that your opponent has to answer it instead of resolving the ko. Ko fights are where Go stops being about the local position and starts being about the whole board, because the value of a threat somewhere else decides who wins the exchange here.

Scoring: stones plus surrounded space

This page uses Chinese area scoring, which is the easier of the two systems to count. Your score is the number of your stones on the board plus the number of empty points that only you surround. Empty regions touching both colours are neutral and count for nobody.

White receives 7.5 points of komi as compensation for playing second, on every board size. The half point is deliberate: it makes a tied score impossible, so every game has a winner. Both players passing in succession ends the game and triggers the count.

Where beginners go wrong

Answering every move. Go is not a game of forced replies. If your opponent's move is small and yours can be big, take the big point and let them have the small one. Beginners lose most of their points by dutifully responding in a corner that was already settled.

Saving stones that are not worth saving. Three stones are three points. A move elsewhere can be worth fifteen. Rescuing a small group into a hopeless position usually costs more than letting it go, and dead stones are often more useful as threats than as stones.

Playing on the first line early. The edge looks like it saves effort because there is less to surround, but a stone on the very edge has only three liberties to begin with, and territory made there is tiny. Corners first, then sides, then the centre — the corner needs the fewest stones to enclose the most space.

Counting captures instead of territory. Capturing feels like winning and often is not. A player who takes six stones while their opponent quietly maps out forty points of framework has lost by a distance.

What was verified on this page

The rules engine on this page was tested against an independent implementation written from the rules of Go, rather than taken on trust, and it came through very well. Liberty counting was compared on 104,062 groups across 1,200 random positions at all three board sizes and matched exactly. Legality, captures and the resulting position were compared on 163,994 placements — every one agreed, including which moves are suicide. Area scoring matched an independent count on 750 positions.

The two-eye property was checked directly with the page's own engine, because it tests capture, suicide and liberties all at once: the two-eyed group could not be played in even with every other point on the board filled by the opponent, while the one-eyed group died to a single move that captured all eight of its stones.

Two defects were found in the AI, and both were fixed. The first was that the Hard setting ran its Monte Carlo search synchronously, freezing the page for 2 to 3.3 seconds on every move. The search now hands control back to the page as it goes, and no longer blocks it for more than about half a second at a stretch.

The second was more interesting, and invisible from the outside. Hard picks a shortlist of candidate moves and simulates random games from each. It was giving the first candidate its full allocation of simulations, then the second, and so on — but the clock ran out long before the list did. On a 9×9 board only 5 of 20 candidates were ever simulated; the other fifteen got nothing and were compared on a win count of −1, which silently discarded them. Candidates were also ranked by total wins rather than win rate, so any candidate the clock cut short could not win the comparison even in principle. The search now cycles through the candidates a simulation at a time and judges them on win rate, so every one is considered and the sample sizes stay within a single playout of each other.

Measured after the fix, on real mid-game positions. "Longest pause" is the worst uninterrupted stretch, which is what the interface actually feels — the total think is spread across frames the page can paint in.
Board Setting Longest pause Candidates simulated
9×9Easy / Medium8ms— plays at once
9×9Hard125ms20 of 20, 12–13 games each
13×13Hard150ms12 of 12, 9–10 games each
19×19Hard325ms12 of 12, 2–3 games each

That last row is worth being honest about. A full-size board is enormous, and simulating a whole random game on it is slow — so within the same time budget Hard manages only two or three simulations per candidate. Its Monte Carlo layer is genuinely thin at 19×19, and most of the move choice there still comes from the positional heuristics rather than the simulations. On 9×9 the search does real work, and that is the board to play if you want the AI at its strongest.

A game older than almost everything

Go is the oldest board game still played in its original form, with a continuous record in China going back around 2,500 years, where it is called weiqi — roughly, "the encirclement game". It reached Japan by the seventh century as go, and Korea as baduk.

Its reputation as the hard problem in artificial intelligence was well earned. Chess fell to computers in 1997; Go held out until 2016, when AlphaGo beat Lee Sedol. The reason is the branching factor: a 19×19 board offers around 250 legal moves at each turn against chess's 35, which makes brute-force search hopeless and is exactly why the Hard setting here reaches for random simulations rather than a deep search. Go remains unsolved, and on a full board it will stay that way.

More Strategy & Puzzle Games

If you enjoy Go, try these other free games:

Game Over