Monty.Frameworks.Models.EvidenceMatching.BurstSampling.BurstSamplingHypothesesUpdater (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

Which hypotheses survive a step, and which new ones are worth trying.

Mirrors tbp/monty/frameworks/models/evidence_matching/burst_sampling.py::BurstSamplingHypothesesUpdater, the sampling strategy Monty's evidence matching actually runs.

The idea: when evidence stops moving, one more observation of the same hypotheses will not settle anything. So when the largest evidence slope falls to burst_trigger_slope or below — and no burst is already running — the updater spends burst_sampling_duration steps sampling fresh hypotheses around the best-matching nodes, and drops the ones whose evidence is falling faster than deletion_trigger_slope. A burst therefore explores without simply growing the hypothesis space.

Two passes, both deterministic

  • existing hypotheses are filtered by slope, never sampled randomly, so two runs of an episode keep the same ones;
  • new hypotheses come from the top count ÷ rotations_per_node nodes by this observation's feature evidence, each tried with every rotation the sensed pose allows.

A new hypothesis starts with its feature evidence and possible?: false: it has earned nothing yet, but it is the alternative the burst exists to try.

Summary

Functions

Prepare the step: measure the evidence slope and start a burst if it stalled.

Move every hypothesis by displacement, as its own orientation sees it.

Count a burst step down once the step's update is done.

An updater over memory.

Forget what an episode learned, keeping the configuration.

Rebuild the hypothesis space for this observation and update its evidence.

Types

t()

@type t() ::
  %Monty.Frameworks.Models.EvidenceMatching.BurstSampling.BurstSamplingHypothesesUpdater{
    burst_sampling_duration: term(),
    burst_trigger_slope: term(),
    deletion_trigger_slope: term(),
    displacer: term(),
    evidence_slope_trackers: term(),
    graph_memory: term(),
    initial_possible_poses: term(),
    max_slope: term(),
    sampling_burst_steps: term(),
    sampling_multiplier: term(),
    scorer: term(),
    umbilical_num_poses: term()
  }

Functions

begin_step(updater)

@spec begin_step(t()) :: t()

Prepare the step: measure the evidence slope and start a burst if it stalled.

A burst starts when evidence has stopped moving, not while it is climbing — while it climbs, another observation is the cheaper way to settle things.

displace_hypotheses(burst_sampling_hypotheses_updater, hypotheses, displacement)

Move every hypothesis by displacement, as its own orientation sees it.

A no-op with no hypotheses or no movement — before the first step there is nothing to move by.

end_step(updater)

@spec end_step(t()) :: t()

Count a burst step down once the step's update is done.

new(memory, options)

An updater over memory.

:sampling_multiplier is how many hypotheses per node a burst draws. :initial_possible_poses is nil for informed sampling — align each node's stored pose with what was sensed — or a list of 3×3 pose matrices for fixed poses.

reset(updater)

@spec reset(t()) :: t()

Forget what an episode learned, keeping the configuration.

update_evidence(updater, hypotheses, features, graph_id, evidence_update_threshold)

Rebuild the hypothesis space for this observation and update its evidence.

Returns {updater, hypotheses, telemetry}, with hypotheses and telemetry empty when the observation carries no channel this graph stores — the caller then has nothing to update rather than an empty space pretending to be one.