public interface MDPSolverInterface
MDPSolver
abstract class instead of using this interface directly, since the MDPSolver
will provide
relevant data members, implement these methods, and provide additional helper methods.Modifier and Type | Method and Description |
---|---|
void |
addActionType(ActionType a)
Adds an additional action the solver that is not included in the domain definition.
|
java.util.List<ActionType> |
getActionTypes()
Returns a copy of all actions this solver uses for reasoning; including added actions that are not part of the
domain specification (e.g.,
Option s). |
int |
getDebugCode()
Returns the debug code used by this solver for calls to
DPrint |
Domain |
getDomain()
Returns the
Domain this solver solves. |
double |
getGamma()
Returns gamma, the discount factor used by this solver
|
HashableStateFactory |
getHashingFactory()
Returns the
HashableStateFactory this solver uses. |
SampleModel |
getModel()
Returns the model being used by this solver
|
void |
resetSolver()
This method resets all solver results so that a solver can be restarted fresh
as if had never solved the MDP.
|
void |
setActionTypes(java.util.List<ActionType> actionTypes)
Sets the action set the solver should use.
|
void |
setDebugCode(int code)
Sets the debug code to be used by calls to
DPrint |
void |
setDomain(SADomain domain)
Sets the domain of this solver.
|
void |
setGamma(double gamma)
Sets gamma, the discount factor used by this solver
|
void |
setHashingFactory(HashableStateFactory hashingFactory)
Sets the
HashableStateFactory used to hash states for tabular solvers. |
void |
setModel(SampleModel model)
Sets the model to use for this solver
|
void |
solverInit(SADomain domain,
double gamma,
HashableStateFactory hashingFactory)
Initializes the solver with the common elements.
|
void |
toggleDebugPrinting(boolean toggle)
Toggles whether the solver's calls to
DPrint should be printed. |
void solverInit(SADomain domain, double gamma, HashableStateFactory hashingFactory)
domain
- the domain to be solved.gamma
- the MDP discount factorhashingFactory
- the hashing factory used to store states (may be set to null if the solver is not tabular)void resetSolver()
void setDomain(SADomain domain)
addActionType(ActionType)
method, you will have to do so again.domain
- the domain this solver should use.void setModel(SampleModel model)
model
- the model to useSampleModel getModel()
SampleModel
Domain getDomain()
Domain
this solver solves.Domain
this solver solves.void addActionType(ActionType a)
Option
should be added using this method.a
- the action to add to the solvervoid setActionTypes(java.util.List<ActionType> actionTypes)
actionTypes
- the actions the solver should use.java.util.List<ActionType> getActionTypes()
Option
s). Modifying
the returned list will not modify the action list this solver uses.List
of all actions this solver uses.void setHashingFactory(HashableStateFactory hashingFactory)
HashableStateFactory
used to hash states for tabular solvers.hashingFactory
- the HashableStateFactory
used to hash states for tabular solvers.HashableStateFactory getHashingFactory()
HashableStateFactory
this solver uses.HashableStateFactory
this solver uses.double getGamma()
void setGamma(double gamma)
gamma
- the discount factor used by this solvervoid setDebugCode(int code)
DPrint
code
- the code to be used by DPrint
int getDebugCode()
DPrint
DPrint