public class QLTutorial extends MDPSolver implements LearningAgent, QFunction
QFunction.QFunctionHelper
actions, 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, translateAction
public QLTutorial(Domain domain, double gamma, HashableStateFactory hashingFactory, ValueFunctionInitialization qinit, double learningRate, double epsilon)
public EpisodeAnalysis runLearningEpisode(Environment env)
runLearningEpisode
in interface LearningAgent
public EpisodeAnalysis runLearningEpisode(Environment env, int maxSteps)
runLearningEpisode
in interface LearningAgent
public void resetSolver()
MDPSolverInterface
resetSolver
in interface MDPSolverInterface
resetSolver
in class MDPSolver
public java.util.List<QValue> getQs(State s)
QFunction
List
of QValue
objects for ever permissible action for the given input state.public QValue getQ(State s, AbstractGroundedAction a)
QFunction
QValue
for the given state-action pair.public double value(State s)
ValueFunction
value
in interface ValueFunction
s
- the state to evaluate.public static void main(java.lang.String[] args)