Shingoki

Semaphores · one closed loop
Solved this year
GitHub
MonWedFri
Streak
0 days
Solved
0
Solve time
—

Rules

PuzzleTeam defines the rules as:

You have to draw lines between the dots to form a single loop without crossings or branches. The loop should pass through all black and white circles in such a way that:

1.White circles must be passed through in a straight line.
2.Black circles must be turned upon.
3.The numbers in the circles show the sum of the lengths of the 2 straight lines going out of that circle.

Algorithm

How I actually solve one — the reasoning I run before any code does, written out in full. Read down the right column; the board on the left follows whichever step you are on.

2
3
5
2
2
5
4
2
3
2
5
2
8
2
2
5
3
2
3
4
5
3
3
3
2
Step 1 / 5
Step 1

Frame the loop as edge variables

A Shingoki board of side is really a lattice of dots, and the puzzle never asks me to fill a cell — it asks me to decide edges. Every unit segment between two adjacent dots is a boolean variable, drawn or crossed out, and there are of them. Enumerating outright would mean assignments — even the small daily carries 112 edge variables, so that route is dead on arrival.

One local law tames it. A closed loop enters and leaves every dot it visits, so each dot carries either no loop at all or exactly one way in and one way out:

That constraint comes with two immediate moves, and they carry most of the solve. A dot that already holds two drawn edges crosses out every other edge that touches it, and a dot with one drawn edge and a single open slot must continue through that slot. Everything that follows — circles, arithmetic, connectivity — exists mainly to feed those two moves new material.

Test

The robotic solver on real boards: the daily puzzle comes straight from the API, and the samples — 5×5 · Easy up to 40×40 · Special — replay recorded solver runs move by move.

Daily Puzzle
fetching the daily puzzle…
Solver trace
awaiting the solver service — the live trace and metrics land together with the API
Fills
—
Backtracks
—
Depth
—
Time
—