public class QLTutorial extends MDPSolver implements LearningAgent, QFunction
QFunction.QFunctionHelperactions, debugCode, domain, gamma, hashingFactory, mapToStateIndex, rf, tf| Constructor and Description |
|---|
QLTutorial(Domain domain,
double gamma,
HashableStateFactory hashingFactory,
ValueFunctionInitialization qinit,
double learningRate,
double epsilon) |
| Modifier and Type | Method and Description |
|---|---|
QValue |
getQ(State s,
AbstractGroundedAction a)
Returns the
QValue for the given state-action pair. |
java.util.List<QValue> |
getQs(State s)
Returns a
List of QValue objects for ever permissible action for the given input state. |
static void |
main(java.lang.String[] args) |
void |
resetSolver()
This method resets all solver results so that a solver can be restarted fresh
as if had never solved the MDP.
|
EpisodeAnalysis |
runLearningEpisode(Environment env) |
EpisodeAnalysis |
runLearningEpisode(Environment env,
int maxSteps) |
double |
value(State s)
Returns the value function evaluation of the given state.
|
addNonDomainReferencedAction, getActions, getAllGroundedActions, getDebugCode, getDomain, getGamma, getHashingFactory, getRf, getRF, getTf, getTF, setActions, setDebugCode, setDomain, setGamma, setHashingFactory, setRf, setTf, solverInit, stateHash, toggleDebugPrinting, translateActionpublic QLTutorial(Domain domain, double gamma, HashableStateFactory hashingFactory, ValueFunctionInitialization qinit, double learningRate, double epsilon)
public EpisodeAnalysis runLearningEpisode(Environment env)
runLearningEpisode in interface LearningAgentpublic EpisodeAnalysis runLearningEpisode(Environment env, int maxSteps)
runLearningEpisode in interface LearningAgentpublic void resetSolver()
MDPSolverInterfaceresetSolver in interface MDPSolverInterfaceresetSolver in class MDPSolverpublic java.util.List<QValue> getQs(State s)
QFunctionList of QValue objects for ever permissible action for the given input state.public QValue getQ(State s, AbstractGroundedAction a)
QFunctionQValue for the given state-action pair.public double value(State s)
ValueFunctionvalue in interface ValueFunctions - the state to evaluate.public static void main(java.lang.String[] args)