public class RMaxModel extends java.lang.Object implements KWIKModel
KWIKModel.Helper
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ActionType> |
actionsTypes |
protected double |
gamma |
protected PotentialFunction |
potentialFunction |
protected KWIKModel |
sourceModel |
Constructor and Description |
---|
RMaxModel(KWIKModel sourceModel,
PotentialFunction potentialFunction,
double gamma,
java.util.List<ActionType> actionsTypes) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ActionType> |
getActionsTypes() |
double |
getGamma() |
PotentialFunction |
getPotentialFunction() |
KWIKModel |
getSourceModel() |
protected void |
modifyEO(EnvironmentOutcome eo) |
void |
resetModel()
Resets the model data so that learning can begin anew.
|
EnvironmentOutcome |
sample(State s,
Action a)
Samples a transition from the transition distribution and returns it.
|
void |
setActionsTypes(java.util.List<ActionType> actionsTypes) |
void |
setGamma(double gamma) |
void |
setPotentialFunction(PotentialFunction potentialFunction) |
void |
setSourceModel(KWIKModel sourceModel) |
boolean |
terminal(State s)
Indicates whether a state is a terminal state (i.e., no more action occurs and zero reward received from there on out)
|
boolean |
transitionIsModeled(State s,
Action a)
Indicates whether this model "knows" how the transition dynamics from the given input state and action work.
|
java.util.List<TransitionProb> |
transitions(State s,
Action a)
|
void |
updateModel(EnvironmentOutcome eo)
Updates this model with respect to the observed
EnvironmentOutcome . |
protected KWIKModel sourceModel
protected PotentialFunction potentialFunction
protected double gamma
protected java.util.List<ActionType> actionsTypes
public RMaxModel(KWIKModel sourceModel, PotentialFunction potentialFunction, double gamma, java.util.List<ActionType> actionsTypes)
public boolean transitionIsModeled(State s, Action a)
KWIKModel
transitionIsModeled
in interface KWIKModel
s
- the state that is checkeda
- the action to take in state spublic void updateModel(EnvironmentOutcome eo)
LearnedModel
EnvironmentOutcome
.updateModel
in interface LearnedModel
eo
- The EnvironmentOutcome
specifying the observed interaction with an Environment
.public void resetModel()
LearnedModel
resetModel
in interface LearnedModel
public java.util.List<TransitionProb> transitions(State s, Action a)
FullModel
Action
is applied in State
s. The returned
list only needs to include transitions that have non-zero probability of occurring.transitions
in interface FullModel
s
- the source State
a
- the Action
applied in the source statepublic EnvironmentOutcome sample(State s, Action a)
SampleModel
sample
in interface SampleModel
s
- the source statea
- the action taken in the source stateEnvironmentOutcome
describing the sampled transitionpublic boolean terminal(State s)
SampleModel
terminal
in interface SampleModel
s
- the input state to testprotected void modifyEO(EnvironmentOutcome eo)
public KWIKModel getSourceModel()
public void setSourceModel(KWIKModel sourceModel)
public PotentialFunction getPotentialFunction()
public void setPotentialFunction(PotentialFunction potentialFunction)
public double getGamma()
public void setGamma(double gamma)
public java.util.List<ActionType> getActionsTypes()
public void setActionsTypes(java.util.List<ActionType> actionsTypes)