cadenza.stack.
The world model never touches motors. It reads an observation and proposes
named actions from the action vocabulary. The stack validates,
times, and executes them, then feeds the next observation back.
Run with a world model
StackResult carries .done, .total_actions, .executed, .notes, and
.final_observation.
Choosing the model
register_world_model pins the auto-detected model. After calling it, run with
world_model=None. To address an adapter by name string, register the class
with cadenza.stack.adapters.base.register_adapter first.
Implement a world model
SubclassWorldModelAdapter and implement propose_actions.
In
ProposedAction(name, params={}, rationale=""), name must be in the
vocabulary and params accepts distance_m, rotation_rad, speed, and so on.
Wrap them in AdapterReply(actions=[], done=False, note="").
Modalities
AModality computes extra observation keys each tick (depth, vision, distance to
target, …). It’s how the model “sees” more than raw proprioception.
summary is printed each tick
when verbose=True. compute takes an Observation.
run(..., modalities=[Proximity()]).