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

Copy Markdown View Source

Done when any of its policies is, and it stops asking at the first yes.

Mirrors tbp/monty/experiment/recognition_strategy.py::AnyPolicy. The result is the union of the answers it did get: a time_out_lms from an earlier policy survives a later one that says done on its own, so combining policies never loses a request.

Stopping at the first "done" is Monty's behaviour and it is observable — a policy after the one that fired is not consulted at all — which is why the recording compares the union rather than re-running every member.

Summary

Functions

The union of the answers, stopping at the first policy that is done.

A policy over :policies, in the order they are asked.

Functions

call(model, counter, map)

The union of the answers, stopping at the first policy that is done.

new(options)

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

A policy over :policies, in the order they are asked.

Monty raises ValueError for an empty list; here that is {:error, "no policies to check"}.