Monty. Frameworks. Models. EvidenceMatching. GraphMemory. EvidenceGraphMemory
(ExTbpMonty.Core v0.1.0)
Copy Markdown
View Source
Memory that stores grid models, which is what an evidence-based learning module learns into.
Mirrors tbp/monty/frameworks/models/evidence_matching/graph_memory.py ::EvidenceGraphMemory, whose whole content is a different object model plus
what follows from it. Evidence matching compares one observation against every
node of every object at once, so memory that stored every observation as a
node would be both slow and enormous; the grid keeps a bounded number of
nodes per object and is the reason a pretrained YCB model fits in memory at
all.
Inheritance became configuration
In Python this class exists to subclass GraphMemory and override the three
places where a model is constructed — build, extend, and load. There is no
inheritance to override in Elixir, and there does not need to be: memory
already takes the object model as a module and its options as a keyword list,
so the same three places build a GridObjectModel when memory is made here
and a GraphObjectModel when it is made by GraphMemory.new/1 directly. One
struct, one set of functions, two configurations.
What the three numbers mean
:max_nodes_per_graph— how many nodes an object thins down to, which bounds the cost of every matching step;:max_graph_size— how large an object may be, in metres, before the model refuses it withGridTooSmallError;:num_model_voxels_per_dim— the resolution, hence the smallest detail a model can hold:max_graph_size / num_model_voxels_per_dimper voxel.
Summary
Functions
What a learning module starts from: the id of every object in memory.
An empty memory of grid models, configured by the three numbers Monty's learning-module config sets.
Functions
@spec get_initial_hypotheses(Monty.Frameworks.Models.GraphMatching.GraphMemory.t()) :: [ Monty.Frameworks.Models.GraphMatching.GraphMemory.graph_id() ]
What a learning module starts from: the id of every object in memory.
Nothing is ruled out at the first step, so every stored object is a candidate. Monty's base memory answers with its models instead; evidence matching wants ids, because its hypotheses are per object and its evidence lives per graph.
@spec new(keyword()) :: Monty.Frameworks.Models.GraphMatching.GraphMemory.t()
An empty memory of grid models, configured by the three numbers Monty's learning-module config sets.