Gokigen Naname is a Japanese puzzle game played on a square grid in which numbers in circles appear at some of the intersections on the grid.
The objective is to draw diagonal lines in each cell of the grid, such that the number in each circle equals the number of lines extending from that circle. Additionally, it is forbidden for the diagonal lines to form an enclosed loop.
The first figure shows the start position of a puzzle. The second figure shows the solution to the same puzzle. A
Gokigen Naname puzzle always has exactly one solution.