Griductive is a daily deductive logic puzzle game where you play as a detective and determine who is innocent and who is a suspect using pure logic. Some people on the grid may or may not carry a clue — all of them remain logically consistent with it and everyone speaks the truth!
No guessing. No luck. Just pure deduction.
how the puzzles are made
Every Griductive puzzle makes a bold promise: you will never need to guess. Every cell can be determined through logic alone, and every puzzle has exactly one correct answer.
That's not a design goal — it's a mathematical guarantee, enforced by the same class of solver used in operations research and chip verification. This post explains how.
Why Uniqueness Matters
If a puzzle has two valid solutions, there must be at least one cell where both Suspect and Innocent satisfy all the clues. At that cell, no amount of reasoning can tell you which is correct — you'd have to guess. Guessing violates the core contract of a deduction puzzle.
So the generator doesn't just produce puzzles that happen to have one solution. It proves that no second solution exists before a puzzle is ever published.
The Five-Phase Pipeline
Each Griductive puzzle is built through a five-phase pipeline. Here's what happens at each stage.
Phase 1: Generate a Random Solution
The generator starts by creating a valid solution grid — a random assignment of Suspect and Innocent to every cell. This is the ground truth that the player will eventually deduce.
At this point, no clues exist yet. The board is just a random configuration that satisfies basic structural constraints (grid dimensions, suspect count within valid ranges).
Phase 2: Build the Clue Pool
Next, the generator exhaustively enumerates every possible clue that is true on the solution board.
Griductive has over 26 distinct clue types — counting, comparison, spatial, existential, uniqueness, connectivity, and more. For each type, the generator tests every valid parameterization against the board. A 4×4 grid can produce thousands of candidate clues. Only clues that evaluate to true on the solution are kept.
This is the raw material the generator works with: a massive pool of true statements, most of which are redundant.
Phase 3: Select a Minimal Clue Set (the Hard Part)
This is where the real work happens. The generator needs to choose a small subset of clues from the pool such that:
- The clues are sufficient — together, they constrain the solution space to exactly one valid board.
- No clue is redundant — removing any single clue would allow multiple solutions.
The generator uses a greedy constraint satisfaction approach:
- Start with no clues selected. The solution space is wide open — many boards could be valid.
- Score every candidate clue by how much it narrows the solution space. A clue that eliminates 80% of remaining possibilities scores higher than one that eliminates 10%.
- Select the highest-scoring clue and add it to the set.
- Re-solve the constraint model with the updated clue set.
- Repeat until the solver confirms that only one solution remains.
- Prune: walk through the final set and remove any clue that isn't necessary for uniqueness. This keeps the puzzle clean and avoids giving the player free information.
The result is a tight, fair clue set — enough to solve the puzzle completely, with no wasted clues.
Phase 4: Score Difficulty
With the clue set locked in, the generator scores the puzzle's difficulty on a 0–100 scale. Four factors contribute:
- Simple clue ratio (35%) — How many clues are direct counting or identity statements. More simple clues means an easier puzzle.
- Complex clue ratio (30%) — How many clues require multi-step or spatial reasoning. These demand deeper deduction chains.
- Information scarcity (20%) — How few clues are given relative to grid size. Fewer clues means less to work with.
- Grid scale (15%) — Larger grids are inherently harder to track. A 5×5 puzzle has nearly three times the cells of a 3×3.
Each clue type also has an intrinsic complexity rating based on the reasoning it demands. A clue like "Julia is a suspect" is about as simple as it gets. A clue like "Julia is the only person in row 3 with exactly 1 suspect neighbor" requires cross-referencing multiple cells and is scored much higher.
Phase 5: Generate Hints and Format Output
Finally, the generator builds the hint sequence — a recommended solving order that guides stuck players through the puzzle one logical step at a time. Hints are ordered by dependency depth: cells that can be deduced immediately come first, and cells that require long chains of prior deductions come last.
The final puzzle is packaged with all the data the game needs: metadata, clue set, hint sequence, and difficulty score.
The Solver: How Uniqueness Is Proven
At the heart of the pipeline is Google OR-Tools CP-SAT — a constraint programming solver that combines constraint propagation, integer programming, and SAT solving.
How a puzzle becomes a math problem
Each cell on the grid is modeled as a boolean variable: Suspect (1) or Innocent (0). Each clue becomes one or more mathematical constraints over those variables.
For example:
-
"There are exactly 2 suspects in row 3" becomes:
cell[3,0] + cell[3,1] + cell[3,2] + cell[3,3] = 2 - "All suspects in column A are connected" becomes: a connectivity constraint ensuring that suspect cells in column A form a contiguous chain with no gaps.
-
"Row 1 has more suspects than column B" becomes:
sum(row_1) > sum(col_B)
How uniqueness is verified
After assembling the clue set, the generator asks CP-SAT a precise question: "Given these constraints, does more than one valid assignment exist?"
CP-SAT doesn't just find a solution — it can enumerate all solutions. If the solver finds exactly one, the puzzle is valid. If it finds two or more, the generator goes back to Phase 3 and adds another clue.
This is a formal proof, not a heuristic. CP-SAT exhaustively explores the entire solution space. If it says there's one solution, there is exactly one — period.
Why not just brute-force it?
A 5×5 grid has 25 cells, each with 2 possible values. That's 2²⁵ = 33 million possible boards. Brute-forcing all of them is slow and doesn't scale.
CP-SAT is dramatically faster because of constraint propagation: when a clue says "row 3 has exactly 2 suspects," the solver immediately reduces the search space for every cell in row 3 without checking each combination individually. Complex clues compound this effect. In practice, CP-SAT proves uniqueness for a 5×5 puzzle in milliseconds.
What Could Go Wrong (and How We Prevent It)
"What if a clue is ambiguous?"
Every clue type has a formal mathematical definition. "Neighbors" always means the up-to-8 surrounding cells including diagonals. "Connected" always means a contiguous chain of adjacent cells. "Between" always means cells in the same row or column, excluding endpoints.
These definitions are built directly into the constraint model — there's no natural language interpretation step where ambiguity could creep in. The in-game Clarifying Details reference shows players exactly what each spatial keyword means.
"What if the solver has a bug?"
The CP-SAT solver is a well-tested, widely-used tool maintained by Google's optimization team. But we don't rely on trust alone. Every generated puzzle is independently verified:
- An automated solver attempts to solve every puzzle step-by-step, simulating a human player. If it can't reach a complete solution through logical deduction alone, the puzzle is rejected.
- Hint soundness checks verify that each hint in the sequence is logically valid — that the hinted cell is genuinely deducible from the clues and previously revealed cells, not from hidden information.
"What if clue generation misses edge cases?"
Each clue type has a formal evaluation function that is tested against known puzzle configurations. The clue pool generation phase only includes clues that evaluate to true on the actual solution — a clue that's false on the solution can never appear in the puzzle.
The Result
When you open a Griductive puzzle, here's what has already happened:
- A random solution was generated.
- Thousands of candidate clues were evaluated against it.
- A minimal, non-redundant subset was selected.
- A formal solver proved that exactly one solution satisfies those clues.
- An automated solver independently verified that the puzzle is solvable through pure deduction.
- A difficulty score was computed and a hint sequence was generated.
Every puzzle, every day, across all four grid sizes. No exceptions.
The promise holds: if you're stuck, there's a clue you haven't fully used yet. If you think two answers are possible, re-read the clues — the logic will resolve it. And if you want proof, the Logic Graph will show you the exact deduction chain from clues to solution.
What's Next: Clues That Tell a Story
Right now, Griductive's clues read like precise logical statements — clear and unambiguous, but admittedly a bit clinical. "There are exactly 2 suspects in row 3" gets the job done, but it doesn't exactly make you feel like a detective on a case.
We're actively working on changing that. The goal is to diversify how clues are expressed — weaving in thematic flavor while preserving the same underlying logical precision. Imagine clues tied to holiday events, or framed as witness testimony from a specific crime scene. Instead of a sterile formula, you'd read something that feels like an actual piece of evidence from an investigation.
The key constraint hasn't changed: every clue must remain consistent, unambiguous, and formally verifiable. The solver doesn't care whether a clue sounds like a math textbook or a noir detective novel — it only cares about the logical content. That separation is what makes richer expression possible without compromising correctness.
Same guarantees. Same rigor. But puzzles that feel less like equations and more like cases worth cracking.
No guessing. No luck. Mathematically guaranteed.


Top comments (0)