Class sdm::TransformedMPOMDP
Class List > sdm > TransformedMPOMDP
#include <transformed_mpomdp.hpp>
Inherits the following classes: sdm::MPOMDPInterface
Inherited by the following classes: sdm::HierarchicalMPOMDP
Public Functions
Type | Name |
---|---|
TransformedMPOMDP (const std::shared_ptr< MPOMDPInterface > & mpomdp) | |
virtual std::shared_ptr< Space > | getActionSpace (number agent_id, number t) const Get ths action space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getActionSpace (number t) const Get ths action space at timestep t. |
virtual std::shared_ptr< Space > | getActionSpaceAt (const std::shared_ptr< Observation > & observation, number t) Get the action space. |
virtual double | getDiscount (number t) const Get the discount factor at timestep t. |
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, i.e. p(s', o |
virtual number | getHorizon () const Get the number of agents. |
virtual std::shared_ptr< State > | getInternalState () const |
virtual double | getMaxReward (number t) const |
virtual double | getMinReward (number t) const |
virtual number | getNumAgents () const Get the number of agents. |
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 observation probability, i.e. p(o |
virtual std::shared_ptr< Space > | getObservationSpace (number agent_id, number t) const Get ths observation space of agent i at timestep t. |
virtual std::shared_ptr< Space > | getObservationSpace (number t) const Get ths observation space at timestep t. |
virtual std::shared_ptr< Action > | getRandomAction (const std::shared_ptr< Observation > & observation, number t) Get random action. |
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 reachable observations. |
virtual std::set< std::shared_ptr< State > > | getReachableStates (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const Get reachable states. |
virtual double | getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const 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 Get the initial distribution over states. |
virtual std::shared_ptr< Space > | getStateSpace (number t) const 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 _Get the transition probability, i.e. p(s' |
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 | ~TransformedMPOMDP () |
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. |
Protected Attributes
Type | Name |
---|---|
std::shared_ptr< MPOMDPInterface > | mpomdp_ The underlying MPOMDP . |
Public Functions Documentation
function TransformedMPOMDP
sdm::TransformedMPOMDP::TransformedMPOMDP (
const std::shared_ptr< MPOMDPInterface > & mpomdp
)
function getActionSpace [1/2]
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::getActionSpace (
number agent_id,
number t
) const
Parameters:
agent_id
the identifier of the agentt
the timestep
Returns:
the action space
Implements sdm::MMDPInterface::getActionSpace
function getActionSpace [2/2]
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::getActionSpace (
number t
) const
Parameters:
t
the timestep
Returns:
the action space
Implements sdm::MMDPInterface::getActionSpace
function getActionSpaceAt
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::getActionSpaceAt (
const std::shared_ptr< Observation > & observation,
number t
)
Parameters:
observation
the observation in considerationt
time step
Returns:
the action space.
Implements sdm::GymInterface::getActionSpaceAt
function getDiscount
virtual double sdm::TransformedMPOMDP::getDiscount (
number t
) const
Parameters:
t
the timestep
Returns:
the discount factor
Implements sdm::MDPInterface::getDiscount
function getDynamics
virtual double sdm::TransformedMPOMDP::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
the state at timestep taction
the actionnext_state
the next state, i.e. timestep t+1observation
the observationt
the timestep
Returns:
the probability
Implements sdm::POMDPInterface::getDynamics
function getHorizon
virtual number sdm::TransformedMPOMDP::getHorizon () const
Returns:
the number of agents
Implements sdm::MDPInterface::getHorizon
function getInternalState
virtual std::shared_ptr< State > sdm::TransformedMPOMDP::getInternalState () const
Implements sdm::MDPInterface::getInternalState
function getMaxReward
virtual double sdm::TransformedMPOMDP::getMaxReward (
number t
) const
Implements sdm::MDPInterface::getMaxReward
function getMinReward
virtual double sdm::TransformedMPOMDP::getMinReward (
number t
) const
Implements sdm::MDPInterface::getMinReward
function getNumAgents
virtual number sdm::TransformedMPOMDP::getNumAgents () const
Returns:
the number of agents
Implements sdm::MDPInterface::getNumAgents
function getObservationProbability
virtual double sdm::TransformedMPOMDP::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:
action
the actionnext_state
the next stateobservation
the observationt
the timestep
Returns:
the probability
Implements sdm::POMDPInterface::getObservationProbability
function getObservationSpace [1/2]
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::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 getObservationSpace [2/2]
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::getObservationSpace (
number t
) const
Parameters:
t
the timestep
Returns:
the observation space
Implements sdm::MPOMDPInterface::getObservationSpace
function getRandomAction
virtual std::shared_ptr< Action > sdm::TransformedMPOMDP::getRandomAction (
const std::shared_ptr< Observation > & observation,
number t
)
Parameters:
observation
the observation in consideration.t
time step.
Returns:
the random action.
Implements sdm::GymInterface::getRandomAction
function getReachableObservations
virtual std::set< std::shared_ptr< Observation > > sdm::TransformedMPOMDP::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
the current stateaction
the current action
Returns:
the set of reachable observations
Implements sdm::POMDPInterface::getReachableObservations
function getReachableStates
virtual std::set< std::shared_ptr< State > > sdm::TransformedMPOMDP::getReachableStates (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
number t
) const
Parameters:
state
the current stateaction
the current action
Returns:
the set of reachable states
Implements sdm::MDPInterface::getReachableStates
function getReward
virtual double sdm::TransformedMPOMDP::getReward (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
number t
) const
Parameters:
state
the current stateaction
the actiont
the timestep
Returns:
double the reward for each agent
Implements sdm::MDPInterface::getReward
function getStartDistribution
virtual std::shared_ptr< Distribution < std::shared_ptr< State > > > sdm::TransformedMPOMDP::getStartDistribution () const
Returns:
the initial distribution over states
Implements sdm::MDPInterface::getStartDistribution
function getStateSpace
virtual std::shared_ptr< Space > sdm::TransformedMPOMDP::getStateSpace (
number t
) const
Parameters:
t
the timestep
Returns:
the state space
Implements sdm::MDPInterface::getStateSpace
function getTransitionProbability
virtual double sdm::TransformedMPOMDP::getTransitionProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
const std::shared_ptr< State > & next_state,
number t
) const
Parameters:
state
the current stateaction
the actionnext_state
the next statet
the timestep
Returns:
the probability
Implements sdm::MDPInterface::getTransitionProbability
function reset
virtual std::shared_ptr< Observation > sdm::TransformedMPOMDP::reset ()
Returns:
the initial observation
Implements sdm::GymInterface::reset
function setInternalState
virtual void sdm::TransformedMPOMDP::setInternalState (
std::shared_ptr< State > state
)
Implements sdm::MDPInterface::setInternalState
function step [1/2]
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > sdm::TransformedMPOMDP::step (
std::shared_ptr< Action > action
)
Parameters:
action
the action to execute
Returns:
the information produced. Include : next observation, rewards, episode done
Implements sdm::MDPInterface::step
function step [2/2]
virtual std::tuple< std::shared_ptr< Observation >, std::vector< double >, bool > sdm::TransformedMPOMDP::step (
std::shared_ptr< Action > action,
bool increment_timestep
)
Implements sdm::MDPInterface::step
function ~TransformedMPOMDP
inline virtual sdm::TransformedMPOMDP::~TransformedMPOMDP ()
Protected Attributes Documentation
variable mpomdp_
std::shared_ptr<MPOMDPInterface> sdm::TransformedMPOMDP::mpomdp_;
The documentation for this class was generated from the following file src/sdm/world/transformed_mpomdp.hpp