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

The episode's counters, and the mode they are counting in.

Mirrors `tbp/monty/experiment/recognition_strategy.py::RecognitionCounter`.
`step` counts every timestep; `matching_steps` and `exploring_steps` count only
the steps where a learning module actually updated, which is why they can lag
behind `step` — a policy that limits *matching* steps must not be fooled by a
step where nothing was perceived.

# `t`

```elixir
@type t() :: %Monty.Experiment.RecognitionStrategy.RecognitionCounter{
  exploring_steps: non_neg_integer(),
  matching_steps: non_neg_integer(),
  mode: Monty.Frameworks.Experiments.Mode.ExperimentMode.t(),
  step: non_neg_integer()
}
```

# `count_step`

```elixir
@spec count_step(t(), boolean(), boolean()) :: t()
```

Counts a step, and the mode-dependent counter with it.

Monty increments `step` on every step and `matching_steps`/`exploring_steps`
only when a learning module updated; `:updated` is that second fact, so the
loop says what happened rather than the counter guessing.

# `new`

```elixir
@spec new(Monty.Frameworks.Experiments.Mode.ExperimentMode.t()) :: t()
```

Counters for a fresh episode in `mode`.

---

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