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 |
addNonDomainReferencedAction(Action a)
Adds an additional action the solver that is not included in the domain definition.
|
java.util.List<Action> |
getActions()
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. |
RewardFunction |
getRf()
Returns the
RewardFunction this solver uses. |
RewardFunction |
getRF()
Returns the
RewardFunction this solver uses. |
TerminalFunction |
getTf()
Returns the
TerminalFunction this solver uses. |
TerminalFunction |
getTF()
Returns the
TerminalFunction this solver uses. |
void |
resetSolver()
This method resets all solver results so that a solver can be restarted fresh
as if had never solved the MDP.
|
void |
setActions(java.util.List<Action> actions)
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(Domain 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 |
setRf(RewardFunction rf)
Sets the reward function used by this solver
|
void |
setTf(TerminalFunction tf)
Sets the terminal state function used by this solver
|
void |
solverInit(Domain domain,
RewardFunction rf,
TerminalFunction tf,
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(Domain domain, RewardFunction rf, TerminalFunction tf, double gamma, HashableStateFactory hashingFactory)
domain
- the domain to be solved.rf
- the reward functiontf
- the terminal state functiongamma
- 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(Domain domain)
addNonDomainReferencedAction(burlap.oomdp.singleagent.Action)
method, you will have to do so again.domain
- the domain this solver should use.Domain getDomain()
Domain
this solver solves.Domain
this solver solves.void addNonDomainReferencedAction(Action a)
Option
should be added using this method.a
- the action to add to the solvervoid setActions(java.util.List<Action> actions)
actions
- the actions the solver should use.java.util.List<Action> getActions()
Option
s). Modifying
the returned list will not modify the action list this solver uses.List
of all actions this solver uses.TerminalFunction getTF()
TerminalFunction
this solver uses.TerminalFunction
this solver uses.RewardFunction getRF()
RewardFunction
this solver uses.RewardFunction
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.void setRf(RewardFunction rf)
rf
- the reward function to be used by this solverRewardFunction getRf()
RewardFunction
this solver uses.RewardFunction
this solver uses.void setTf(TerminalFunction tf)
tf
- the terminal function to be used by this solverTerminalFunction getTf()
TerminalFunction
this solver uses.TerminalFunction
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