Monty. Attention. Telemetry. AttentionSystemTelemetry behaviour
(ExTbpMonty.Core v0.1.0)
Copy Markdown
View Source
The contract every attention telemetry satisfies — Monty's
attention/telemetry.py::AttentionSystemTelemetry.
Monty declares it as a Protocol with reset, proposed_grid, grid and
state_dict. Three of those change the telemetry, so here they take it and
answer the changed one; state_dict/1 is a read and is the only one that could
have stayed a one-argument method.
The contract is written down as a behaviour because it has two implementations and a caller (the attention system) that must not care which it has.
Summary
Callbacks
Record the grid the attention system kept.
Record the grid the sensors proposed, before the attention system touched it.
Forget every grid recorded so far.
Everything recorded since the last reset, as a Memento.
Callbacks
@callback grid(telemetry :: term(), Monty.Attention.VoxelGrid.t()) :: telemetry :: term()
Record the grid the attention system kept.
@callback proposed_grid(telemetry :: term(), Monty.Attention.VoxelGrid.t()) :: telemetry :: term()
Record the grid the sensors proposed, before the attention system touched it.
Forget every grid recorded so far.
@callback state_dict(telemetry :: term()) :: Monty.Memento.t()
Everything recorded since the last reset, as a Memento.