versus.meeting
Class RLearner
java.lang.Object
|
+--versus.meeting.RLearner
- public class RLearner
- extends java.lang.Object
Code from http://www.cse.unsw.edu.au/~aek/catmouse.
- Version:
- $Id: RLearner.java,v 1.3 2003/08/01 00:39:49 glchen Exp $
- Author:
- Anthony Knittel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thisWorld
RLWorld thisWorld
policy
RLPolicy policy
Q_LEARNING
public static final int Q_LEARNING
- See Also:
- Constant Field Values
SARSA
public static final int SARSA
- See Also:
- Constant Field Values
Q_LAMBDA
public static final int Q_LAMBDA
- See Also:
- Constant Field Values
E_GREEDY
public static final int E_GREEDY
- See Also:
- Constant Field Values
SOFTMAX
public static final int SOFTMAX
- See Also:
- Constant Field Values
learningMethod
int learningMethod
actionSelection
int actionSelection
epsilon
double epsilon
temp
double temp
alpha
double alpha
gamma
double gamma
lambda
double lambda
dimSize
int[] dimSize
state
int[] state
newstate
int[] newstate
action
int action
reward
double reward
epochs
int epochs
epochsdone
public int epochsdone
thisThread
java.lang.Thread thisThread
running
public boolean running
trace
java.util.Vector trace
saPair
int[] saPair
timer
long timer
random
boolean random
a
java.lang.Runnable a
RLearner
public RLearner(RLWorld world)
runTrial
public void runTrial()
runEpoch
public void runEpoch()
selectAction
private int selectAction(int[] state)
getPolicy
public RLPolicy getPolicy()
setLambda
public void setLambda(double l)
setAlpha
public void setAlpha(double a)
getAlpha
public double getAlpha()
setGamma
public void setGamma(double g)
getGamma
public double getGamma()
setEpsilon
public void setEpsilon(double e)
getEpsilon
public double getEpsilon()
setEpisodes
public void setEpisodes(int e)
getEpisodes
public int getEpisodes()
setActionSelection
public void setActionSelection(int as)
getActionSelection
public int getActionSelection()
setLearningMethod
public void setLearningMethod(int lm)
getLearningMethod
public int getLearningMethod()
newPolicy
public RLPolicy newPolicy()