babylon.engine.dialectics.tick

Pure tick function for the v2 dialectical engine.

The tick is a pure function:

def tick(world, player_actions) -> (new_world, events)

Same inputs always produce same outputs. This matters for replay, debugging, and the ability to test that “if I do X at tick N, the engine produces Y at tick N+10.”

Phase 1 implements a simplified single-pass. The full 8-phase nested loop (V1 inner → V2 medium → V3 outer → class/political → player → sublation → invariant → event) is deferred to Phase 2+.

See also

babylon.engine.dialectics.world.World: The world state. babylon.engine.dialectics.base.Dialectic: The fundamental type.

Functions

tick(world, _player_actions)

Execute one simulation tick.

babylon.engine.dialectics.tick.tick(world, _player_actions)[source]

Execute one simulation tick.

Pure function — same inputs always produce same outputs.

Phase 1 single-pass:
  1. Step all live dialectics (in insertion order; topological ordering via morphisms is Phase 2).

  2. Run sublation pass.

  3. Run invariant check.

  4. Collect events.

  5. Return new World + events.

Parameters:
  • world (World) – Current world state (immutable).

  • player_actions – List of player interventions (Phase 2).

  • _player_actions (list[Any])

Return type:

tuple[World, list[WorldEvent]]

Returns:

Tuple of (new World at tick+1, list of events generated).