Class sdm::TabularObservationDynamicsSAS
Class List > sdm > TabularObservationDynamicsSAS
Tabular representation for the observation dynamics p(o' | s, a, s'). More...
#include <tabular_observation_dynamics_SAS.hpp>
Inherits the following classes: sdm::TabularObservationDynamics
Public Functions
Type | Name |
---|---|
TabularObservationDynamicsSAS () | |
TabularObservationDynamicsSAS (const TabularObservationDynamicsSAS & copy) | |
virtual std::shared_ptr< Distribution< std::shared_ptr< Observation > > > | getNextObservationDistribution (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) Get the distribution over next observations. |
virtual const MappedVector< std::shared_ptr< Observation > > & | getObservationProbabilities (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) const Get the observation vector for a given action and next state. |
virtual double | getObservationProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, number t=0) const Get the observation probability. |
virtual std::set< std::shared_ptr< Observation > > | getReachableObservations (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) const Get reachable observations from a state, suppose a specific action was executed. |
void | setObservationModel (const std::unordered_map< std::shared_ptr< State >, std::unordered_map< std::shared_ptr< Action >, MappedMatrix< std::shared_ptr< State >, std::shared_ptr< Observation >>>> & o_model) |
virtual void | setObservationProbabilities (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const MappedVector< std::shared_ptr< Observation >> & observation_probas) Set the observation probability. |
virtual void | setObservationProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, double proba) Set the observation probability. |
virtual void | setReachableObservations (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, number t=0) Set _the the state / observation transition probability (i.e. p(s', o |
virtual | ~TabularObservationDynamicsSAS () |
Public Functions inherited from sdm::TabularObservationDynamics
See sdm::TabularObservationDynamics
Type | Name |
---|---|
virtual std::shared_ptr< Distribution< std::shared_ptr< Observation > > > | getNextObservationDistribution (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) = 0 Get the distribution over next observations. |
virtual const MappedVector< std::shared_ptr< Observation > > & | getObservationProbabilities (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) const = 0 Get the observation vector for a given action and next state. |
virtual double | getObservationProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, number t=0) const = 0 Get the observation probability. |
virtual std::set< std::shared_ptr< Observation > > | getReachableObservations (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t=0) const = 0 Get reachable observations from a state, suppose a specific action was executed. |
virtual void | setObservationProbabilities (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const MappedVector< std::shared_ptr< Observation >> & observation_probas) = 0 Set the observation probability. |
virtual void | setObservationProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, double proba) = 0 Set the observation probability. |
virtual void | setReachableObservations (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, number t=0) = 0 Set _the the state / observation transition probability (i.e. p(s', o |
Public Functions inherited from sdm::ObservationDynamicsInterface
See sdm::ObservationDynamicsInterface
Type | Name |
---|---|
virtual std::shared_ptr< Distribution< std::shared_ptr< Observation > > > | getNextObservationDistribution (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) = 0 Get the distribution over next observations. |
virtual double | getObservationProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, number t) const = 0 _Get the the state / observation transition probability (i.e. p(o |
virtual std::set< std::shared_ptr< Observation > > | getReachableObservations (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) const = 0 Get reachable observations from a state, suppose a specific action was executed. |
Protected Attributes
Type | Name |
---|---|
std::unordered_map< std::shared_ptr< State >, std::unordered_map< std::shared_ptr< Action >, std::unordered_map< std::shared_ptr< State >, std::shared_ptr< DiscreteDistribution< std::shared_ptr< Observation > > > > > > | next_observations_distrib_ map from state, current action pairs to the distribution over next states |
std::unordered_map< std::shared_ptr< State >, std::unordered_map< std::shared_ptr< Action >, MappedMatrix< std::shared_ptr< State >, std::shared_ptr< Observation > > > > | observation_model_ transition and observation matrices |
std::unordered_map< std::shared_ptr< State >, std::unordered_map< std::shared_ptr< Action >, std::unordered_map< std::shared_ptr< State >, std::set< std::shared_ptr< Observation > > > > > | successor_observations_ map from current state, current action and next-state to the set of next observations |
Protected Functions
Type | Name |
---|---|
void | updateNextObsDistribution (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, const std::shared_ptr< Observation > & observation, double proba) |
Detailed Description
The class is optimized to provide a constant time access to all transition probabilities and reachable observations. The representation used is an array containing probabilities p(o' | s, a, s').
Public Functions Documentation
function TabularObservationDynamicsSAS [1/2]
sdm::TabularObservationDynamicsSAS::TabularObservationDynamicsSAS ()
function TabularObservationDynamicsSAS [2/2]
sdm::TabularObservationDynamicsSAS::TabularObservationDynamicsSAS (
const TabularObservationDynamicsSAS & copy
)
function getNextObservationDistribution
virtual std::shared_ptr< Distribution < std::shared_ptr< Observation > > > sdm::TabularObservationDynamicsSAS::getNextObservationDistribution (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
number t=0
)
Parameters:
state
the stateaction
the actionnext_state
the next statet
the timestep
Returns:
the distribution over observations
Implements sdm::TabularObservationDynamics::getNextObservationDistribution
function getObservationProbabilities
virtual const MappedVector < std::shared_ptr< Observation > > & sdm::TabularObservationDynamicsSAS::getObservationProbabilities (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
number t=0
) const
Parameters:
action
the action
Returns:
the observation matrix
Implements sdm::TabularObservationDynamics::getObservationProbabilities
function getObservationProbability
virtual double sdm::TabularObservationDynamicsSAS::getObservationProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
const std::shared_ptr< Observation > & observation,
number t=0
) const
Parameters:
state
a specific state (timestep t)action
a specific actionobs
a specific observationnext_state
a specific state (timestep t+1)
Returns:
double a probability
Implements sdm::TabularObservationDynamics::getObservationProbability
function getReachableObservations
virtual std::set< std::shared_ptr< Observation > > sdm::TabularObservationDynamicsSAS::getReachableObservations (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
number t=0
) const
Parameters:
state
the current stateaction
the current actiont
the timestep
Returns:
the list of next reachable observations
Implements sdm::TabularObservationDynamics::getReachableObservations
function setObservationModel
void sdm::TabularObservationDynamicsSAS::setObservationModel (
const std::unordered_map< std::shared_ptr< State >, std::unordered_map< std::shared_ptr< Action >, MappedMatrix < std::shared_ptr< State >, std::shared_ptr< Observation >>>> & o_model
)
function setObservationProbabilities
virtual void sdm::TabularObservationDynamicsSAS::setObservationProbabilities (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
const MappedVector < std::shared_ptr< Observation >> & observation_probas
)
Parameters:
action
next_state
observation_probas
Implements sdm::TabularObservationDynamics::setObservationProbabilities
function setObservationProbability
virtual void sdm::TabularObservationDynamicsSAS::setObservationProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
const std::shared_ptr< Observation > & observation,
double proba
)
Parameters:
action
a specific actionobservation
a specific observationnext_state
a specific stateproba
a probability
Implements sdm::TabularObservationDynamics::setObservationProbability
function setReachableObservations
virtual void sdm::TabularObservationDynamicsSAS::setReachableObservations (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
const std::shared_ptr< Observation > & observation,
number t=0
)
Parameters:
state
the stateaction
the actionnext_state
the next stateobservation
the observationproba
the probabilityt
the timestep
Returns:
double the probability
Implements sdm::TabularObservationDynamics::setReachableObservations
function ~TabularObservationDynamicsSAS
virtual sdm::TabularObservationDynamicsSAS::~TabularObservationDynamicsSAS ()
Protected Attributes Documentation
variable next_observations_distrib_
std::unordered_map<std::shared_ptr<State>, std::unordered_map<std::shared_ptr<Action>, std::unordered_map<std::shared_ptr<State>, std::shared_ptr<DiscreteDistribution<std::shared_ptr<Observation> > > > > > sdm::TabularObservationDynamicsSAS::next_observations_distrib_;
variable observation_model_
std::unordered_map<std::shared_ptr<State>, std::unordered_map<std::shared_ptr<Action>, MappedMatrix<std::shared_ptr<State>, std::shared_ptr<Observation> > > > sdm::TabularObservationDynamicsSAS::observation_model_;
variable successor_observations_
std::unordered_map<std::shared_ptr<State>, std::unordered_map<std::shared_ptr<Action>, std::unordered_map<std::shared_ptr<State>, std::set<std::shared_ptr<Observation> > > > > sdm::TabularObservationDynamicsSAS::successor_observations_;
Protected Functions Documentation
function updateNextObsDistribution
void sdm::TabularObservationDynamicsSAS::updateNextObsDistribution (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
const std::shared_ptr< Observation > & observation,
double proba
)
The documentation for this class was generated from the following file src/sdm/core/dynamics/tabular_observation_dynamics_SAS.hpp