PlayPendium

Roomshade · Food for Thought

Four Rules That Interlock

Every Roomshade puzzle rests on four constraints that work together to produce a single, unavoidable solution.

The Architecture of Constraint

A Roomshade puzzle begins as an empty grid, partitioned into rectangular rooms by bold lines. Some rooms carry a number, others remain blank. The player's task is to shade exactly the right number of cells in each numbered room while obeying three additional constraints that extend across the entire board. These four rules, the per-room count, the adjacency restriction, the connectivity requirement, and the line-spanning limit, do not operate in isolation. They form an interlocking system where satisfying one rule often creates the conditions necessary to satisfy another, and violating any single one renders the puzzle invalid.31

The elegance of this design lies in how each rule constrains the others. The per-room count rule operates locally, governing only cells within a single room's boundaries. The adjacency rule also operates locally but creates relationships between neighboring rooms. The connectivity rule operates globally, requiring the entire white region to form a single continuous path. The line-spanning rule operates along straight lines that may cross multiple rooms. Together, these constraints create a puzzle where local deductions cascade into global conclusions, and where the solution emerges not from guessing but from recognizing how the rules interlock to eliminate every possibility except one.3

Four rules, one solution.

The Per-Room Count Rule

The first and most immediately visible rule states that a room with a number must contain exactly that many shaded cells. This is the puzzle's primary clue mechanism, the information the player receives about each room's interior. A room of size three with a clue of two requires exactly two shaded cells and one white cell. A room of size six with a clue of three requires three shaded cells and three white cells. An unlabeled room imposes no such constraint, though the adjacency rule still caps it: it may hold anything from zero shaded cells up to the most its cells can take without two of them touching, which for a rectangle is half its cells rounded up.3

This rule alone is insufficient to solve most puzzles. A 3×2 room with a clue of two, for instance, can have its two shaded cells arranged in fifteen different ways. The rule provides local information but leaves significant ambiguity. However, this ambiguity is precisely what the other rules resolve. The adjacency rule, connectivity rule, and line-spanning rule each eliminate certain arrangements that would otherwise be permissible under the count rule alone. The count rule sets the stage; the other rules determine which actors may appear.3

The Adjacency Restriction

The second rule prohibits any two shaded cells from being orthogonally adjacent. Two shaded cells may never share an edge; they may touch only diagonally. This rule creates a spacing requirement that propagates across room boundaries. When a cell is shaded, it immediately forbids shading its orthogonally adjacent neighbors, regardless of whether those neighbors belong to the same room or an adjacent room. This creates a ripple effect: shading one cell can eliminate possibilities in neighboring rooms, which in turn can force other cells to be shaded or white.1

The adjacency rule is particularly powerful when combined with the per-room count rule. Consider a 1×3 room with a clue of two. Two shaded cells may not sit side by side, so they must take the two ends and the middle cell must stay white: the count rule fixes how many, and the adjacency rule fixes which. Conversely, consider a room where only one cell may be shaded. The adjacency rule constrains which cells in neighboring rooms may be shaded, since shading a cell adjacent to the single shaded cell would violate the rule. This interplay between the count rule and the adjacency rule is where much of the puzzle's deduction begins.3

Shading one cell forbids its orthogonal neighbors.

The Connectivity Requirement

The third rule demands that all white cells form a single orthogonally-connected region. This means that from any white cell, one can reach any other white cell by moving only orthogonally through white cells. This rule operates globally across the entire board, making it one of the most powerful constraints in the game. It prevents the white region from fragmenting into isolated pockets, which could otherwise occur when a ring of shaded cells happens to fence a pocket of white cells off from the rest of the board.3

The connectivity rule becomes especially critical in the later stages of puzzle solving, when most cells have been determined and the remaining question is whether the white cells form a single connected region. It can force certain cells to be white even when the adjacency rule would permit them to be shaded. For instance, if shading a particular cell would isolate a group of white cells from the rest of the board, that cell must be white. This rule transforms local decisions into global consequences, requiring the player to maintain an awareness of the entire board's white structure while making individual cell determinations.3

The Line-Spanning Limit

The fourth and most subtle rule states that no straight horizontal or vertical line of connected white cells may span three or more rooms. A straight run of white cells may cross at most one room border, meaning it may contain cells from at most two rooms. This rule operates along straight lines that cut across room boundaries, creating a constraint that is invisible until one examines the board's horizontal and vertical lines.1

This rule is particularly effective at eliminating certain configurations that would otherwise satisfy the first three rules. A long horizontal run of white cells crossing two room boundaries, for example, would violate this rule even if the cells are properly spaced according to the adjacency rule and belong to rooms with correct counts. The rule forces white cells to be interrupted by shaded cells at strategic points along their lines, creating the visual pattern of white cells that appear to be segmented by the shaded cells that separate them.3

How the Rules Interlock

The true power of Roomshade emerges from how these four rules work together. The per-room count rule provides the initial information but leaves many arrangements possible. The adjacency rule eliminates certain arrangements by forbidding orthogonally adjacent shaded cells. The connectivity rule eliminates arrangements that would fragment the white region. The line-spanning rule eliminates arrangements that create white lines crossing too many rooms. Each rule eliminates a different subset of possibilities, and together they eliminate all but one arrangement, the unique solution.3

This interlocking creates a puzzle where the solution cannot be found by satisfying rules in isolation. A cell might be permissible under the count rule and the adjacency rule but forbidden by the connectivity rule. Another cell might satisfy the adjacency rule but create a white line that violates the line-spanning rule. The player must constantly check all four rules simultaneously, recognizing that a deduction based on one rule may create new possibilities or constraints under another rule. This is the essence of the puzzle's deduction: following the consequences of each rule as they propagate through the entire board.3

Every rule constrains every other rule.

Grid Sizes and Room Dimensions

Roomshade puzzles come in three standard sizes: small (5×5), medium (6×6), and large (7×7). These dimensions affect the complexity of the puzzle but not the rules themselves. A 5×5 grid contains fewer cells and rooms than a 7×7 grid, so the solution typically requires fewer deduction steps. However, the fundamental structure of the puzzle remains the same regardless of size.3

Each room is a rectangle with dimensions between one and three cells in each direction. This creates rooms ranging from 1×1 single cells to 3×3 nine-cell rooms. The room dimensions affect the application of the rules in interesting ways. A 1×1 room with a clue of one must be shaded; a 1×1 room with a clue of zero must be white. A 3×3 room with a clue of five requires five shaded cells and four white cells, and the adjacency rule leaves exactly one way to place them: the four corners and the center. The room dimensions, combined with the clue values, create the initial conditions from which the rules must produce the unique solution.3

Shown and Blanked Clues

Some rooms display their clue number, while others are blank. A blank clue indicates that the room has no per-room count constraint, the room may contain any number of shaded cells, from zero up to the most its cells can take without two of them touching. Blank rooms still obey the adjacency rule, the connectivity rule, and the line-spanning rule, but they do not contribute a numerical constraint to the puzzle.3

The presence of blank rooms adds a layer of complexity to the puzzle. Without a numerical constraint, the player must determine which cells to shade in blank rooms based entirely on the other three rules. This requires careful analysis of how shading cells in blank rooms affects neighboring rooms and the global white structure. Blank rooms can serve as connectors between numbered rooms, allowing white paths to flow between them, or they can be filled with shaded cells to block unwanted white lines. The interplay between blank and numbered rooms is a key element of Roomshade's design.3

From Local to Global Deduction

The beauty of Roomshade lies in how local deductions cascade into global conclusions. A shaded cell in one corner of the board can, through the rules' interlocking effects, determine the state of cells many rooms away. The adjacency rule propagates locally, forbidding neighbors of shaded cells. The connectivity rule propagates globally, requiring the entire white region to remain connected. The line-spanning rule propagates along straight lines, forbidding white runs that cross too many rooms.1

This propagation creates a puzzle where the player must constantly update their understanding of the board as new information becomes available. A cell that was once ambiguous may become forced when a neighboring cell is determined. A room that appeared to have multiple valid configurations may be reduced to a single arrangement when the connectivity rule is applied. The solution emerges not from a single insight but from the cumulative effect of applying the four rules repeatedly until every cell is determined.3

The rules are the puzzle's logic engine.

The Deterministic Nature of the Solution

Every Roomshade puzzle has exactly one solution. This uniqueness is not accidental but is guaranteed by the puzzle's construction. The backtracking solver used to generate puzzles verifies that only one shading satisfies all four rules. This deterministic nature is essential to the puzzle's design: if multiple solutions were possible, the puzzle would be considered invalid. The player's task is to discover the unique solution through deduction, not through guessing.3

The deterministic quality of the puzzle means that every valid deduction must be certain. If a cell can be determined to be shaded or white through the rules, then it is shaded or white in the unique solution. If a cell's state cannot be determined without guessing, then the puzzle is either unsolved or the player has not yet found the correct deduction. This quality distinguishes Roomshade from puzzles that rely on trial and error; every cell's determination must follow logically from the rules and the information already established.3

Sources & notes

  1. "Heyawake," Wikipedia, a binary-determination logic puzzle published by Nikoli, first appearing in Puzzle Communication Nikoli #39 in September 1992; the Japanese name means "divided rooms," the grid being divided into variously sized rectangular rooms by bold lines; a number in a room indicates exactly how many painted (shaded) cells it must hold; painted cells may never be orthogonally connected and all the white cells must be interconnected; and a straight line of connected white cells may not contain cells from more than two rooms. en.wikipedia.org/wiki/Heyawake.
  2. "Nikoli (publisher)," Wikipedia, a Japanese publisher specializing in games and, especially, logic puzzles, established in 1980 by Maki Kaji; its Sudoku, the most popular logic problem in Japan, was popularized in the English-speaking world in 2005; it is notable for a vast library of "culture-independent" puzzles focused on logic rather than language; and it has invented or introduced many puzzle genres, including Slitherlink, Nurikabe, Heyawake, and Masyu. en.wikipedia.org/wiki/Nikoli_(publisher).
  3. Roomshade game engine: a Heyawake realization on a rows×cols grid partitioned into axis-aligned rectangular ROOMS, enforcing four rules: (1) a room with a number holds EXACTLY that many shaded cells (unlabeled rooms are free); (2) no two shaded cells are orthogonally adjacent; (3) all unshaded (white) cells form one orthogonally-connected region; and (4) no horizontal or vertical straight run of white cells may span three or more rooms; sizes are small (5×5), medium (6×6), and large (7×7) with rooms of dimension 1–3 and a clue that is either the shaded count or blank; the grid is partitioned by a greedy randomized fill, and a backtracking solver both fills a valid solution and verifies the puzzle's uniqueness, all pure and seeded-deterministic. Read from the game's own source.
  4. Further reading on Heyawake: Markus Holzer and Oliver Ruepp, “The Troubles of Interior Design–A Complexity Analysis of the Game Heyawake,” in Fun with Algorithms (FUN 2007), Lecture Notes in Computer Science; the analysis behind the result that deciding whether a Heyawake instance has a solution is NP-complete. doi.org.
Was this worth reading?
Play Roomshade
PlayPendium · About · Contact · Privacy · Terms · Cookies · Accessibility · Copyright · Browse all games · Classic arcade games · © 2026