# `Monty.Experiment.RecognitionStrategy.StepLimit`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/experiment/recognition_strategy/step_limit.ex#L1)

Three limits in one policy: matching, exploring, and when to start exploring.

Mirrors `tbp/monty/experiment/recognition_strategy.py::StepLimit`. Which limit
applies depends on what the model is doing:

  * exploring — `exploring_steps` against `num_exploring_steps`;
  * training — `matching_steps` against `max_train_steps`, and once
    `min_train_steps` have matched it also asks to *start* exploring, which is
    how a training episode moves on to the next view of an object it knows;
  * evaluating — `matching_steps` against `max_eval_steps`.

# `call`

```elixir
@spec call(map(), Monty.Experiment.RecognitionStrategy.RecognitionCounter.t(), map()) ::
  Monty.Experiment.RecognitionStrategy.RecognitionResult.t()
```

The limit that applies to what the model is doing right now.

# `new`

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

A policy with the three limits.

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
