Class sdm::SerializedMPOMDP
Class List > sdm > SerializedMPOMDP
#include <serialized_mpomdp.hpp>
Inherits the following classes: sdm::SerialMPOMDPInterface, sdm::SerializedMMDP
Public Functions
Type | Name |
---|---|
SerializedMPOMDP (std::shared_ptr< MPOMDPInterface > mpomdp) | |
virtual std::shared_ptr< Joint< std::shared_ptr< Observation > > > | getDefaultObservation () const |
virtual double | getDynamics (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 Get the Dynamics object. |
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 Get the Obs Probability object. |
virtual std::shared_ptr< Space > | getObservationSpace (number t) const Get the reachable next states. |
virtual std::shared_ptr< Space > | getObservationSpace (number agent_id, number t) const Get ths observation space of agent i at timestep t. |
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 Get the Reachablel Observations object. |
Public Functions inherited from sdm::SerialMPOMDPInterface
See sdm::SerialMPOMDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Joint< std::shared_ptr< Observation > > > | getDefaultObservation () const = 0 |
Public Functions inherited from sdm::MMDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number agent_id, number t) const = 0 Get ths action space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
Public Functions inherited from sdm::MDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
virtual double | getDiscount (number t) const = 0 Get the discount factor at timestep t. |
virtual number | getHorizon () const = 0 Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const = 0 |
virtual double | getMaxReward (number t) const = 0 |
virtual double | getMinReward (number t) const = 0 |
virtual number | getNumAgents () const = 0 Get the number of agents. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get reachable states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get the reward at timestep t when executing an action in a specific state. |
virtual std::shared_ptr< Distribution< std::shared_ptr< State > > > | getStartDistribution () const = 0 Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t) const = 0 Get ths state space at timestep t. |
virtual double | getTransitionProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) const = 0 _Get the transition probability, i.e. p(s' |
virtual void | setInternalState (std::shared_ptr< State > state) = 0 |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action, bool increment_timestep) = 0 |
Public Functions inherited from sdm::GymInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) = 0 Get the action space. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) = 0 Get random action. |
virtual std::shared_ptr< Observation > | reset () = 0 Reset the environment and return initial observation. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
Public Functions inherited from sdm::SerialProblemInterface
See sdm::SerialProblemInterface
Type | Name |
---|---|
virtual number | getAgentId (number t) const = 0 Get the identifier of the current agent. |
virtual bool | isLastAgent (number t) const = 0 |
Public Functions inherited from sdm::MPOMDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getObservationSpace (number agent_id, number t) const = 0 Get ths observation space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getObservationSpace (number t) const = 0 Get ths observation space at timestep t. |
Public Functions inherited from sdm::MMDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number agent_id, number t) const = 0 Get ths action space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
Public Functions inherited from sdm::MDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
virtual double | getDiscount (number t) const = 0 Get the discount factor at timestep t. |
virtual number | getHorizon () const = 0 Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const = 0 |
virtual double | getMaxReward (number t) const = 0 |
virtual double | getMinReward (number t) const = 0 |
virtual number | getNumAgents () const = 0 Get the number of agents. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get reachable states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get the reward at timestep t when executing an action in a specific state. |
virtual std::shared_ptr< Distribution< std::shared_ptr< State > > > | getStartDistribution () const = 0 Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t) const = 0 Get ths state space at timestep t. |
virtual double | getTransitionProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) const = 0 _Get the transition probability, i.e. p(s' |
virtual void | setInternalState (std::shared_ptr< State > state) = 0 |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action, bool increment_timestep) = 0 |
Public Functions inherited from sdm::GymInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) = 0 Get the action space. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) = 0 Get random action. |
virtual std::shared_ptr< Observation > | reset () = 0 Reset the environment and return initial observation. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
Public Functions inherited from sdm::POMDPInterface
Type | Name |
---|---|
virtual double | getDynamics (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 dynamics, i.e. p(s', o |
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 observation probability, i.e. p(o |
virtual std::shared_ptr< Space > | getObservationSpace (number t) const = 0 Get ths observation space at timestep t. |
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. |
Public Functions inherited from sdm::MDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
virtual double | getDiscount (number t) const = 0 Get the discount factor at timestep t. |
virtual number | getHorizon () const = 0 Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const = 0 |
virtual double | getMaxReward (number t) const = 0 |
virtual double | getMinReward (number t) const = 0 |
virtual number | getNumAgents () const = 0 Get the number of agents. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get reachable states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get the reward at timestep t when executing an action in a specific state. |
virtual std::shared_ptr< Distribution< std::shared_ptr< State > > > | getStartDistribution () const = 0 Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t) const = 0 Get ths state space at timestep t. |
virtual double | getTransitionProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) const = 0 _Get the transition probability, i.e. p(s' |
virtual void | setInternalState (std::shared_ptr< State > state) = 0 |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action, bool increment_timestep) = 0 |
Public Functions inherited from sdm::GymInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) = 0 Get the action space. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) = 0 Get random action. |
virtual std::shared_ptr< Observation > | reset () = 0 Reset the environment and return initial observation. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
Public Functions inherited from sdm::SerializedMMDP
Type | Name |
---|---|
SerializedMMDP (const std::shared_ptr< MMDPInterface > & mmdp) | |
virtual std::shared_ptr< Space > | getActionSpace (number t=0) const Get all actions at a specific time step. |
virtual std::shared_ptr< Space > | getActionSpace (number agent_id, number t) const Get the Action Space at a specific time step and a precise agent. |
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) Get the action space. |
virtual number | getAgentId (number t) const Get the identifier of the current agent. |
virtual double | getDiscount (number t=0) const Get the discount factor at timestep t. |
virtual number | getHorizon () const Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const |
virtual double | getMaxReward (number t=0) const |
virtual double | getMinReward (number t=0) const |
virtual number | getNumAgents () const Get the number of agents. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) Get random action. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t=0) const Get the reachable next states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t=0) const Get the reward. |
virtual std::shared_ptr< Distribution< std::shared_ptr< State > > > | getStartDistribution () const Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t=0) const Get all states. |
virtual double | getTransitionProbability (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 Transition Probability object. |
virtual bool | isLastAgent (number t) const |
virtual std::shared_ptr< Observation > | reset () Reset the environment and return initial observation. |
virtual void | setInternalState (std::shared_ptr< State > state) |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) Do a step on the environment. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action, bool increment_timestep) |
virtual | ~SerializedMMDP () |
Public Functions inherited from sdm::MMDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number agent_id, number t) const = 0 Get ths action space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
Public Functions inherited from sdm::MDPInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpace (number t) const = 0 Get ths action space at timestep t. |
virtual double | getDiscount (number t) const = 0 Get the discount factor at timestep t. |
virtual number | getHorizon () const = 0 Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const = 0 |
virtual double | getMaxReward (number t) const = 0 |
virtual double | getMinReward (number t) const = 0 |
virtual number | getNumAgents () const = 0 Get the number of agents. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get reachable states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0 Get the reward at timestep t when executing an action in a specific state. |
virtual std::shared_ptr< Distribution< std::shared_ptr< State > > > | getStartDistribution () const = 0 Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t) const = 0 Get ths state space at timestep t. |
virtual double | getTransitionProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_state, number t) const = 0 _Get the transition probability, i.e. p(s' |
virtual void | setInternalState (std::shared_ptr< State > state) = 0 |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action, bool increment_timestep) = 0 |
Public Functions inherited from sdm::GymInterface
Type | Name |
---|---|
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) = 0 Get the action space. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) = 0 Get random action. |
virtual std::shared_ptr< Observation > | reset () = 0 Reset the environment and return initial observation. |
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > | step (std::shared_ptr< Action > action) = 0 Do a step on the environment. |
Public Functions inherited from sdm::SerialProblemInterface
See sdm::SerialProblemInterface
Type | Name |
---|---|
virtual number | getAgentId (number t) const = 0 Get the identifier of the current agent. |
virtual bool | isLastAgent (number t) const = 0 |
Protected Attributes
Type | Name |
---|---|
std::shared_ptr< Observation > | empty_serial_observation |
std::shared_ptr< ObservationDynamicsInterface > | obs_dynamics_ Map (serial state, seial action, serial observation, serial state) to Set of reachable seial observation. |
Joint< std::shared_ptr< DiscreteSpace > > | serialized_observation_space_ Create the Observation __Space . |
Protected Attributes inherited from sdm::SerializedMMDP
Type | Name |
---|---|
std::shared_ptr< Distribution< std::shared_ptr< State > > > | distribution_serial |
std::unordered_map< Joint< std::shared_ptr< Action > >, std::shared_ptr< Action > > | map_joint_action_to_pointeur Map the joint_action to a precise pointeur of Action. |
std::unordered_map< SerializedState, std::shared_ptr< State > > | map_serialized_state_to_pointeur Map the serialState to a precise pointeur of State . |
std::shared_ptr< MMDPInterface > | mmdp_ The mmpdp associated to the problem. |
Joint< std::shared_ptr< DiscreteSpace > > | serialized_state_space_ Refer to the Serialized State __Space . |
std::shared_ptr< StateDynamicsInterface > | state_dynamics_ Map (serial state, seial action) to Set of reachable seial states. |
Protected Functions
Type | Name |
---|---|
const std::shared_ptr< Observation > | getPointeurObservation (Joint< std::shared_ptr< Observation >> &) const Get the Pointeur object of a precise Joint Action. |
void | setReachableObservationSpace (std::shared_ptr< MPOMDPInterface > mpomdp) Initialize "reachable_observation_space". |
void | setupObservationSpace (std::shared_ptr< MPOMDPInterface > mpomdp) Initialize Serial Observation __Space . |
Protected Functions inherited from sdm::SerializedMMDP
Type | Name |
---|---|
Joint< std::shared_ptr< Action > > | addNewAction (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & new_action) const A serial state is composed by a vector of action, in this function, we add a new action to the current vector of action/. |
void | createDistribution () |
void | createInitReachableStateSpace () Initialize "serialized_state_space_". |
void | createInitSerializedStateSpace () Initialize Serial State __Space . |
const std::shared_ptr< Action > | getPointeurJointAction (Joint< std::shared_ptr< Action >> &) const Get the Pointeur object of a precise Joint Action. |
const std::shared_ptr< State > | getPointeurState (SerializedState &) const Get the Pointeur object of a precise Joint Action. |
void | setJointActionToPointeur (std::vector< Joint< std::shared_ptr< Action >>>) |
Public Functions Documentation
function SerializedMPOMDP
sdm::SerializedMPOMDP::SerializedMPOMDP (
std::shared_ptr< MPOMDPInterface > mpomdp
)
function getDefaultObservation
virtual std::shared_ptr< Joint < std::shared_ptr< Observation > > > sdm::SerializedMPOMDP::getDefaultObservation () const
Implements sdm::SerialMPOMDPInterface::getDefaultObservation
function getDynamics
virtual double sdm::SerializedMPOMDP::getDynamics (
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
Parameters:
state
action
next_state
observation
t
Returns:
double
Implements sdm::POMDPInterface::getDynamics
function getObservationProbability
virtual double sdm::SerializedMPOMDP::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
Parameters:
state
action
next_state
observation
t
Returns:
double
Implements sdm::POMDPInterface::getObservationProbability
function getObservationSpace [1/2]
virtual std::shared_ptr< Space > sdm::SerializedMPOMDP::getObservationSpace (
number t
) const
Parameters:
state
the stateaction
the action
Returns:
the set of reachable states
Implements sdm::MPOMDPInterface::getObservationSpace
function getObservationSpace [2/2]
virtual std::shared_ptr< Space > sdm::SerializedMPOMDP::getObservationSpace (
number agent_id,
number t
) const
Parameters:
agent_id
the identifier of the agentt
the timestep
Returns:
the observation space
Implements sdm::MPOMDPInterface::getObservationSpace
function getReachableObservations
virtual std::set< std::shared_ptr< Observation > > sdm::SerializedMPOMDP::getReachableObservations (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
number t
) const
Parameters:
state
action
next_state
t
Returns:
std::set<std::shared_ptr<Observation>>
Implements sdm::POMDPInterface::getReachableObservations
Protected Attributes Documentation
variable empty_serial_observation
std::shared_ptr<Observation> sdm::SerializedMPOMDP::empty_serial_observation;
variable obs_dynamics_
std::shared_ptr<ObservationDynamicsInterface> sdm::SerializedMPOMDP::obs_dynamics_;
variable serialized_observation_space_
Joint<std::shared_ptr<DiscreteSpace> > sdm::SerializedMPOMDP::serialized_observation_space_;
Protected Functions Documentation
function getPointeurObservation
const std::shared_ptr< Observation > sdm::SerializedMPOMDP::getPointeurObservation (
Joint < std::shared_ptr< Observation >> &
) const
Returns:
std::shared_ptr<Joint<std::shared_ptr<Action>>>
function setReachableObservationSpace
void sdm::SerializedMPOMDP::setReachableObservationSpace (
std::shared_ptr< MPOMDPInterface > mpomdp
)
function setupObservationSpace
void sdm::SerializedMPOMDP::setupObservationSpace (
std::shared_ptr< MPOMDPInterface > mpomdp
)
The documentation for this class was generated from the following file src/sdm/world/serialized_mpomdp.hpp