Running a system

Running a system#

run steps a closed System for a number of ticks and records a Trajectory. A tick is one round in which every component steps once. The two step functions, plan for a mind that plans and sample for a process that is simply sampled forward, are what run calls on each component; env_step wraps a positional environment as the second kind. The clock helpers at the end turn per-tick kernels into kernels for a longer step.

Running#

run

Step a closed System for ticks rounds and record a Trajectory.

plan

The step of a planning mind: infer, learn, act, push the prior, emit.

sample

The step of a process: its System sampled forward from its declarations.

env_step

The step of a black box that runs a positional environment.

What a run records#

Trajectory

What run() recorded: a tree with one node per component of the System.

Trace

What a planning step kept of one round's plan (plan(trace=True), in MindCarry.trace).

MindCarry

One planning mind's internal state between rounds, the only place its beliefs live: the carry of plan().

Clocks and durations#

discretise

The exact zero-order-hold discretisation of dx = A x + B u dt + dw, dw ~ N(0, Q dt).

compose

The kernel of n repeats of a per-tick linear-Gaussian kernel, per mode.