babylon.engine.dialectics.invariants_v2
Universal and per-type invariant checking for the v2 engine.
The engine enforces three universal invariants on every Dialectic at every tick:
weight ∈ [-1, 1]Type stability across motion (a CommodityDialectic remains one)
step()returns a Dialectic of the declared type
Per-type invariants are defined by each Dialectic subclass via the
invariants() method.
Functions
|
Check all invariants across every dialectic in the world. |
Check universal invariants on a single dialectic. |
- babylon.engine.dialectics.invariants_v2.check_universal_invariants(d)[source]
Check universal invariants on a single dialectic.
- Universal invariants:
weight ∈ [-1.0, 1.0]
type_tag is a non-empty string
These are defensive checks — Pydantic should already enforce weight bounds, but we double-check at runtime as a safety net.