Monty.Frameworks.Models.SensorModules.PerceptFilter behaviour (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

Something that decides whether a percept carries features or only a location.

Mirrors tbp/monty/frameworks/models/sensor_modules.py::PerceptFilter, the protocol a sensor module's filter answers. CameraSM passes every percept through one: the default passes everything on, and FeatureChangeFilter sends a point to a learning module only when something about it changed enough to be worth learning.

A filter is a value here, so what it remembers travels beside it rather than inside it: the callback takes the filter, the percept and that memory, and answers both the percept and the memory's next version.

Summary

Callbacks

The percept, marked, and the filter's record of it.

The memory a new episode starts with, which is what reset answers.

Types

memory()

@type memory() :: term()

t()

@type t() :: struct()

Callbacks

call(t, t, memory)

@callback call(t(), Monty.Cmp.Message.t(), memory()) :: {Monty.Cmp.Message.t(), memory()}

The percept, marked, and the filter's record of it.

reset(memory)

@callback reset(memory()) :: memory()

The memory a new episode starts with, which is what reset answers.