Context: Stochastic Loot Engine
Context: Stochastic Loot Engine
Section titled “Context: Stochastic Loot Engine”Problem Domain
Section titled “Problem Domain”This system is a stochastic loot engine for an idle or simulation game.
The core loop generates unique items and skills with randomized modifier ranges, governed by rarity tiers, and evaluates character loadouts for emergent power interactions.
The central design axiom is that overpowered item and skill combinations are not design failures but the primary attractor state of the game loop.
The generative system must make such combinations discoverable, reproducible, and shareable while ensuring they remain statistically rare.
Canonical game-design worldbuilding for the game this engine serves lives in docs/lore/README.md, the source of truth for game-design intent.
Cynefin Domain Classification
Section titled “Cynefin Domain Classification”| Component | Domain | Rationale |
|---|---|---|
| Skill Primitive | Clear | Formal syntax with unambiguous production rules and static verification properties. |
| Charge Resource System | Clear | Deterministic formula with bounded behavior and explicit state transitions. |
| Modifier Aggregation | Clear | Two-layer commutative-semiring structure with mandatory cross-layer ordering. |
| Item Template Generation | Complicated | Multi-parameter schema with covariance constraints; analyzable but requires expertise. |
| Rarity Distribution | Complicated | Beta-parameterized tier system with monotone nesting laws; tractable but non-obvious. |
| Condition Temporality | Complicated | Three-class taxonomy (spatial, decaying, accumulating) with evaluator registry pattern. |
| Trigger Graph Engine | Complex | Emergent graph structure from effect-to-trigger matching; cycle detection is algorithmic but outlier classification is emergent. |
| Stochastic Verification | Complex | Monte Carlo simulation with importance sampling; outcome distributions are not analytically derivable. |
| Outlier Detection | Complex | Phase-transition behavior in supercriticality; requires empirical probing to calibrate thresholds. |
| Algebraic Laws | Clear | Static properties amenable to property-based testing; violations indicate defects. |
Scope Boundaries
Section titled “Scope Boundaries”In Scope
Section titled “In Scope”- Core domain primitives: Skill, ItemTemplate, ChargePool, ConditionTemporality, Ascender
- Generation layer: template generation from schema, instance rolling with Beta distributions, rarity tier assignment
- Verification layer: static structural checks, compositional trigger graph analysis, stochastic simulation with Monte Carlo sampling
- Algebraic law verification via property-based testing
- Loadout classification schema (None, Candidate, VerifiedOutlier, UberOutlier) and outlier detection
Out of Scope
Section titled “Out of Scope”- Game client, rendering, or UI presentation layer
- Network multiplayer or server infrastructure
- Save file persistence beyond seed-based reproducibility
- Real-time combat simulation, positional physics, or movement systems
- Non-loot progression systems (experience, levels, achievements)
- Cross-session cooldown persistence design (decision recorded, not implemented)
- Outlier presentation layer (what the player sees when a build is classified as outlier)