Exact Store replay¶
Store-backed replay reconstructs Memory from
previously stored trajectories before Brain.pretrain(). The Store always
retains the full sensor list, the proposed action list, and the final applied
actuator list. Replay projection changes only the in-memory learning view.
Normal replay and ordered projection¶
Omit sensors and actuators to preserve the historical complete-list
replay behavior exactly. This includes the legacy best-effort fallback to a
proposed action list when a historical row has no final applied action list.
Use ordered projections when a learner’s declared observation or action space
is deliberately narrower than an environment’s complete telemetry or actuator
surface. Each list is an ordered list of exact UIDs; the listed order, rather
than the Store’s storage order, becomes the order in Memory:
replay:
- agent: scripted-teacher
experiment_run: teacher-run
instance: immutable-instance-uid
phase: 1
mode: train
strict: true
sensors:
- fire.risk
- grid.voltage
actuators:
- gis.cell_mutations
- guardian.applied_doctrine
sensors selects from the stored sensor readings. actuators selects
from MuscleAction.applied_actuator_setpoints: the final post-filter values
actually returned to the simulation controller, never the proposed pre-filter
values. The example is not GUARDIAN-specific; it merely illustrates a
multi-actuator environment and a narrow learning contract.
null or an omitted field means no projection for that side and preserves
the complete list. An empty list, a non-string UID, a blank UID, or duplicate
requested UIDs is invalid configuration and is rejected before pretraining.
Choose a Brain observation and action space compatible with the projected,
ordered values, not the source environment’s full lists.
Strict replay and errors¶
Set strict: true for exact offline pretraining. Strict replay also
requires immutable instance and mode source selectors. It rejects
missing source rows, multiple workers, non-monotonic or incomplete decisions,
terminal inconsistencies, and unfinished trajectories. Rows are ordered by
worker, episode, decision index, then Store ID; each episode has its own
Memory shard, so no successor can cross an episode boundary.
For a configured projection, every requested UID must resolve exactly once in
every selected row. Missing or duplicate entries, null/malformed values,
values outside their declared spaces, and changes to a selected UID’s declared
space fail setup before Memory is assigned or Brain.pretrain() runs.
This applies independently to sensor and actuator projections and prevents
mixed or incomplete projected rows.
Without strict: true, a configured projection remains conservative: an
unresolvable selected sensor or final actuator aborts that best-effort replay
attempt. It never falls back to the complete list or to proposed action data.
Only no projection retains the historical fallback behavior.
Store evidence and compatibility¶
Projection is not a Store transformation. Queries, reports, and future
replay definitions continue to see complete sensor readings, proposed
setpoints, and final applied setpoints. The columns are nullable for
historical compatibility; existing databases are upgraded through Alembic
revision d21a0b4c6e7. When projection is omitted, those historical rows
keep their established best-effort replay semantics.