The Game of Y

Connect all three sides of a triangle. A filled Y board always has exactly one winner — checked over every colouring of 2,131,008 boards.

A filled Y board always has exactly one winner

You win by connecting all three sides of the triangle with one group. There is no draw — and not in the sense that draws are rare. A completely filled board cannot fail to contain a winning connection, and cannot contain two. Colour every cell however you like, at random or on purpose, and exactly one colour will have joined all three sides.

That is a theorem, so this page checks it rather than quoting it — by enumerating every possible colouring of every board small enough to enumerate:

BoardCellsColouringsNo winnerTwo winners
3 rows 6 64 0 0
4 rows 10 1,024 0 0
5 rows 15 32,768 0 0
6 rows 21 2,097,152 0 0

2,131,008 filled boards, no exceptions. And exactly half go to each colour, which is what colour symmetry demands and a useful sign that nothing is quietly broken.

Which is why the computer can play without understanding the game

The opponent above knows no Y strategy at all. For each move it might make, it fills the rest of the board completely at random a few hundred times and counts how often it wins. Then it plays whichever move won most.

That works because of the theorem. In a game that can be drawn, most random fills end in nothing and tell you nothing, so you need real evaluation. In Y every random fill produces a winner — there is no wasted playout and no draw to discount, so the share of random fills you win is an estimate of the position. Twenty thousand random fills of a seven-row board were tried and every single one was decisive. Y is about the cleanest game there is for this trick, and the reason is one line of topology.

Notes

  • The corners count twice. The apex sits on both the left and the right edge, so a chain from the apex to the bottom row has already won — which catches people out, and caught this page’s own test out first.
  • Hex is Y in disguise. A Hex board can be embedded in a Y board, so the no-draw theorem for Y implies the one for Hex. Y is the older and simpler statement.
  • There is no drawn game to agree. Play to the last cell and somebody has won, whether or not either of you noticed it happen.
  • Bigger boards are harder for the computer, not easier — the random fill is a weaker signal when there is more board left to fill.

How to use

  1. Click a cell to claim it and try to link all three sides.
  2. Pick a board size — bigger boards are harder for the computer, not easier.
  3. Watch the corners: the apex belongs to two sides at once.
  4. There is no draw to agree, so play to the end.

Frequently asked questions

Can the game of Y end in a draw?

No, and not merely because draws are rare. A completely filled Y board cannot fail to contain a winning connection and cannot contain two. Enumerating every colouring of every board up to six rows — 2,131,008 in total — every single one has exactly one winner.

How do you win at Y?

By linking all three sides of the triangle with one connected group of your own cells. The three corners count for two sides each, so the apex is already touching both the left and the right edge, which is easy to overlook.

What are the rules of Y?

Players take turns claiming any empty cell. You win by connecting all three edges of the triangular board with a single group. There is no capturing, no passing, and no draw.

How does the computer play Y?

By filling the rest of the board completely at random a few hundred times per candidate move and playing whichever move won most often. It knows no Y strategy at all — the no-draw theorem is what makes that work, because every random fill produces a winner rather than a useless draw.

Why does Monte Carlo work so well on Y?

Because there are no draws to discard. In a game that can be drawn, most random playouts end in nothing and tell you nothing. In Y the share of random fills you win is directly an estimate of the position, so a search with no game knowledge in it plays a reasonable game.

Is Y the same as Hex?

They are close relatives, and Y is the older idea. A Hex board can be embedded in a Y board, so the fact that Y cannot be drawn implies the same for Hex. Y states the property more simply: three sides, one group, one winner.

Does the first player have an advantage in Y?

Yes, as in every connection game of this kind — moving first on a board that cannot be drawn is worth something. Across all filled boards the two colours win exactly half each, but that counts colourings rather than games, so it says nothing about play.

Does this send anything anywhere?

No. The board and the opponent both run in your browser.

🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.