View: Multi-Page Single Page

The Generator window

Open it from Window ▸ Living Failure ▸ Simple States ▸ Puzzle Generator (also under right-click Create ▸ Simple States). Settings on the left — they switch with the Mode dropdown — and the result set with its full analysis on the right. Both panes scroll; Generate and Save stay pinned.

  • Mode — Classic, Ordered, Lights Out, or Trilight. The dials below adapt.
  • Generate / Batch count (1–20) — make one or many; results append to the set behind a progress bar (cancellable).
  • Clear on generate — replace the set each click instead of appending.
  • Only unique — browse just the single-solution boards.
  • Auto (Classic) — tune rule shape and solution sizes to a verify-friendly combo for the current states/switches.
  • Presets / Reset — recommended combos per mode, or back to defaults.
  • Save ▸ Current / Pack (all) / Pack (unique only) — write one puzzle asset or a pack via a native Save dialog. The demo's pack slots take packs.
GuardrailsImpossible combos warn before you generate — e.g. a unique solution with no dummy switches forces the solution to use every switch, and requiring traps with Dummy switches = None can never match (traps count as decoys).

Reading the analysis pane

Every generated or saved board shows the same pane (window and inspectors):

  • Verdict — solvable / solution count / unique / shortest / 1–5★.
  • Best solution — the shortest switch set or sequence, and a path preview: board states press by press.
  • Switch rules — readable sentences ("Switch 1 opens State 2 and State 4"; ordered rules list their conditions and effects).
  • Switch roles — required (in every solution), optional, dummy (in none).
  • All solutions — every valid set / shortest sequence, sorted.
  • Diagnostics — states-per-switch spread, overlap states, dominant switches, isolated states, duplicate rules.
  • Rule matrix — switches × states at a glance. Grid boards swap the matrix for a board grid: lit cells plus dots on the best solution's presses (Lights Out), or value digits 0/1/2 on dark/dim/bright cells with press-count badges (Trilight) — and a Target grid whenever the goal isn't the classic one.
  • Generation report — attempts used, rule/quality rejects, and whether your constraints matched or the best fallback was kept.

Verify & Re-roll saved assets

Select a saved StatesPuzzleAsset or StatesPuzzlePack in the Project window. The inspector shows the analysis pane (packs add a puzzle browser) and action buttons:

  • Verify (single) · Verify ▸ Current / All (pack) — re-run the solver and refresh the stored summary. Re-imported or hand-edited boards are easy to audit.
  • Re-roll (single) · Re-roll ▸ Current / Multiple-solution (pack) — regenerate a slot from its own stored settings, then replace it. Multiple-solution retries every non-unique entry in one click.
  • Undo / Redo — every verify and re-roll is undoable (buttons, or Ctrl+Z / Ctrl+Y).
TipRe-roll changes the board (it generates a new one). To keep a layout and only re-check it, use Verify instead.

Classic mode

Each switch toggles (XORs) a set of states; the player presses a subset of switches and order never matters. The generator rolls rule sets and keeps boards that match your constraints; the exact solver enumerates every subset (or solves by GF(2) beyond 16 switches), so the solution count is ground truth.

  • Solution styleSingle (exactly one valid combination — premium levels), Few (a handful), Many (lots; easier).
  • Dummy switches — decoys that appear in no solution: None / Allow / Require.
  • Rule shape — min/max states per switch, and Require overlap: how many states must be shared by 2+ switches. Overlap is the source of deduction — switches that fight over the same states.
  • Advanced filters — forbid single-state switches (trivial), all-state switches (dominant), and duplicate rules (interchangeable switches).
  • Target shortest — pin the shortest solution to an exact size.
Design noteA unique solution with no dummy switches forces the solution to use every switch — any unused switch would be a dummy by definition. For unique boards that don't use everything, allow dummies.

Ordered mode

Switches carry conditions over board states and effects that turn states on — so switches only fire in sequence: turning one state on makes the next switch in the chain pressable. The solver runs breadth-first search over board states and reports every shortest sequence. Decoy switches (idempotent — they never help) hide the chain; the solution-size window sets the sequence length.

Availability is honest at play time: the demo highlights switches whose press would actually change something right now, and blocked presses report why.

Traps (Ordered)

Without traps, an ordered board can be beaten by "press whatever glows" — no wrong tries. The Trap switches policy (None / Allow / Require) adds decoys that are gated on a mid-chain state and re-lock it when pressed: a wrong press undoes progress, and the player has to turn the state back on.

Every trapped board is verified deadlock-free: an exhaustive check proves the goal remains reachable from every state the player can reach. Wrong presses cost work — never the win.

GuardrailTraps count as decoy switches, so Trap switches = Require needs Dummy switches set to Allow or Require — the window warns if they conflict.

Lights Out

A width × height grid (2–8 each, up to 56 cells) where every cell is a light and a button: pressing flips it plus its orthogonal neighbours. The default goal is lighting every cell — see Pattern goals for blackout and painted targets.

  • Solvable by construction — the start is scrambled backwards from the solved board by pressing random distinct cells, so a solution always exists.
  • True shortest — the GF(2) solver finds the exact minimum press count; the board is accepted when it lands in your solution-size window (or hits Target shortest exactly).
  • Scramble presses — how many cells the scramble presses (0 = drawn from the window). The best solution can never need more than this.
Why order never mattersPresses are XOR — they commute, and pressing a cell twice cancels. That's what makes exact solving (and honest difficulty) possible on every board.

Pattern goals (Lights Out & Trilight)

The grid target doesn't have to be "all lit". The Goal dropdown picks:

  • All Lit — the classic goal (Trilight: every cell to full bright).
  • All Dark — blackout: turn everything off.
  • Pattern — a click-to-paint grid appears: gold cells must end lit (Trilight: full bright), the rest dark. Fill / Clear / Invert buttons included; an empty pattern is the same as All Dark.

Any goal is solvable by construction — the start is scrambled backwards from the target itself, so the guarantee never weakens. The goal is stamped into the saved puzzle; the demo marks target cells with dots on the board and adapts its objective and counter.

Trilight (mod-3)

The three-state grid: cells cycle off → dim → bright, pressing bumps a cell and its orthogonal neighbours one step, and bright wraps to off. Because presses add +1 mod 3, pressing a cell twice is meaningful and three times cancels — the solution is which cells to press once and which twice.

  • Solvable by construction — scrambled from the solved board, cells pressed once or twice.
  • Exact math — linear algebra over ℤ₃: exact counts (3^nullity), true shortest, roles. Cross-checked against brute force in the test harness.
  • Solution size window — counts total presses (a twice-pressed cell counts twice), capped at cells × 2.
  • Pattern goals apply — painted cells mean "full bright", unpainted "off".
Reading Trilight analysesSolutions list cells by tag — column letter + row number, matching the headers drawn on the board — with double presses collapsed ("C3 ×2"), and the board shows each cell's value digit plus a press-count badge, so the state is never conveyed by colour alone.

Trying the board in the pane

The Board section of any grid analysis is interactive. Click cells and the board responds exactly as it would in play — the press flips (or on Trilight, advances) that cell and its orthogonal neighbours, and the grid redraws.

  • Solid dot — a cell the best solution still wants pressed.
  • Hollow ring — a cell you have already pressed.
  • Badge number (Trilight) — presses still needed; a cell can want two.
  • Apply all / Reset — jump to solved, or start over.
  • The status line turns green and reads SOLVED when the board matches the goal — including if you find a different valid route than the one listed.

It is a scratch view: clicking never edits the asset, and the presses clear when you look at a different board.

Why clicking, not a step sliderA Lights Out or Trilight solution is a set, not a sequence — the presses commute, so any order solves it. A slider would assert an order that does not exist. The genuinely hard part of these puzzles is that you cannot look at a set of cells and see why those cells, and no static picture fixes that: the information is in the transformation. So you press them yourself, in any order, and watch.

Every setting (GenerationSettings)

FieldRangeMeaning
ModeClassic / OrderedThe puzzle type. A grid (below) implies Lights Out.
StateCount / SwitchCount3–8States to turn on / switches to press (Classic & Ordered).
GridWidth / GridHeightup to 8 per side (≤ 56 cells; window sliders 2–8)Grid size; both > 0 switches the board to a grid (Lights Out / Trilight).
CellStates2 / 3Grid flavor: 2 = binary Lights Out, 3 = Trilight. Lets a stored recipe re-roll through the right generator.
GoalMode + GoalPatternAllLit / AllDark / Pattern · bitmaskThe grid target; Pattern uses the painted bitmask (bit y*W+x), masked to the grid.
SolutionStyleSingle / Few / ManyHow many valid solutions the board may have.
DummyPolicyNone / Allow / RequireDecoy switches that appear in no solution.
TrapPolicyNone / Allow / RequireOrdered only: decoys that re-lock a state when pressed (deadlock-free verified).
MinSolutionSize / MaxSolutionSize1…switches / cellsWindow for the shortest solution: switches used (Classic), sequence length (Ordered), presses (Lights Out).
MinStatesPerSwitch / MaxStatesPerSwitch1…statesClassic rule shape: how many states one switch toggles.
RequireOverlap + MinOverlapStatesbool · 0…statesDemand states shared by 2+ switches — the source of deduction.
ForbidSingleStateSwitchesboolReject switches that toggle only one state.
ForbidAllStateSwitchesboolReject switches that toggle every state.
ForbidDuplicateRulesboolReject two switches with identical rules.
AutoRuleShape + TargetShortestSizebool · 0…Pin the shortest solution to an exact size (0 = off). Also used directly by Lights Out.
ScramblePresses0–56Lights Out: cells pressed to scramble the start (0 = auto from the window).
MaxAttempts1–5000 (window slider 50+)Generation tries before keeping the best fallback (the report says which happened).
SeedstringEmpty = random; any string reproduces the board exactly.

GenerationSettings.Clamp() coerces every field into its valid range, so you can pass anything safely.

Difficulty

Every board gets a challenge score — shortest-solution size, overlap, states per switch, and decoys push it up; extra solutions and degenerate rules pull it down — mapped to a 1–5★ rating. Grid boards (Lights Out and Trilight) are rated on press count instead (big boards with long solutions earn the high stars). The score model was calibrated on the original prototype's batch rankings, so stars are comparable across a pack. The shortest solution doubles as the board's par, which the demo scores against.

Seeds & determinism

Every puzzle records the seed that made it (batches derive one seed per slot). The same seed and settings reproduce the same board on the same machine — share a seed string instead of the data. Saved assets also keep their full GenerationSettings, which is what inspector Re-roll uses.