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)
KWIKModeltransitionIsModeled in interface KWIKModels - the state that is checkeda - the action to take in state spublic void updateModel(EnvironmentOutcome eo)
LearnedModelEnvironmentOutcome.updateModel in interface LearnedModeleo - The EnvironmentOutcome specifying the observed interaction with an Environment.public void resetModel()
LearnedModelresetModel in interface LearnedModelpublic java.util.List<TransitionProb> transitions(State s, Action a)
FullModelAction is applied in State s. The returned
list only needs to include transitions that have non-zero probability of occurring.transitions in interface FullModels - the source Statea - the Action applied in the source statepublic EnvironmentOutcome sample(State s, Action a)
SampleModelsample in interface SampleModels - the source statea - the action taken in the source stateEnvironmentOutcome describing the sampled transitionpublic boolean terminal(State s)
SampleModelterminal in interface SampleModels - 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)