Puzzle Lantern
BlogBehind the games

Behind the games

How one Sudoku a day is generated and checked

6 min read

Every Daily puzzle in Puzzle Lantern is made by a program, checked by a program and put on a schedule by a program. Nobody sits down in the morning to choose a grid. Here is what happens before one reaches you.

One puzzle, one date

A Daily puzzle belongs to a date rather than to a player. Everyone who opens Sudoku on the same puzzle date gets the same grid, with the same starting digits, in the same places. That is the whole point of it being daily: when you mention it to a friend, you both saw exactly the same thing.

It also means a puzzle can be prepared well in advance. The schedule is filled ahead of time, so nothing has to be produced at midnight and nothing waits on a person being awake.

Generated, then solved again

Generation is the easy half. A grid is only useful once we know it has exactly one solution, so every candidate goes straight back to a solver before it is allowed anywhere near the schedule. If the solver finds two ways through, or none at all, the grid is thrown away and the generator tries again.

  • One solution, confirmed by solving the grid rather than by trusting the generator that produced it.
  • Enough starting digits to be worth sitting down with, so a grid that came out too sparse is rejected instead of published.
  • A check against what has already gone out, so a grid that appeared on the schedule recently is thrown back and another one is made.
53761959868634831726628419587942
Every grid on the schedule has been solved once already, to show there is exactly one way through it.

Why the Daily stays gentle

The Daily grid is generated at the easy end on purpose. It is the one puzzle everybody gets that day, so it is meant to be finishable over a cup of coffee rather than to sort people into an order. You will still meet a day that does not suit you, and that is fine. Nothing is lost by putting one down and coming back to it later.

The generator has no idea what day it is. The schedule does.

What happens when you finish

Your result for the day is saved once, when you finish the grid or when you stop. Open the game again later and you will see that result rather than a fresh puzzle, so there is nothing to be careful about and nothing to protect.

If you want another puzzle, More puzzles has an endless supply at whatever difficulty you pick. Nothing you do there touches your Daily result, your statistics or your streak. It is there to be played and then forgotten about.

Puzzle Lantern is made for entertainment. It is a collection of games, and nothing more is claimed for it.

More from the blog