← Blog

Start at the Solution: Backsolving a Wizard’s Evidentiary Trail

From Magical Mysteries to Mathematical Meaning · Article 2 of 7

Once the mystery world had a persistent representation, a second problem became easier to see. Consistency was necessary, but consistency did not tell me what the player should discover.

A magical mystery can contain a completely coherent magical crime, a plausible cast of wizard suspects, and dozens of true facts without being meaningfully solvable. The player might encounter details that are interesting but inferentially inert. The decisive clue might be hidden behind an arbitrary interaction. Several suspects might remain equally compatible with everything the player has learned. Or the player might name the murderer correctly for reasons that have nothing to do with the evidence.

That last case matters. Correctness and solving are not the same thing.

Suppose there are five wizard suspects and the player immediately accuses one of them. If the accusation happens to be correct, the proposition “Suspect C caused the magical death” is true. But the player has not solved the case. The belief is not yet grounded in the evidence of the world. A wizard-detective mystery asks for something closer to justified belief: a conclusion supported by a path of observations and inferences that makes the conclusion warranted rather than lucky.

That means the mystery has a target epistemic state. At the end of the case, the solver should possess some set of justified conclusions. The obvious one is the identity of the culprit, but often the target includes more: motive, method, sequence of events, explanation of misleading evidence, and perhaps an account of why alternative hypotheses fail.

Once that terminal state is made explicit, mystery design can be treated as an inverse problem. Start with the final justified conclusion. Ask what immediate propositions would have to be established for that conclusion to follow. Then ask what evidence would justify those propositions. Then ask what world facts would generate that evidence. Continue backward until the chain reaches facts and observations that can plausibly be encountered by a player who begins in ignorance.

The design direction therefore runs opposite to the experience direction. The player moves forward:

unknown case → observations → hypotheses → revised beliefs → converging evidence → justified solution.

The designer works backward:

justified solution → necessary inferences → required evidence → generating world facts → discoverable situations → plausible initial state.

This is what I mean by an evidentiary trajectory. It is not simply a sequence of clues. It is a planned sequence of epistemic transitions.

Consider a simplified case. The final conclusion is that a guest named Mara killed the victim. A weak design might place Mara’s monogrammed glove beside the body. That clue points directly to her, but it may do little reasoning work. It can be planted, stolen, or accidental. If no other structure exists, the player is merely being handed an accusation-shaped object.

A backward design asks instead what combination of propositions would distinguish Mara from the other suspects. Perhaps the final case requires establishing three things: the culprit entered through a warded conservatory after midnight; only someone who knew the old protective enchantment could cross it without triggering an alarm; and Mara lied about never having studied the house's wards before.

Now each proposition creates a design obligation. To establish the route through the conservatory, the world may need traces of disrupted ward-magic, a cracked rune, and a timeline that rules out earlier entry. To establish knowledge of the enchantment, the player may need access to old ward diagrams showing that the protection had not changed. To establish Mara's prior familiarity with the house, the player may need testimony, correspondence, or a magical record linking her to a previous visit. Her lie becomes meaningful only when the player has enough evidence to recognize it as a lie.

Notice what has happened. The mystery is no longer a bag of clues. Each clue exists because it performs work in a chain of justification.

Backward construction also creates a criterion for solution sufficiency. It is not enough that the intended culprit fits the evidence; the evidence should also discriminate adequately against serious alternatives. The system can therefore inspect the terminal state not only for support but for comparative force: which competing hypotheses remain live, what would rule them out, and whether the final case depends on an arbitrary leap that has not been licensed by the trajectory. In other words, the endpoint is not merely a true accusation but a justified narrowing of the hypothesis space.

This approach also makes red herrings easier to reason about. A misleading clue should not merely be random noise. It should support a plausible alternative hypothesis given the solver’s current state, while later evidence explains why that interpretation was incomplete or mistaken. The red herring therefore has an epistemic function: it shapes the space of reasonable beliefs at a particular stage of the investigation.

The same applies to pacing. If a clue collapses the hypothesis space too early, the problem is not merely that the clue is “too obvious.” It has an incorrect position in the evidentiary trajectory. If an observation is useless until another fact has been discovered, its accessibility can be delayed or its significance can remain latent. The state representation can record not only that a clue exists, but what propositions it bears on and what other information may be required before it becomes discriminating.

This gives the model a much stronger planning question than “invent another clue.” It can ask: given the current solver state and the intended terminal state, what transition is still missing? Which hypotheses remain viable? What evidence would most usefully distinguish among them without making the solution trivial? What underlying world truth would generate that evidence naturally?

The backward construction also protects against a common failure mode in generated mysteries: retrofitting. In a forward-only system, the model may generate several scenes and then later decide what they meant. A strange stain introduced for atmosphere becomes poison evidence. A minor character suddenly acquires a relationship to the victim because the plot needs a motive. A previously decorative object becomes the murder weapon. This can produce superficially clever callbacks, but it often means the causal history is being rewritten after the evidence has already appeared.

Backward design reverses the dependency. The world fact precedes the evidence in the canonical model, even if the player encounters the evidence first. A stain can be evidence because a prior event generated it. A witness can lie because the witness possesses some represented knowledge and has some represented reason to conceal it. A clue can mislead because its relation to the truth is already defined, not because the model improvises an explanation after the fact.

This does not require every detail to be predetermined. The distinction is between committed causal structure and materialized presentation.

The system may know that an intruder crossed the warded conservatory at 12:17 a.m., that a protective rune was disturbed, and that a witness heard enchanted glass resonate. It does not have to prewrite the exact prose of the footprint description or the witness interview. Those can be generated when encountered. What matters is that the underlying facts and their evidentiary relationships are already grounded.

The model can also extend the world during play, provided new facts respect the existing trajectory. If the player unexpectedly investigates the greenhouse roof, the system might generate additional details. But those details should be proposed against the current truth network, checked for conflicts and epistemic consequences, and only then committed. Dynamic generation remains possible because the case is a constrained state space rather than a fixed script.

The inverse design principle turned out to be broader than mystery plotting. The earlier project in which I used persistent state to produce a technical article series already had the same structure. Each article began with a desired reader endpoint: the conclusions the reader should be justified in accepting. The workflow modeled plausible initial beliefs and uncertainties, then constructed the argumentative moves, warrants, examples, and objections required to bridge the two. The prose was written forward, but the argument was designed backward from its epistemic objective.

The mystery application made that structure concrete in a different way. Instead of premises and warrants appearing in an essay, the player encountered rooms, statements, objects, and behavior. But both systems were constructing a path from an initial epistemic state to a justified terminal state.

That recognition changed how I understood the method itself. The important abstraction was not “use JSON for mysteries.” Nor was it simply “plan backward.” The method was becoming a project-scale way to represent a desired state transition formally enough that an LLM could help construct, inspect, revise, and execute the path.

To make that work, however, the fictional world had to represent more than physical facts. A mystery depends on who knows what, who believes what, who has observed what, who is lying, and what the player has actually discovered. Those are not decorations around the case. They are part of the machinery that makes evidence meaningful.

The next step was therefore to build a world out of committed truths—not only truths about objects and events, but truths about epistemic states themselves.