Play Heyawake Online

Shade cells inside rectangular rooms. No two shaded cells may touch, all white cells must stay connected, and no straight white line may cross three or more room boundaries!

Created by Brian Hamilton

Shaded
0
Rooms
0
Time
0:00

Tap a cell to shade it — tap again to unshade

How to play Heyawake

The grid is divided into rectangular rooms. Shade some cells so that all four rules hold at once.

  • A room showing a number contains exactly that many shaded cells. Rooms with no number can hold any amount.
  • No two shaded cells may share an edge (touching at a corner is fine).
  • All unshaded cells must form one connected group, joined edge to edge.
  • A straight horizontal or vertical run of unshaded cells may pass through at most two rooms.
  • Every puzzle has exactly one solution.

Controls: tap a cell to shade it, tap again to clear it. Use Check to test your work and Solution to reveal the answer.

Four rules, and only one of them is about the numbers

Heyawake gives you a grid cut into rectangular rooms, and asks you to shade some cells. A number in a room says exactly how many of its cells end up shaded. That much looks like every other number puzzle — but the number rule is the only one that mentions numbers, and it is not the one that does most of the work.

The other three apply everywhere at once: no two shaded cells may share an edge; every unshaded cell must connect to every other through unshaded neighbours; and no straight run of unshaded cells may pass through three rooms.

A Heyawake puzzle as it starts A grid divided into rectangular rooms by heavy lines. Some rooms show a number. No cells are shaded yet: working out which ones to shade is the puzzle.
A board as it starts. Heavy lines are room walls; only some rooms show a number.
The solved Heyawake grid The same grid solved. Each numbered room holds exactly that many shaded cells, no two shaded cells share an edge, every unshaded cell connects to every other, and no straight run of unshaded cells passes through three rooms.
Solved. Every numbered room holds exactly that many shaded cells, no two shaded cells touch, and the unshaded cells form one connected region.

The rule that carries the puzzle

The three-room rule is the one worth internalising, because it constrains cells that no number is anywhere near. A horizontal or vertical run of unshaded cells may touch at most two rooms. Reach a third and the run is illegal, so something in it has to be shaded.

A white run may not pass through three rooms A grid of six two-by-two rooms. The highlighted row runs unshaded from edge to edge, passing through three rooms, which the rule forbids. Shading any one cell in that row breaks the run into two shorter ones and fixes it.
The highlighted row runs unshaded through three rooms, which is not allowed. Shading any one of its cells splits it into two shorter runs and fixes it.

This is not an occasional constraint. On these boards 58% of all unshaded runs sit exactly at the two-room limit — one cell away from breaking the rule. Any time you extend a white corridor, that is the rule you are about to run into.

Start with the zeros

A room numbered 0 is the best opening move in the game: every cell in it is unshaded, immediately and without reasoning. They are common — 37% of the numbers on a board are zeros, and 99% of boards have at least one.

A zero room is worth more than the cells it settles. A block of guaranteed-white cells is exactly what the three-room rule bites on, so zeros usually force shaded cells in the rooms around them. Clear every zero first, then look at what those white blocks now forbid.

Every number shown, across 90 generated boards (1,259 numbers in total).
Number in the room 01 2
Share of numbers 37%56%7%

There is no 3 in that table, and that is not an accident of sampling. Rooms here run to four cells at most, and a four-cell room cannot hold three shaded cells without two of them touching. The largest number you will ever see on these boards is 2.

Rooms are smaller than they look

Rooms average 2.4 cells, and 30% of them are a single cell. A one-cell room showing 1 is simply a shaded cell handed to you; showing 0, an unshaded one.

Small rooms are also why a second pattern is so common. If a room is numbered at the most it could possibly hold — a two-cell room showing 1, a four-cell room showing 2 — then the shaded cells can only sit one way, because any other arrangement makes two of them touch. 34% of the numbers on a board are at their room's capacity, and 99% of boards have at least one. Those rooms solve themselves the moment you spot them.

So the opening is nearly mechanical: fill in every 0 room as white, fill in every room numbered at its capacity, and only then start reasoning. Between them those two patterns cover roughly seven of every ten numbers on the board.

Where solvers get stuck

Treating unnumbered rooms as empty. A room with no number is not a room with no shaded cells — that is what a 0 means. Unnumbered rooms are constrained only by the other three rules, and on Hard boards roughly three rooms in four carry no number at all. Most of the grid is solved without a single number nearby.

Shading right up to the number. Filling a room to its count is only half the job; the arrangement has to leave the white cells connected. A shaded cell that seals off a pocket of white is wrong even when every room count is correct.

Forgetting that shaded cells are scarce. Only about 29% of the grid ends up shaded, and none of them touch. If a line of reasoning is asking you to shade half a region, it is the reasoning that is wrong.

Two things you can check about these puzzles

Every puzzle has exactly one solution. This was emphatically not true before. Numbers went on a fixed share of rooms — 75% on Easy, 55% on Medium, 35% on Hard — with nothing checking what that left behind. Measured against an exhaustive counter, 0 of 36 boards had a single solution. Every one had three or more, while the page promised “a unique solution solvable with logic alone”.

Numbering every room did not help either: still 0 of 30. The rooms themselves were the problem. They averaged 12.5 cells on a 10×10 board, where six published Heyawake puzzles average 2.1 to 2.8. Rooms that big constrain almost nothing, so no amount of numbering pins the grid down. Rooms are now built fine (2.4 cells), the shading comes from a real solver rather than a repair pass, and numbers are removed one at a time only while the solution count stays at exactly one. 51 boards across every size and difficulty were then re-checked against a separate counter written from the rules alone; all 51 were unique.

The board you are given is a legal board. That also needed fixing. The old generator had a fallback for when its main routine failed, and the fallback returned a grid with nothing shaded — whose white rows ran through four to seven rooms, breaking the very rule the page explains. On 14×14 Hard the main routine failed every single time, so that illegal blank grid was 100% of what that size ever served. The fallback is gone, 14×14 with it, and nothing now reaches the screen without passing the rule checker.

Proving a board unique is also why there is a progress bar, and why the largest grid here is 9×9. A 7×7 lands in a fraction of a second and a 9×9 in about five, but 10×10 could not be built inside a sensible wait at all: a third of attempts ran past thirty seconds and gave up. Better to offer three sizes that always work than a fourth that sometimes fails.

Heyawake and its neighbours

Heyawake is Nikoli's, and the name means roughly “divided rooms”. It shares its shading mechanic with Nurikabe and Hitori, but it asks something they do not.

In Nurikabe the numbers anchor regions and the shaded cells are the background between them. In Hitori the constraint is duplicate digits in a line. Heyawake's rooms are drawn before you start and never change — they are not something you deduce, they are the board — and the rule that matters most is about how far a white corridor may travel across them.

More shading puzzles

If you like deciding which cells to fill in, try these:

Puzzle Solved!