Logic Grid Puzzle Generator
Generate replayable logic grid puzzles from custom categories, then verify uniqueness with solver counts, answer keys, sheets, and maps.{{ summaryTitle }}
Review puzzle inputs
{{ cleanTitle }}
{{ shapeLabel }} · {{ difficultyLabel }} · {{ clueVoiceLabel }} · Seed {{ cleanSeed }}
Use the blank grids to mark O for confirmed matches and X for ruled-out pairings. Each item belongs with exactly one item in every other category.
- {{ clue.text }}
{{ pair.title }}
| No. | Type | Category pair | Clue | Copy |
|---|---|---|---|---|
| {{ row.number }} | {{ row.typeLabel }} | {{ row.pair }} | {{ row.text }} |
| {{ header }} | Copy |
|---|---|
| {{ cell.value }} |
| Check | Value | Status | Copy |
|---|---|---|---|
| {{ row.check }} | {{ row.value }} | {{ row.status }} |
A logic-grid handout works only when its story can be reduced to a clean one-to-one matching problem. The names, rooms, times, desserts, projects, or other details may make the puzzle feel narrative, but the solving work is structural. Every item in one category must pair with exactly one item in every other category, and every clue must either confirm a pairing or rule one out.
The grid is a memory aid for deduction. A single confirmed match can remove the same item from the rest of a column, and a single exclusion can keep a tempting but wrong pairing from reappearing later. That small bookkeeping benefit becomes important as soon as the puzzle has more than two categories, because an apparently local clue can affect several pair grids after the one-to-one rule is applied.
Fairness depends on two different questions. First, does the clue set have one complete answer? Second, does the path to that answer suit the audience? A worksheet for younger students can use more direct matches and shorter labels. A puzzle-club handout can use more exclusions and category-pair clues, but it still needs wording that cannot be read two ways.
- Equal category sizes keep the matching rule consistent from the first clue to the answer key.
- Direct clues create confirmed O marks, while exclusion clues create X marks that narrow the remaining choices.
- One verified solution prevents a solver from reaching two different answer keys that both satisfy the printed clues.
- Readable labels matter because crowded cells can make a correct puzzle frustrating to solve on paper.
Logic grids fit classroom enrichment, small-group reasoning games, puzzle newsletters, and themed party handouts because they turn a short list of facts into a checkable deduction exercise. Their main limit is scale. Four categories with four items already produce many pair grids and a much larger assignment search than a three-by-three warm-up, so clarity usually matters more than adding another character, object, or time slot.
How to Use This Tool:
Start with a category set that can support one-to-one matches, then use the solver audit to decide whether the generated draft is ready to share.
- Choose a
Starter presetfor a complete 3 by 3 or 4 by 4 sample, or enter your own category lines inCategories and items. - Write each line as
Category: item, item, item. Use 3 or 4 categories, and give every category the same number of 3 or 4 items.If the setup warning names a category with too few items, add the missing item or reduce the other categories to the same count before reviewing the generated puzzle. - Set
Puzzle title,Difficulty, andClue wording. Difficulty changes the target clue count, while clue wording changes the printable voice without changing the answer key. - Enter a
Seedwhen the same puzzle needs to be recreated for a worksheet, answer key, or review copy. UseNewwhen the current clue set is valid but not the draft you want. - Open
Advancedto tuneExclusion clue mixor switch onCross-category clueswhen the clue set should connect category pairs beyond the first category.A higher exclusion mix favors X-style clues. Cross-category clues can make theConstraint Mapless concentrated on the first category. - Check
Solver Auditbefore using the puzzle.Solver resultmust be1;0or2 or moremeans the draft needs another seed, easier difficulty, or a different clue mix. - Use
Puzzle Sheetfor the solver copy,Answer Keyfor grading, andConstraint Mapto inspect how direct and exclusion clues are distributed across category pairs.
Interpreting Results:
Read the solver count before judging the clue text. A polished handout is still not usable when the audit finds no valid answer or more than one possible answer. Treat a unique solver result as the minimum check, then review wording, label length, and clue variety by hand.
| Result area | What it tells you | What to verify |
|---|---|---|
Puzzle Sheet |
The solver-facing title, categories, blank pair grids, and clue list. | Cell labels should remain readable, and every clue should fit the intended age or difficulty. |
Clue Ledger |
The clue type, category pair, printed wording, and formal relation for each clue. | Confirm that direct and exclusion clues are not so repetitive that the puzzle becomes a copying task. |
Solver Audit |
The solution count, search space, clue mix, category shape, and replay seed. | Solver result should be exactly 1. 2 or more is an ambiguity flag, not a full count. |
Constraint Map |
Direct and exclusion totals for each category pair. | A pair marked No clue may still be solved indirectly, but it deserves a manual solve-through. |
A unique answer does not guarantee that the puzzle is enjoyable, fair for a timed activity, or clear on paper. For grading, competitions, and classroom use, solve one copy exactly as the audience will see it before printing the final set.
Technical Details:
A logic grid can be modeled as a finite constraint satisfaction problem. One category acts as the anchor, and every other category is arranged as a permutation against that anchor. A completed answer is valid only when each anchor position receives exactly one item from every category and no category item appears twice.
Clues are binary constraints between two category items. A direct clue requires two items to occupy the same anchor position. An exclusion clue forbids that shared position. Counting solutions means testing assignments against the selected constraints until the solver finds no solution, one solution, or a second solution that proves ambiguity.
Formula Core:
The raw assignment count grows from the item count per category and the number of categories. With n items in each category and c categories, the anchored search space is:
For a 3-category puzzle with 3 items each, (3!)^(3-1) gives 36 candidate assignments. For a 4-category puzzle with 4 items each, (4!)^(4-1) gives 13,824 candidate assignments. Search space measures the assignment search before clues are applied; it is not a direct difficulty rating.
Rule Core:
| Rule | Boundary | Effect |
|---|---|---|
| Category count | Allowed values are 3 or 4. |
Other counts stop generation because the printed grid and solver are bounded to compact handouts. |
| Items per category | Allowed values are 3 or 4, and all categories must match. |
Uneven item counts break the one-to-one answer-key rule. |
| Difficulty | Easy adds clue support, Medium uses the balanced target, and Hard trims closer to the minimum. |
Shorter clue lists can feel more elegant, but they increase the need for audit review. |
| Exclusion clue mix | The target is rounded to 5 percent steps from 0% through 60%. |
Higher values prefer X-style clues before direct matches are added. |
| Cross-category clues | Off keeps clues tied to the first category; on allows any category pair. | Broader pair selection changes the clue distribution shown in the constraint map. |
| Uniqueness | Solver result = 1 passes; 0 and 2 or more require review. |
The answer key should be trusted only when exactly one assignment satisfies the clue set. |
Mechanism Walkthrough:
- Category text is normalized into named categories, repeated items inside a category are removed with a warning, and invalid category shapes are rejected.
- A replayable shuffle creates a hidden one-to-one assignment across all categories.
- Candidate clues are built from direct matches and exclusions that remain consistent with the hidden assignment.
- The selected clue set is tested against candidate assignments until it proves one solution or reaches the ambiguity limit of at least two possible solutions.
- The checked assignment feeds the printable sheet, clue ledger, answer key, solver audit, constraint map, and JSON view.
Reproducibility depends on the seed and the structural settings. Changing categories, item order, difficulty, exclusion mix, or cross-category behavior changes the generated puzzle. Changing only the title or clue wording affects presentation without changing the underlying answer key.
Worked Examples:
Use examples like these to decide whether the generated draft fits the solving situation, not just whether the audit passes.
Museum warm-up
Choose Museum mystery - 3 categories x 3 items with seed museum-01, Medium difficulty, and Mystery handout wording. The audit should show 3 categories x 3 items, Search space: 36 candidate assignments, and a unique solver result. That makes it a compact worksheet because the grid is small enough for a short solve-through.
Party-planner challenge
Choose Party planner - 4 categories x 4 items with seed party-44 and Hard difficulty. The search space rises to 13,824 candidate assignments, so the clue list can look concise while the reasoning load is much higher than the museum sample. If the Constraint Map shows an unclued pair, solve the sheet manually before using it as a challenge puzzle.
Uneven category repair
A travel puzzle with four travelers, four activities, and only three snacks triggers a setup warning such as "Snack" has 3 item(s); every category needs 4. Add the missing snack or reduce the other categories to three items. A mismatched category cannot produce a valid one-to-one answer key.
Advanced Tips:
- Keep item labels short when the puzzle will be printed, because every label appears across several pair grids.
- Use the same seed only when the category text and structural settings are unchanged; even a reordered item list can produce a different answer key.
- Raise
Exclusion clue mixwhen the puzzle feels too direct, then check that the final clue list still has enough confirmed matches for the intended audience. - Switch on
Cross-category clueswhen the clue ledger looks repetitive or the constraint map is concentrated on one category pair. - Treat
Harddifficulty as a draft setting, not a guarantee. The solver can prove uniqueness, but only a human solve-through can judge pacing and clarity.
FAQ:
Can a generated puzzle still be ambiguous?
Yes. The generator audits the selected clue set and flags ambiguity when it finds 2 or more satisfying assignments. Pick another seed, lower the difficulty, or adjust the clue mix before trusting the Answer Key.
Why are grids limited to 3 or 4 categories and items?
The limit keeps printed grids readable and keeps the uniqueness check responsive. A 4 by 4 puzzle already has 13,824 candidate assignments before clues are applied.
Does clue wording change the answer?
No. Plain worksheet, Mystery handout, and Classroom prompt change the phrasing of clues. The same match and exclusion relations remain behind the text.
What does the seed recreate?
The seed recreates the generated assignment and clue order when the categories, item order, difficulty, exclusion mix, and cross-category setting also match.
What should I fix when category text is rejected?
Use one category per line, keep the Category: item, item, item pattern, remove repeated category names, and make every category contain the same number of items.
Is puzzle text sent away for generation?
Generation and uniqueness checking run in the browser during normal use. The constraint chart may require the browser to retrieve a public charting asset, but the category text and answer key are not submitted to a puzzle-generation service.
Glossary:
- Answer key
- The completed one-to-one assignment across all categories.
- Candidate assignment
- One possible completed pairing arrangement tested against the clue set.
- Constraint Map
- The result view that compares direct and exclusion clue counts by category pair.
- Direct clue
- A clue that confirms two items belong together.
- Exclusion clue
- A clue that rules out one possible pairing.
- Search space
- The number of candidate assignments implied by the category shape before clues remove possibilities.
- Unique solution
- A clue set with exactly one valid answer key under the one-to-one category rule.
References:
- Puzzle-Logic Grid Puzzles, INFORMS Transactions on Education, September 25, 2014.
- LGPSolver - Solving Logic Grid Puzzles Automatically, Association for Computational Linguistics, November 2020.
- Solving Logic Grid Puzzles with an Algorithm that Imitates Human Behavior, arXiv, October 15, 2019.
- A framework for step-wise explaining how to solve constraint satisfaction problems, Artificial Intelligence, 2021.