ECS
- Entity — a generational handle
{ index, generation }. Despawn bumps the generation, so a stale reference is detected, not silently reused. Carries no data itself. - Component — plain data on an entity (
Transform,Velocity,Health,Team, …); any'static + Send + Sync + Clonetype. The world is a flat table of these. - Archetype — entities are stored columnar (SoA) grouped by their exact set of components, for cache- friendly iteration. See Engine internals.
The world-engine verbs
- observe — read the full current state exactly, without stepping (
POST /observe→RichEntityData). → - peek — the exact probability distribution over the next step’s declared outcomes, read analytically (not sampled) from the generative model. The answer key.
- step — advance one tick deterministically, sampling from exactly the distribution
peekreported (POST /step). - fork — clone the world mid-episode and branch a counterfactual (the do-operator);
POST /fork. → peek == step— the soundness invariant: a named test holds the two distributions byte-identical. A perfect predictor scores 0 nats.
Data & state
- WorldStateGraph — the observable world as
{ tick, entity_count, entities }in canonical JSON; the structured form behindobserve. → - RichEntityData — the flattened per-entity projection
observereturns over HTTP. - state_digest — a 64-bit FNV-1a hash of the observable state over a canonical ordering. Equal digests ⇔ equal observable state — the reproducibility oracle.
- JointDistribution — the per-variable distributions
peekreturns (per_variable: [(name, dist)]).
Rules
- Rule —
{ when, do }as pure data: a condition, an optional declared distribution, and effect bundles. No closures. → - RuleSet — the ordered collection of rules the engine evaluates each tick; rule firing order is deterministic.
- GameAction — an effect an action can apply (
Spawn,Damage,Heal,Teleport,EndGame,SetField,AddField, …;SetColor/ShowTextare render-gated stubs).
Determinism & evaluation
- determinism (within-platform) — same seed + inputs ⇒ bit-identical trajectory, within one build/platform; not a claim of identical floating-point across CPU architectures. →
- OnlineWorld — the live world + the four-verb loop + a single seeded RNG stream, in
euca-online. - regret (nats) — the prequential score:
Σ −ln P̂(realized) − Σ −ln P*(realized). ≥ 0 in expectation; a perfect predictor scores 0. →
Core concepts
Start with the world as a table.