What attention does to a step — Monty's attention/attention_system.py.
Sensors propose where to look (Monty.Cmp.AttentionRegion), the goal generator
proposes what to do (Monty.Cmp.Goal), and the attention system sits between
them: it keeps a grid of how interesting each part of space has been, and it
answers which goals are worth pursuing given that grid.
Monty declares the contract as a Protocol over step, reset and
state_dict, and the systems are objects with a _grid they mutate. Here the
system is a struct and step/3 answers {system, goals} — the caller threads
the system, so what a step did is visible in its return value rather than only
in the object afterwards.
Summary
Callbacks
Forget everything attention has learned.
The system's state, for a recording run.
Act on one step's goals given where the sensors looked.
Callbacks
Forget everything attention has learned.
@callback state_dict(system :: term()) :: Monty.Memento.t()
The system's state, for a recording run.
@callback step(system :: term(), [Monty.Cmp.Goal.t()], [Monty.Cmp.AttentionRegion.t()]) :: {system :: term(), [Monty.Cmp.Goal.t()]}
Act on one step's goals given where the sensors looked.