public class DumbRandomLearner extends AbstractLearner implements StimuliResponseLearner, Serializable, Prototypeable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NUM_ACTIONS |
protected cern.jet.random.Uniform |
distribution |
protected int |
numActions |
monitor
Constructor and Description |
---|
DumbRandomLearner(int numActions,
cern.jet.random.engine.RandomEngine prng) |
DumbRandomLearner(cern.jet.random.engine.RandomEngine prng) |
Modifier and Type | Method and Description |
---|---|
int |
act()
Request that the learner perform an action.
|
int |
bestAction() |
void |
dumpState(DataWriter out)
Write out our state data to the specified data writer.
|
double |
getLearningDelta()
Return a value indicative of the amount of learning that occured during the
last iteration.
|
int |
getNumberOfActions()
Get the number of different possible actions this learner can choose from
when it performs an action.
|
Object |
protoClone() |
void |
reset() |
void |
reward(double reward)
Reward the learning algorithm according to the last action it chose.
|
int |
worstAction() |
monitor
protected int numActions
protected cern.jet.random.Uniform distribution
public static final int DEFAULT_NUM_ACTIONS
public DumbRandomLearner(cern.jet.random.engine.RandomEngine prng)
public DumbRandomLearner(int numActions, cern.jet.random.engine.RandomEngine prng)
public Object protoClone()
protoClone
in interface Prototypeable
public void reset()
public int act()
DiscreteLearner
act
in interface DiscreteLearner
public double getLearningDelta()
Learner
getLearningDelta
in interface Learner
getLearningDelta
in class AbstractLearner
public void dumpState(DataWriter out)
Learner
dumpState
in interface Learner
dumpState
in class AbstractLearner
public int getNumberOfActions()
DiscreteLearner
getNumberOfActions
in interface DiscreteLearner
public void reward(double reward)
StimuliResponseLearner
reward
in interface StimuliResponseLearner
public int bestAction()
bestAction
in interface StimuliResponseLearner
public int worstAction()
worstAction
in interface StimuliResponseLearner
Copyright © 2014. All rights reserved.