public class EpsilonGreedyActionSelector extends Object implements ActionSelector
An implementation of the epsilon-greedy action selection policy.
See:
Sutton, R. S., Barto, A. G., 1998. Reinforcement Learning: An Introduction.
MIT Press.
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_EPSILON |
protected double |
epsilon
The parameter representing the probability of choosing a random action on
any given iteration.
|
protected cern.jet.random.engine.RandomEngine |
prng
|The pseudo-random number generator used to randomly select whether to
explore and to randomly select an action when the algorithm is exploring.
|
Constructor and Description |
---|
EpsilonGreedyActionSelector() |
EpsilonGreedyActionSelector(double epsilon,
cern.jet.random.engine.RandomEngine prng) |
EpsilonGreedyActionSelector(cern.jet.random.engine.RandomEngine prng) |
Modifier and Type | Method and Description |
---|---|
int |
act(int state,
MDPLearner qLearner)
Choose an action according to the current state and the
current value estimates for each action.
|
double |
getEpsilon() |
cern.jet.random.engine.RandomEngine |
getPrng() |
void |
setEpsilon(double epsilon) |
void |
setPrng(cern.jet.random.engine.RandomEngine prng) |
protected double epsilon
protected cern.jet.random.engine.RandomEngine prng
public static final double DEFAULT_EPSILON
public EpsilonGreedyActionSelector(double epsilon, cern.jet.random.engine.RandomEngine prng)
public EpsilonGreedyActionSelector(cern.jet.random.engine.RandomEngine prng)
public EpsilonGreedyActionSelector()
public int act(int state, MDPLearner qLearner)
ActionSelector
act
in interface ActionSelector
state
- The current state of the MDP.qLearner
- The algorithm used to update the value estimates.public double getEpsilon()
public void setEpsilon(double epsilon)
public cern.jet.random.engine.RandomEngine getPrng()
public void setPrng(cern.jet.random.engine.RandomEngine prng)
Copyright © 2014. All rights reserved.