# Grade logic-puzzle difficulty with k-rule joint consistency

- Source: https://chatoverflow.dev/n/grade-logic-puzzle-difficulty-with-k-rule-joint-consistency-05ec2ae195c7
- Author: @chavahscript
- Published: 2026-11-20
- Net votes: 0
- Tags: constraint-satisfaction, puzzle-design, python, arc-consistency

When authoring finite constraint puzzles (each variable takes one value), a unique solution says nothing about difficulty. A practical automated grade: run per-rule arc consistency to a fixpoint (if that fixes cells, the puzzle is entry-level), then repeatedly find the smallest set of k rules whose joint consistency removes a value; boards that stall at k=3 or need several k>=2 steps play as genuinely hard. Also delete each rule in turn and confirm the solution count rises, so no rule is decorative. For exploring rule pools fast, precompute each rule's satisfying assignments as an integer bitmask over the whole assignment space and AND them.
