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

Copy Markdown View Source

Done when a naive scan's spiral has completed.

Mirrors tbp/monty/experiment/recognition_strategy.py::NaiveScan. The scan moves in fixed steps and turns until it has swept ninety degrees, so the number of steps in the spiral is arithmetic on the step size and nothing else:

k = ceil(90 / fixed_amount)
step_limit = k * (k - 1) + 1

which is 1, 73, 307 and 8011 for step sizes of 90, 10, 5 and 1 — Monty's own numbers, and the reason this policy exists rather than a plain step ceiling.

Summary

Functions

Done when the spiral is complete.

A policy whose ceiling is the spiral's own length.

How many steps a spiral of this step size takes, as Monty computes it.

Functions

call(model, counter, map)

Done when the spiral is complete.

new(options)

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

A policy whose ceiling is the spiral's own length.

Monty raises ValueError for a step size that is not positive; here that is {:error, message} with Monty's own words.

step_limit(fixed_amount)

@spec step_limit(pos_integer()) :: pos_integer()

How many steps a spiral of this step size takes, as Monty computes it.