In depth · Puzzle design

How to Make a Masyu Puzzle

Setting a Masyu is a puzzle in itself: you need a loop, pearls that pin it down completely, and a logical path a solver will enjoy discovering.

By the Masyu Puzzles editorial team·Updated

The essentials: a good Masyu has exactly one solution, can be solved without guessing, and has a satisfying order of deductions. Build it either loop-first (draw a loop, then add pearls) or pearl-first (place pearls and solve as you go), and test it with a solver before sharing.

What makes a good Masyu

  • Uniqueness. One loop, and only one. A puzzle with two solutions forces a guess somewhere.
  • Logical path. At every stage there should be at least one deduction available.
  • A clear opening. Solvers need somewhere to start — usually a corner, an edge or a distinctive pearl group.
  • A “break-in” or aha moment. The best puzzles hide one elegant deduction that unlocks the middle.
  • Economy. Few unnecessary pearls. Every pearl should matter.

Method 1: loop-first

  1. Draw a loop on graph paper. Wiggly loops with many turns and some long straights give the best material.
  2. Mark candidate pearls. A cell can hold a black pearl if the loop turns there and runs straight through the next cell in both directions. A cell can hold a white pearl if the loop goes straight there and turns in an adjacent cell.
  3. Choose a subset and try to solve it as if you’d never seen the loop.
  4. Where you get stuck, add a candidate pearl that resolves the ambiguity. Where a pearl is never used, try removing it.

This is essentially how our generator works — see how puzzles are generated. It reliably produces valid puzzles, but hand-setters often find the results less deliberate.

Method 2: pearl-first (setting by solving)

  1. Place a few pearls that create an interesting opening — for example, a corner black pearl and a pair of edge whites.
  2. Solve as far as logic allows, marking lines and ✕ as you go.
  3. When you get stuck, add one pearl that creates exactly the deduction you want next, and keep solving.
  4. Repeat until the loop is complete. Because every step was a deduction, the puzzle is unique by construction — as long as you made no mistakes.

Pearl-first setting gives you control over the solving experience. Many handmade puzzles in the Nikoli tradition are built this way.

Guaranteeing uniqueness

  • Watch for empty regions where the loop could take two routes. Add a pearl on one route to break the tie.
  • Check every long empty corridor: could the loop detour around a block of cells instead of passing straight?
  • Finally, test with a computer. Our Masyu solver reports whether a puzzle has no solution, one solution, or several — and shows an alternative loop when there are several.

Controlling difficulty

To make it easierTo make it harder
Add pearls near the borderMove key pearls to the interior
Use corner black pearls and edge white pairsRemove “free” openers
Keep redundant pearlsRemove every pearl the logic doesn’t need
Rely on local patternsRequire what-if chains or parity

Making it beautiful

Masyu’s visual simplicity makes symmetry and patterns especially striking. Setters often arrange pearls with rotational symmetry, draw letters or shapes, or create puzzles with only one colour of pearl. Constraints like these make setting much harder — and the results far more memorable.

Test and share your puzzle

  1. Open the solver, choose a size and place your pearls.
  2. Press Solve. Aim for “unique solution, found by pure logic”.
  3. Press Play this puzzle to get a link you can send to friends. They’ll get the full board with undo, timer and win detection.