# `GEPA.Strategies.CandidateSelector.EpsilonGreedy`
[🔗](https://github.com/nshkrdotcom/gepa_ex/blob/v0.3.0/lib/gepa/strategies/candidate_selector/epsilon_greedy.ex#L1)

Epsilon-greedy candidate selector with optional decay.

Picks the current best candidate with probability `1 - epsilon` and a random
candidate with probability `epsilon`. The `epsilon` value can decay after each
selection to gradually reduce exploration.

# `t`

```elixir
@type t() :: %GEPA.Strategies.CandidateSelector.EpsilonGreedy{
  current_epsilon: float(),
  epsilon: float(),
  epsilon_decay: float(),
  epsilon_min: float()
}
```

# `current_epsilon`

```elixir
@spec current_epsilon(t()) :: float()
```

Return the current epsilon value.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Create a new epsilon-greedy selector.

## Options

  * `:epsilon` - initial exploration probability (default: 0.1)
  * `:epsilon_decay` - multiplicative decay applied after each selection (default: 1.0)
  * `:epsilon_min` - lower bound for epsilon after decay (default: 0.01)

# `reset`

```elixir
@spec reset(t()) :: t()
```

Reset `current_epsilon` back to the initial value.

# `select`

```elixir
@spec select(t(), GEPA.State.t(), :rand.state() | nil) ::
  {GEPA.Types.program_idx(), t(), :rand.state()}
```

Select a candidate using epsilon-greedy strategy.

Returns `{candidate_idx, updated_selector, new_rand_state}`.

---

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