LLM-Driven Historical Simulations: Narrative Decision Design Beyond Numeric Models
This article examines how large language models can support narrative decision-making in historical simulations without sacrificing state consistency, traceability, or factual control. It first reviews the strengths and limits of traditional numeric modeling, then analyzes engineering problems introduced by semantic, natural-language state, including ambiguous state, difficult causal tracing, and unstable outputs. It proposes a layered state model that separates hidden state from observable evidence, discusses character motivation modeling, historical constraints and fact validation, and explains how to distinguish system defects from reasonable emergent behavior. It also outlines evaluation metrics and an implementation order that combines rule-based state management with LLM-generated dialogue and narration.
LLM-Driven Historical Simulations: Narrative Decision Design Beyond Numeric Models
1. Traditional Modeling in Historical Simulations
Traditional historical simulation systems usually abstract state governance into a set of explicit numbers and rules. Variables such as resources, population, official loyalty, and military morale are readable and modifiable numbers. Every player action corresponds to a clear command, such as appointing an official, collecting taxes, moving troops, or allocating funds. Both inputs and outputs are structured, and the player observes variable curves from a global perspective to judge which action produced a benefit.
This modeling approach has clear advantages: it is predictable, debuggable, and reproducible. The same sequence of actions under the same initial state always produces the same result, and designers can precisely control balance by adjusting coefficients. Its weaknesses are equally clear: variables are only a rough projection of reality. Loyalty is a number, and it cannot distinguish whether an official is genuinely loyal, calculating personal benefit, or simply afraid of being purged.
2. New Problems Introduced by Semantic Modeling
When state exists as natural-language text and is interpreted and generated by a large language model, the system’s expressive capacity increases significantly. Characters can argue their case, factions can make demands, and situations can be presented through narrative rather than dashboards. Players are no longer limited to preset commands; they can express intent directly in language.
However, this flexibility introduces three types of engineering problems.
The first is state ambiguity. The model’s interpretation of the same context may fluctuate with sampling, and the same character may take contradictory positions across turns. The second is difficult causal tracing. When a result appears, it is hard to say which input or which piece of historical record caused it. The third is output instability. The model may generate results outside rule boundaries, such as bringing a dead character back on stage or inventing a sum of funds that does not exist.
These problems cannot be solved by prompts alone. Prompts can constrain style of expression, but they cannot guarantee state consistency. Therefore, an explicit state layer and validation layer are needed outside the model.
3. Designing a Layered State Model
A practical design separates system state into two layers. The first layer is hidden state, including a character’s true demands, interest relationships, and latent positions. It is maintained only inside the system, is not directly exposed to the player, and is not entirely left to free model generation. The second layer is observable evidence: visible speech and actions, reports, rumors, and financial records. The player’s judgments should be based on evidence rather than direct reads of hidden state.
A simplified data structure looks like this:
from dataclasses import dataclass, field@dataclassclass Faction:name: strgoals: dict[str, float] # Demand names and weights, ranging from 0 to 1loyalty: float # Hidden variable, ranging from 0 to 1, not shown directly to the playerevidence: list[str] = field(default_factory=list)def observe(self, action_summary: str, impact: float) -> None:"""Record an observable event and update the hidden variable by impact."""self.evidence.append(action_summary)self.loyalty = min(1.0, max(0.0, self.loyalty + impact))
This design preserves ambiguity in loyalty while making it traceable. Every change has a corresponding evidence record, so designers can replay the source of a result and check in testing whether the system updates state as expected.
4. Modeling Character Motivation
Behavior by historical figures is often driven by multiple demands at once. A local official may care simultaneously about career prospects, clan interests, local finances, and personal safety. Summarizing all of this with a single loyalty value loses a large amount of information.
A system can define a set of demands for each character and connect those demands to specific events. For example, when the state decides to reduce taxes, a character concerned with finance may object, a character concerned with public welfare may express support, and a character concerned with career advancement may wait and see. When the model reads these demands while generating dialogue, it can produce expressions consistent with the character’s position.
It is important to note that demands may conflict. A character may want to protect personal interests while also needing the court’s trust, and these two goals may be incompatible in some situations. The model should present the conflict explicitly as a choice rather than making the judgment for the player.
5. Historical Constraints and Fact Validation
Historical settings are special because they contain many verifiable facts. The system needs to prevent the model from inventing content that contradicts historical sources. Common approaches include the following.
- Build an event timeline. Every character and event carries a timestamp, and the model may only reference events that occurred before the current time.
- Use retrieval augmentation. Provide relevant historical source fragments as context to the model and require the model to cite sources for key claims.
- Perform post-validation on model output. Check whether a person is in office, whether location and position match, and whether numbers fall outside a reasonable range.
It should be noted that historical simulation does not require exact replication of historical facts. The system may allow players to change outcomes, but the consequences after a change should remain internally coherent.
6. Distinguishing Defects from Reasonable Surprises
Systems driven by large language models often produce unexpected behavior. Whether that behavior is a defect depends on whether it can be explained within the setting.
One way to judge is to check whether the behavior violates a hard constraint. If a character who has already been executed speaks again, that is a state error and should be fixed. If a character chooses a reaction consistent with their personality when evidence is insufficient, even if the result is surprising, it can be treated as reasonable emergent behavior.
Designers can write hard constraints as rules and soft tendencies as character settings, then let the model generate text between the two. This preserves a baseline while avoiding the reduction of all variation to template-style responses.
7. Evaluation Metrics
Because output from semantic systems is difficult to measure with a single number, evaluation needs multiple dimensions. At minimum, the following metrics should be considered:
- State consistency: whether the same character’s position across turns matches their demands and evidence;
- Fact-compliance rate: the proportion of claims involving historical facts that conflict with historical sources;
- Causal traceability rate: whether key results can be traced to specific inputs and evidence;
- Player decision quality: whether players can feel real trade-offs among choices rather than an obvious single correct answer;
- Response stability: whether output remains consistent on key conclusions under the same state and input.
These metrics can be evaluated through a combination of manual sampling and automated testing. The automated part mainly validates structured fields and state transitions, while the manual part mainly judges the reasonableness and readability of the text.
8. Implementation Recommendations
For engineering implementation, the work can proceed in the following order. First, implement the structured state layer and event log to ensure that all changes can be recorded and replayed. Then integrate the language model, letting it only generate dialogue and narration while state changes are confirmed and executed by the rule engine. Finally, gradually add historical source retrieval and character motivation models, and continuously evaluate them with the metrics above.
The core of this division of labor is to let the model handle what it is good at—expression—and let rules handle what they are good at—constraints. Only with a clear boundary between the two can the system maintain balance between freedom and controllability.
