aima.learning.reinforcement
Class QTable<STATE_TYPE,ACTION_TYPE>
java.lang.Object
aima.learning.reinforcement.QTable<STATE_TYPE,ACTION_TYPE>
public class QTable<STATE_TYPE,ACTION_TYPE>
- extends java.lang.Object
Method Summary |
MDPPolicy<STATE_TYPE,ACTION_TYPE> |
getPolicy()
|
java.lang.Double |
getQValue(STATE_TYPE state,
ACTION_TYPE action)
|
Pair<ACTION_TYPE,java.lang.Double> |
maxDiff(STATE_TYPE startState,
ACTION_TYPE action,
STATE_TYPE endState)
|
void |
normalize()
|
void |
setQValue(STATE_TYPE state,
ACTION_TYPE action,
java.lang.Double d)
|
java.lang.String |
toString()
|
ACTION_TYPE |
upDateQ(STATE_TYPE startState,
ACTION_TYPE action,
STATE_TYPE endState,
double alpha,
double reward,
double phi)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QTable
public QTable(java.util.List<ACTION_TYPE> allPossibleActions)
getQValue
public java.lang.Double getQValue(STATE_TYPE state,
ACTION_TYPE action)
maxDiff
public Pair<ACTION_TYPE,java.lang.Double> maxDiff(STATE_TYPE startState,
ACTION_TYPE action,
STATE_TYPE endState)
setQValue
public void setQValue(STATE_TYPE state,
ACTION_TYPE action,
java.lang.Double d)
upDateQ
public ACTION_TYPE upDateQ(STATE_TYPE startState,
ACTION_TYPE action,
STATE_TYPE endState,
double alpha,
double reward,
double phi)
normalize
public void normalize()
getPolicy
public MDPPolicy<STATE_TYPE,ACTION_TYPE> getPolicy()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object