public class TigerObservations extends java.lang.Object implements DiscreteObservationFunction
Modifier and Type | Field and Description |
---|---|
protected boolean |
includeDoNothing |
protected double |
listenAccuracy |
Constructor and Description |
---|
TigerObservations(double listenAccuracy,
boolean includeDoNothing) |
Modifier and Type | Method and Description |
---|---|
java.util.List<State> |
allObservations()
Returns a
List containing all possible observations. |
protected State |
observationLeft()
Returns the observation of hearing the tiger behind the left door
|
protected State |
observationNothing()
Returns the observation of hearing nothing; occurs when the do nothing action is selected
|
protected State |
observationReset()
Returns the observation of approaching a new pair of doors
|
protected State |
observationRight()
Returns the observation of hearing the tiger behind the right door
|
java.util.List<ObservationProbability> |
probabilities(State state,
Action action)
Returns the observation probability mass/density function for all observations that have non-zero mass/density conditioned on the true MDP state and previous action taken that led to the state.
|
double |
probability(State observation,
State state,
Action action)
Returns the probability that an observation will be observed conditioned on the MDP state and previous action taken that led to the state.
|
State |
sample(State state,
Action action)
Samples an observation given the true MDP state and action taken in the previous step that led to the MDP state.
|
protected double listenAccuracy
protected boolean includeDoNothing
public TigerObservations(double listenAccuracy, boolean includeDoNothing)
public java.util.List<State> allObservations()
DiscreteObservationFunction
List
containing all possible observations. Observations are represented with a class that implements the State
interface, since observations may consist of multiple observations of distinct objects in the world.allObservations
in interface DiscreteObservationFunction
List
of all possible observations.public State sample(State state, Action action)
ObservationFunction
sample
in interface ObservationFunction
state
- the true MDP stateaction
- the action that led to the MDP stateState
.public double probability(State observation, State state, Action action)
ObservationFunction
probability
in interface ObservationFunction
observation
- the observation, represented by a State
state
- The true MDP state that generated the observation.action
- the action that led to the MDP state and which generated the observationpublic java.util.List<ObservationProbability> probabilities(State state, Action action)
DiscreteObservationFunction
List
of ObservationProbability
objects,
which is a pair of an observation (represented by a State
and double specifying its mass/density.probabilities
in interface DiscreteObservationFunction
state
- the true MDP state that generated the observationsaction
- the action that led to the MDP state and which generated the observations.List
of ObservationProbability
objects.protected State observationLeft()
State
specifying the observation of hearing the tiger behind the left doorprotected State observationRight()
State
specifying the observation of hearing the tiger behind the right doorprotected State observationReset()
State
specifying the observation of approaching a new pair of doors