Skip to content

Masyu Puzzle

Trace one orthogonal loop through black and white pearls while satisfying each pearl's precise turn and straight-line rule.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Press Space or Enter on the black pearl to start the loop, then extend it with the arrow keys.
  2. 2.Pass straight through white pearls with a nearby turn; turn on black pearls and keep both adjacent arms straight.
  3. 3.Return to the starting pearl without revisiting another cell, then use Restart to replay or Escape twice for the boss screen.

About Masyu Puzzle

Masyu Puzzle is a compact four by four version of Nikoli's pearl loop puzzle. Your goal is to draw one closed, non-branching loop through every marked pearl. The route moves only between orthogonally adjacent cells, cannot cross or revisit itself, and must return to its starting cell. Black and white pearls impose different local constraints, so a route that merely touches every clue is not necessarily correct.

On a white pearl, the line must pass straight through the pearl and must turn in at least one of the immediately neighboring cells. On a black pearl, the line must turn on the pearl and then continue straight through both immediately neighboring cells. These behaviors follow Nikoli's published rules and are independently cross-checked against Puzzler's Masyu guide. The board layout, compact perimeter solution, keyboard controls, and score are Lizely product choices.

Press Space or Enter to begin on the selected cell, then use the arrow keys to extend the line one cell at a time. The fixed board starts on a black pearl in the upper-left corner, with a white pearl immediately to its right. A clean route travels across the top, down the right edge, across the bottom, up the left edge, and closes at the start. That takes twelve accepted steps and earns 880 points from a starting score of 1,000.

The browser validates every accepted movement. Leaving the grid does nothing. Entering a body cell that is already part of the route creates a detected dead end because a simple loop cannot reuse that cell. Returning to the start closes the route; if the pearl rules or route structure are wrong, the closed route is reported as invalid and cannot be extended. Restart restores the original cursor, empty path, score, and status.

Completion requires orthogonal adjacency throughout, unique body cells, every pearl on the route, a straight passage with a neighboring turn at the white pearl, and a turn with two straight arms at the black pearl. The automated completion test performs all twelve arrow steps and asserts the final score and solved state. A separate short square proves that an invalid premature loop is detected rather than celebrated.

The board is an accessible CSS grid, not a canvas. Every cell announces its row, column, pearl type, selection, and path membership. The active cursor has a visible outline, and path markers, borders, surfaces, warnings, and clue colors use the site's CSS variables. There is no downloaded art, pointer-only gesture, audio, timer, random service, hardware access, or server-side game state.

A completed best score may be stored only in this browser's localStorage. It is not uploaded or attached to an account. Press Escape twice within 400 milliseconds to reveal the shared simulated spreadsheet boss screen, then repeat the double press to return to the unchanged puzzle. Use Masyu for a short logic break, not as a measure of cognitive ability. For related deduction games, try Shingoki, Heyawake, Hitori, or Pipes.

Methodology & sources

The browser stores the path as ordered 4×4 cell indices. Each extension must have Manhattan distance one and may revisit only the starting index to close. Closure checks unique body cells, clue coverage, collinearity around the white pearl, a neighboring white-pearl turn, a black-pearl turn, and straight cells on both black-pearl arms. Score is max(0, 1000 − 10×accepted steps).

Frequently asked questions

What is the difference between black and white pearls?
The route turns on a black pearl and continues straight on both sides. It goes straight through a white pearl and turns immediately before or after it.
Can the loop cross or reuse a cell?
No. This board represents one simple orthogonal loop, so every body cell is used at most once and only the starting cell is revisited to close it.
Is the board randomly generated?
No. It uses a disclosed fixed four by four fixture so keyboard completion and pearl-rule validation are reproducible.
How is the score calculated?
The score starts at 1,000 and subtracts ten for each accepted path step. The clean twelve-step solution scores 880.

Mini Games guides

View all