Pearl (Simon Tatham's Puzzles)
Saved games stay in this browser only.
About the puzzle
Pearl asks you to draw one closed loop through the centres of the squares, moving only up, down, left and right. The loop does not have to visit every square, but it must pass through every circle, the pearls, and each kind of pearl tells you how the loop behaves there: it turns on a black pearl and goes straight on a white one.
The puzzle comes from the Japanese publisher Nikoli, where it is called Masyu. Simon Tatham wrote this version, with help from James Harvey.
Rules
- Draw a single loop that never crosses or touches itself.
- The loop passes through every pearl.
- On a black pearl the loop turns 90 degrees, and it goes straight through both squares before and after it.
- On a white pearl the loop goes straight, and it turns in at least one of the squares just before or after it.
- Squares without pearls may be used or left empty.
Controls
| Input | Action |
|---|---|
| Click on the edge between two squares | draw or erase that piece of the loop |
| Drag through squares | draw several pieces at once; drag over the loop to erase it |
| Right click on an edge | cross it out: the loop does not go here |
| Arrow keys | move the cursor |
| Enter, arrows, Enter | drag with the keyboard (Space, Escape or Backspace cancel) |
| Ctrl+arrow | toggle pieces of the loop while moving |
| Shift+arrow / Ctrl+Shift+arrow | cross out / draw the edge in that direction |
| N / U / R | new game / undo / redo |
The Preferences in the Game menu can switch to a Loopy-style display, with the loop running along the grid lines and the pearls on the corners.
How to solve it
Black pearls by the edge. A black pearl next to the edge of the grid cannot send its loop towards that edge, because the loop would need two straight squares there. So it heads the other way, and the next square out is fixed too.
White pearls in a row. Three white pearls in a line cannot all be crossed along that line, since the middle one would have no turn beside it; they are crossed at right angles instead. A white pearl on the edge runs along the edge.
Black pearls side by side. Two black pearls next to each other must point away from each other, because a black pearl cannot have a turn right next to it on the loop.
Cross out as you go. Every edge you know is not used narrows the choices. A square with only two edges left open, where the loop has to go, uses both.
Keep it one loop. Avoid closing a small loop that leaves pearls outside it. When joining two loose ends would close a loop too early, the edge between them is out.
Sizes and difficulty
The Type menu has 6x6, 8x8, 10x10 and 12x8 grids at Easy and Tricky. Custom sets any size and level, and can allow puzzles without a unique solution, which generates much faster and allows much bigger grids, but may need guessing.
Playing here
Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which you can undo to keep going on your own), the Type menu with the sizes, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back with its whole undo history the next time you open the page.
On a touch screen, drag your finger through the squares to draw the loop; turn on the Mark button above the board to cross out edges instead.
Credits and licence
Pearl is part of Simon Tatham's Portable Puzzle Collection, written by Simon Tatham with code contributed by several other authors, and distributed with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.