Free-tile state reference

Blocked-Tile Diagnostics for Mahjong Turtle

A visible face is not necessarily selectable. Mahjong Turtle evaluates geometry in two stages: no present tile may overlap it from a higher layer, and at least one horizontal side must be open on its own layer.

This guide distinguishes four states with actual Turtle position IDs. The examples explain why a one-side neighbor is compatible with freedom, why cover wins even when a side is open, and how one move can change several blocker records at once.

Four diagnostic states

The first three rows describe the untouched Turtle geometry. The final row is the state change after removing pair 29–143.

Coordinate-checked free-tile states in the Turtle layout
StateExample positionGeometry checksSelectable?
Covered from aboveID 139 at (12,6,3)ID 143 at layer 4 overlaps it; left side open, right side occupiedNo — cover alone blocks it
Both horizontal sides blockedID 1 at (6,0,0)No covering tile; neighbors at x=4 and x=8 on layer 0No — both sides are occupied
Exactly one side blockedID 0 at (4,0,0)No cover; left side open, neighbor ID 1 on the rightYes — one open side is enough
Newly unlockedID 28 at (22,4,0)Before: both sides occupied. After removing ID 29: right side opensYes after pair 29–143

Check cover before judging the sides

Tile 139 sits on layer three at coordinate 12,6. In the initial Turtle state, the layer-four cap tile 143 overlaps its two-by-two footprint. Its left side is geometrically open and its right side has a same-layer neighbor, but the open side cannot make it free while the cap remains.

The implementation checks every present higher-layer position for overlap, not merely a tile with the same center coordinate. This matters around half-tile offsets such as the centered cap, which overlaps all four tiles of the two-by-two layer beneath it.

The rule as a diagnostic decision tree

Only the final branch returns a free tile.
Higher-layer footprint overlaps this tile?
  yes -> BLOCKED (side state cannot override cover)
  no  -> Are both same-layer horizontal sides occupied?
           yes -> BLOCKED
           no  -> FREE (zero or one side may be occupied)

Derived from the implemented isFree geometry test

Vertical neighbors do not participate in the side test. Only positions on the same layer, within the same row overlap band, and exactly one tile-width to the left or right count as side blockers.

A tile with one occupied side is not a special exception; it is the ordinary free state at most row ends. Tile 0 demonstrates it with the left side open and tile 1 immediately to its right.

Both sides blocked without any cover

Tile 1 at coordinate 6,0,0 has no higher-layer overlap in the initial state. Tile 0 occupies x=4 and tile 2 occupies x=8 on the same row and layer. Because both horizontal tests are true, tile 1 is blocked even though its whole face can be seen.

Removing tile 0 alone would open tile 1's left side. Whether that can happen depends on finding a legal match for tile 0; geometry determines availability, while the face assignment determines which available tiles can form a pair.

Five positions unlocked by one opening

On seed 20260614, tiles 29 and 143 are a legal pair of 6 of characters. Removing them changes these positions from blocked to free.

Blocker transitions after removing tile IDs 29 and 143
TileBefore removalAfter removalChanged condition
28 (22,4,0)Both sides blockedLeft blocked, right openBase neighbor 29 removed
139 (12,6,3)Covered by 143Right blocked, left openCap cover removed
140 (14,6,3)Covered by 143Left blocked, right openCap cover removed
141 (12,8,3)Covered by 143Right blocked, left openCap cover removed
142 (14,8,3)Covered by 143Left blocked, right openCap cover removed

Use Learn Mode as a state explanation

When a selected tile is blocked, Learn Mode reports cover, both sides, or both categories together and highlights relevant positions. After a successful move, it compares the before and after free sets and reports the newly unlocked IDs.

The message is a snapshot of the current state. If an earlier removal changed a neighbor or cover relationship, the same coordinate can produce a different explanation. Replay Same Board resets the full position and is the reliable way to repeat a diagnostic.

Common reading errors

Do not infer freedom from face visibility, do not require both sides to be open, and do not treat a vertical edge as a horizontal side. Also distinguish a tile becoming uncovered from it becoming free: once cover disappears, both side blockers can still keep it unavailable.

  • Covered plus one open side is still blocked.
  • Uncovered plus one open side is free.
  • Uncovered plus both sides occupied is blocked.
  • Newly uncovered and newly free are different measurements.

Related learning