EpsilonGreedyStrategy
python
EpsilonGreedyStrategy(epsilon_schedule: Schedule) -> NoneEpsilon-greedy exploration strategy.
With probability epsilon, takes a random action (exploration). With probability (1 - epsilon), takes the greedy action (exploitation).
Initialize the EpsilonGreedyStrategy.
Parameters:
epsilon_schedule(Schedule) – Schedule for the epsilon value.
Methods
get_exploration_value
python
get_exploration_value(steps: int) -> float | NoneGet the current epsilon value for logging.
Parameters:
steps(int) – The current step count.
Returns:
float | None– The current epsilon value.
should_explore
python
should_explore(steps: int) -> boolDetermine whether to take an exploratory (random) action.
Parameters:
steps(int) – The current step count.
Returns:
bool– True if a random action should be taken based on epsilon probability.
Values
epsilon_schedule
python
epsilon_schedule = epsilon_schedule