Monty.Experiment.RecognitionStrategy.MinEvalMaxTotalSteps (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

A wrapper that refuses to stop too early, and stops anyway at a ceiling.

Mirrors tbp/monty/experiment/recognition_strategy.py::MinEvalMaxTotalSteps. It exists because a model can recognise an object in three steps, which makes an evaluation measure nothing: this holds the episode open until min_eval_steps matching steps have happened, while still ending it at max_total_steps — which is also the guard against a policy that stalls because matching steps never increase.

The wrapped policy's time_out_lms and start_exploring are carried through in every branch, so wrapping changes when an episode stops and nothing else.

Summary

Functions

The wrapped answer, held back while too little has been seen, or ended at the ceiling.

A wrapper around :wrapped, which is a policy in the same {module, state} shape.

Functions

call(model, counter, state)

The wrapped answer, held back while too little has been seen, or ended at the ceiling.

new(options)

@spec new(keyword()) :: {:ok, {module(), map()}} | {:error, String.t()}

A wrapper around :wrapped, which is a policy in the same {module, state} shape.

Monty raises ValueError for a negative minimum, a non-positive ceiling, or a minimum above the ceiling; here that is {:error, message} with Monty's own words, checked in the same order.