MultiAgentDecisionProcess
|
MultiAgentDecisionProcessDiscrete is defines the primary properties of a discrete decision process. More...
#include <MultiAgentDecisionProcessDiscrete.h>
Public Member Functions | |
void | AddAction (Index AI, const std::string &name, const std::string &description="") |
void | AddObservation (Index AI, const std::string &name, const std::string &description="") |
void | AddState (const std::string &StateName) |
virtual MultiAgentDecisionProcessDiscrete * | Clone () const |
Returns a pointer to a copy of this class. More... | |
size_t | ConstructJointActions () |
size_t | ConstructJointObservations () |
void | CreateNewObservationModel () |
Creates a new observation model mapping. More... | |
void | CreateNewTransitionModel () |
Creates a new transition model mapping. More... | |
const Action * | GetAction (Index agentI, Index a) const |
Return a ref to the a-th action of agent agentI. More... | |
const ActionDiscrete * | GetActionDiscrete (Index agentI, Index a) const |
Index | GetActionIndexByName (const std::string &a, Index agentI) const |
bool | GetEventObservability () const |
Are we using an event observation model? More... | |
int | GetFalseNegativeObs () const |
Gets the index for false negative observations (if any). A negative value means that are none (which is the default case). More... | |
double | GetInitialStateProbability (Index sI) const |
StateDistribution * | GetISD () const |
Returns the complete initial state distribution. More... | |
const JointAction * | GetJointAction (Index i) const |
Return a ref to the i-th joint action. More... | |
const JointObservation * | GetJointObservation (Index i) const |
Return a ref to the i-th joint observation. More... | |
const std::vector< size_t > & | GetNrActions () const |
Return the number of actions vector. More... | |
size_t | GetNrActions (Index AgentI) const |
Return the number of actions of agent agentI. More... | |
size_t | GetNrJointActions () const |
Return the number of joint actions. More... | |
size_t | GetNrJointActions (const Scope &agScope) const |
Get the number of joint actions the agents in agScope can form. More... | |
size_t | GetNrJointObservations () const |
Return the number of joint observations. More... | |
const std::vector< size_t > & | GetNrObservations () const |
Return the number of observations vector. More... | |
size_t | GetNrObservations (Index AgentI) const |
Return the number of observations of agent agentI. More... | |
size_t | GetNrStates () const |
Return the number of states. More... | |
const Observation * | GetObservation (Index agentI, Index a) const |
Return a ref to the a-th observation of agent agentI. More... | |
const ObservationDiscrete * | GetObservationDiscrete (Index agentI, Index a) const |
Index | GetObservationIndexByName (const std::string &o, Index agentI) const |
const ObservationModelDiscrete * | GetObservationModelDiscretePtr () const |
Returns a pointer to the underlying observation model. More... | |
double | GetObservationProbability (Index jaI, Index sucSI, Index joI) const |
Return the probability of joint observation joI: P(joI|jaI,sucSI). More... | |
double | GetObservationProbability (Index sI, Index jaI, Index sucSI, Index joI) const |
OGet * | GetOGet () const |
bool | GetSparse () const |
Are we using sparse transition and observation models? More... | |
const State * | GetState (Index i) const |
Returns a pointer to state i. More... | |
Index | GetStateIndexByName (const std::string &s) const |
TGet * | GetTGet () const |
const TransitionModelDiscrete * | GetTransitionModelDiscretePtr () const |
Returns a pointer to the underlying transition model. More... | |
double | GetTransitionProbability (Index sI, Index jaI, Index sucSI) const |
Return the probability of successor state sucSI: P(sucSI|sI,jaI). More... | |
Index | IndividualToJointActionIndices (const Index *AI_ar) const |
Returns the joint action index that corresponds to the array of specified individual action indices. More... | |
Index | IndividualToJointActionIndices (const std::vector< Index > &indivActionIndices) const |
Returns the joint action index that corresponds to the vector of specified individual action indices. More... | |
Index | IndividualToJointActionIndices (const std::vector< Index > &ja_e, const Scope &agSC) const |
indiv->joint for a restricted set (Scope) of agents More... | |
Index | IndividualToJointObservationIndices (const std::vector< Index > &indivObservationIndices) const |
Returns the joint observation index that corresponds to the vector of specified individual observation indices. More... | |
Index | IndividualToJointObservationIndices (const std::vector< Index > &jo_e, const Scope &agSC) const |
indiv->joint for a restricted set (Scope) of agents More... | |
bool | Initialize () |
A function that can be called by other classes in order to request a MultiAgentDecisionProcessDiscrete to (try to) initialize. More... | |
const std::vector< Index > & | JointToIndividualActionIndices (Index jaI) const |
Returns a vector of indices to indiv. More... | |
std::vector< Index > | JointToIndividualActionIndices (Index ja_e, const Scope &agSC) const |
joint->indiv for a restricted set (Scope) of agents More... | |
const std::vector< Index > & | JointToIndividualObservationIndices (Index joI) const |
Returns a vector of indices to indiv. More... | |
std::vector< Index > | JointToIndividualObservationIndices (Index jo_e, const Scope &agSC) const |
joint->indiv for a restricted set (Scope) of agents More... | |
Index | JointToRestrictedJointActionIndex (Index jaI, const Scope &agSc_e) const |
Converts a global joint action index jaI to a restricted joint action index ja_e, for agents scope agSc_e Returns a vector of indices to indiv. More... | |
Index | JointToRestrictedJointObservationIndex (Index joI, const Scope &agSc_e) const |
Converts a global joint observation index joI to a restricted joint observation index jo_e, for agents scope agSc_e Returns a vector of indices to indiv. More... | |
MultiAgentDecisionProcessDiscrete (const std::string &name="received unspec. by MultiAgentDecisionProcessDiscrete", const std::string &descr="received unspec.by MultiAgentDecisionProcessDiscrete", const std::string &pf="received unspec. by MultiAgentDecisionProcessDiscrete") | |
Constructor that sets the. More... | |
MultiAgentDecisionProcessDiscrete (size_t nrAgents, size_t nrS, const std::string &name="received unspec. by MultiAgentDecisionProcessDiscrete", const std::string &descr="received unspec.by MultiAgentDecisionProcessDiscrete", const std::string &pf="received unspec. by MultiAgentDecisionProcessDiscrete") | |
Constructor that sets the. More... | |
MultiAgentDecisionProcessDiscrete (const MultiAgentDecisionProcessDiscrete &a) | |
Copy constructor. More... | |
void | Print () const |
Prints some information on the MultiAgentDecisionProcessDiscrete. More... | |
Index | SampleInitialState () const |
Sample a state according to the initial state PDF. More... | |
Index | SampleJointObservation (Index jaI, Index sucI) const |
Sample an observation. More... | |
Index | SampleJointObservation (Index sI, Index jaI, Index sucI) const |
Index | SampleSuccessorState (Index sI, Index jaI) const |
Sample a successor state. More... | |
bool | SetActionsInitialized (bool b) |
void | SetEventObservability (bool eventO) |
Indicate whether the observation model is defined over (s',a,s) (an event-driven model) or the standard (s',a) More... | |
void | SetFalseNegativeObs (Index falseNegativeObs) |
Sets the index for false negative observations (see above) More... | |
void | SetISD (StateDistribution *p) |
void | SetNrActions (Index AI, size_t nrA) |
void | SetNrObservations (Index AI, size_t nrO) |
void | SetNrStates (size_t nrS) |
void | SetObservationModelPtr (ObservationModelDiscrete *ptr) |
Set the obversation model. More... | |
void | SetObservationProbability (Index jaI, Index sucSI, Index joI, double p) |
Set the probability of joint observation joI: P(joI|jaI,sucSI). More... | |
void | SetObservationProbability (Index sI, Index jaI, Index sucSI, Index joI, double p) |
bool | SetObservationsInitialized (bool b) |
void | SetSparse (bool sparse) |
Indicate whether sparse transition and observation models should be used. More... | |
bool | SetStatesInitialized (bool b) |
void | SetTransitionModelPtr (TransitionModelDiscrete *ptr) |
Set the transition model. More... | |
void | SetTransitionProbability (Index sI, Index jaI, Index sucSI, double p) |
Set the probability of successor state sucSI: P(sucSI|sI,jaI). More... | |
void | SetUniformISD () |
std::string | SoftPrint () const |
SoftPrints information on the MultiAgentDecisionProcessDiscrete. More... | |
std::string | SoftPrintState (Index sI) const |
~MultiAgentDecisionProcessDiscrete () | |
Destructor. More... | |
Public Member Functions inherited from MultiAgentDecisionProcessDiscreteInterface | |
virtual | ~MultiAgentDecisionProcessDiscreteInterface () |
Destructor. More... | |
Public Member Functions inherited from MultiAgentDecisionProcessInterface | |
virtual | ~MultiAgentDecisionProcessInterface () |
Destructor. More... | |
Public Member Functions inherited from MultiAgentDecisionProcess | |
void | AddAgent (std::string name) |
Add a new agent with name "name" to the MADP. More... | |
Index | GetAgentIndexByName (const std::string &s) const |
Returns the index of an agent given its name, if it exists. More... | |
std::string | GetAgentNameByIndex (Index i) const |
Returns the name of the agent at the given index. More... | |
const Scope & | GetAllAgentScope () const |
std::string | GetDescription () const |
std::string | GetName () const |
size_t | GetNrAgents () const |
Returns the number of agents in this MultiAgentDecisionProcess. More... | |
std::string | GetProblemFile () const |
Returns the name of the problem file. More... | |
std::string | GetUnixName () const |
Returns a name which can be in unix path, by default the base part of the problem filename. More... | |
MultiAgentDecisionProcess (size_t nrAgents, const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess") | |
Constructor. More... | |
MultiAgentDecisionProcess (const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess") | |
Default Constructor without specifying the number of agents. More... | |
void | Print () const |
void | SetDescription (const std::string &description) |
void | SetName (const std::string &name) |
void | SetNrAgents (size_t nrAgents) |
Sets the number of agents. More... | |
void | SetUnixName (std::string unixName) |
Sets the name which can be used inin unix paths. More... | |
std::string | SoftPrint () const |
Prints some information on the MultiAgentDecisionProcess. More... | |
virtual | ~MultiAgentDecisionProcess () |
Destructor. More... | |
Protected Member Functions | |
bool | SetInitialized (bool b) |
Sets _m_initialized to b. More... | |
Private Member Functions | |
bool | SanityCheck (void) |
Check whether models appear valid probability distributions. More... | |
Private Attributes | |
MADPComponentDiscreteActions | _m_A |
bool | _m_eventObservability |
Boolean that controls whether the observation model is defined over events. More... | |
int | _m_falseNegativeObs |
An index representing false negative observations, which are seen by planners, but not by agents. More... | |
bool | _m_initialized |
Boolean to indicate whether this MADPDiscrete has been initialized. More... | |
MADPComponentDiscreteObservations | _m_O |
ObservationModelDiscrete * | _m_p_oModel |
Pointer to observation model. More... | |
TransitionModelDiscrete * | _m_p_tModel |
Pointer to transition model. More... | |
MADPComponentDiscreteStates | _m_S |
bool | _m_sparse |
Boolean that controls whether sparse transition and observation models are used. More... | |
Additional Inherited Members | |
Protected Attributes inherited from MultiAgentDecisionProcess | |
std::vector< Agent > | _m_agents |
Vector containing Agent objects, which are indexed named entities. More... | |
Scope | _m_allAgentsScope |
Scope containing all agents - usefull sometimes. More... | |
size_t | _m_nrAgents |
The number of agents participating in the MADP. More... | |
std::string | _m_problemFile |
String holding the filename of the problem file to be parsed - if applicable. More... | |
std::string | _m_unixName |
String for the unix name of the MADP. More... | |
MultiAgentDecisionProcessDiscrete is defines the primary properties of a discrete decision process.
MultiAgentDecisionProcessDiscrete is defines the primary properties of a discrete decision process.
It extends MultiAgentDecisionProcess, MADPComponentDiscreteActions and MADPComponentDiscreteObservations, such that, for each of the MultiAgentDecisionProcess::GetNrAgents() it stores -the discrete action sets -the discrete observation sets
It also extends MADPComponentDiscreteStates such that a discrete state space is implemented.
Finally, this class itself stores (pointers to) -the transition model -the observation model
MultiAgentDecisionProcessDiscrete::MultiAgentDecisionProcessDiscrete | ( | const std::string & | name = "received unspec. by MultiAgentDecisionProcessDiscrete" , |
const std::string & | descr = "received unspec.by MultiAgentDecisionProcessDiscrete" , |
||
const std::string & | pf = "received unspec. by MultiAgentDecisionProcessDiscrete" |
||
) |
Constructor that sets the.
References _m_eventObservability, _m_falseNegativeObs, _m_initialized, _m_p_oModel, _m_p_tModel, and _m_sparse.
Referenced by Clone().
MultiAgentDecisionProcessDiscrete::MultiAgentDecisionProcessDiscrete | ( | size_t | nrAgents, |
size_t | nrS, | ||
const std::string & | name = "received unspec. by MultiAgentDecisionProcessDiscrete" , |
||
const std::string & | descr = "received unspec.by MultiAgentDecisionProcessDiscrete" , |
||
const std::string & | pf = "received unspec. by MultiAgentDecisionProcessDiscrete" |
||
) |
Constructor that sets the.
References _m_eventObservability, _m_falseNegativeObs, _m_initialized, _m_p_oModel, _m_p_tModel, and _m_sparse.
MultiAgentDecisionProcessDiscrete::MultiAgentDecisionProcessDiscrete | ( | const MultiAgentDecisionProcessDiscrete & | a | ) |
Copy constructor.
References _m_A, _m_eventObservability, _m_falseNegativeObs, _m_initialized, _m_O, _m_p_oModel, _m_p_tModel, _m_S, _m_sparse, TransitionModelDiscrete::Clone(), and ObservationModelDiscrete::Clone().
MultiAgentDecisionProcessDiscrete::~MultiAgentDecisionProcessDiscrete | ( | ) |
Destructor.
References _m_p_oModel, _m_p_tModel, and DEBUG_MADPD.
|
inline |
References MADPComponentDiscreteActions::AddAction().
Referenced by POMDPDiscrete::AddSingleAgentAction(), ProblemFireFighting::ConstructActions(), ProblemDecTigerWithCreaks::ConstructActions(), ProblemDecTiger::ConstructActions(), DecPOMDPDiscrete::ExtractMADPDiscrete(), and DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddAction::operator()().
|
inline |
References MADPComponentDiscreteObservations::AddObservation().
Referenced by POMDPDiscrete::AddSingleAgentObservation(), ProblemFireFighting::ConstructObservations(), ProblemDecTigerWithCreaks::ConstructObservations(), ProblemDecTiger::ConstructObservations(), DecPOMDPDiscrete::ExtractMADPDiscrete(), and DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddObservation::operator()().
|
inline |
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements MultiAgentDecisionProcessDiscreteInterface.
Reimplemented in DecPOMDPDiscrete, and POSGDiscrete.
References MultiAgentDecisionProcessDiscrete().
|
inline |
References MADPComponentDiscreteActions::ConstructJointActions().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::InitializeActions::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::InitializeActions::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
|
inline |
References MADPComponentDiscreteObservations::ConstructJointObservations().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::InitializeObservations::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::InitializeObservations::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
void MultiAgentDecisionProcessDiscrete::CreateNewObservationModel | ( | ) |
Creates a new observation model mapping.
References _m_eventObservability, _m_initialized, _m_p_oModel, _m_sparse, GetNrJointActions(), GetNrJointObservations(), and GetNrStates().
Referenced by TOIDecMDPDiscrete::CreateStateObservations(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::AddModels::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddModels::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
void MultiAgentDecisionProcessDiscrete::CreateNewTransitionModel | ( | ) |
Creates a new transition model mapping.
References _m_initialized, _m_p_tModel, _m_sparse, GetNrJointActions(), and GetNrStates().
Referenced by POMDPFormatParsing::ParserPOMDPFormat_Spirit::AddModels::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddModels::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
|
inlinevirtual |
Return a ref to the a-th action of agent agentI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetAction().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inline |
|
inlinevirtual |
Are we using an event observation model?
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
|
inline |
Gets the index for false negative observations (if any). A negative value means that are none (which is the default case).
|
inlinevirtual |
|
inlinevirtual |
Returns the complete initial state distribution.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteStates::GetISD().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inlinevirtual |
Return a ref to the i-th joint action.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetJointAction().
|
inlinevirtual |
Return a ref to the i-th joint observation.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::GetJointObservation().
|
inlinevirtual |
Return the number of actions vector.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetNrActions().
Referenced by TransitionObservationIndependentMADPDiscrete::CreateJointActions(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TransitionObservationIndependentMADPDiscrete::GetNrActions(), POMDPDiscrete::GetNrSingleAgentActions(), and ParserPOMDPDiscrete::Parse().
|
inlinevirtual |
Return the number of actions of agent agentI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetNrActions().
|
inlinevirtual |
Return the number of joint actions.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetNrJointActions().
Referenced by CreateNewObservationModel(), DecPOMDPDiscrete::CreateNewRewardModel(), TOIDecPOMDPDiscrete::CreateNewRewardModel(), CreateNewTransitionModel(), ProblemFireFighting::FillObservationModel(), ProblemDecTigerWithCreaks::FillObservationModel(), ProblemDecTiger::FillObservationModel(), ProblemFireFighting::FillRewardModel(), ProblemDecTigerWithCreaks::FillRewardModel(), ProblemFireFighting::FillTransitionModel(), ProblemDecTigerWithCreaks::FillTransitionModel(), ProblemDecTiger::FillTransitionModel(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::StoreLPAction::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::StoreLPAction::operator()(), ParserTOICompactRewardDecPOMDPDiscrete::ParseRewards(), ParserTOIDecPOMDPDiscrete::ParseRewards(), SanityCheck(), and TOICompactRewardDecPOMDPDiscrete::SetInitialized().
|
inlinevirtual |
Get the number of joint actions the agents in agScope can form.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::GetNrJointActions().
|
inlinevirtual |
Return the number of joint observations.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::GetNrJointObservations().
Referenced by CreateNewObservationModel(), ProblemFireFighting::FillObservationModel(), ProblemDecTigerWithCreaks::FillObservationModel(), ProblemDecTiger::FillObservationModel(), and SanityCheck().
|
inlinevirtual |
Return the number of observations vector.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::GetNrObservations().
Referenced by TransitionObservationIndependentMADPDiscrete::CreateJointObservations(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TransitionObservationIndependentMADPDiscrete::GetNrObservations(), POMDPDiscrete::GetNrSingleAgentObservations(), and ParserPOMDPDiscrete::Parse().
|
inlinevirtual |
Return the number of observations of agent agentI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::GetNrObservations().
|
inlinevirtual |
Return the number of states.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteStates::GetNrStates().
Referenced by TransitionObservationIndependentMADPDiscrete::CreateJointStates(), CreateNewObservationModel(), DecPOMDPDiscrete::CreateNewRewardModel(), TOIDecPOMDPDiscrete::CreateNewRewardModel(), CreateNewTransitionModel(), DecPOMDPDiscrete::ExtractMADPDiscrete(), ProblemFireFighting::FillObservationModel(), ProblemFireFighting::FillRewardModel(), ProblemFireFighting::FillTransitionModel(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::InitializeStates::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::InitializeStates::operator()(), ParserPOMDPDiscrete::Parse(), ParserTOICompactRewardDecPOMDPDiscrete::ParseRewards(), ParserTOIDecPOMDPDiscrete::ParseRewards(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::ProcessStartStateList::ProcessList(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::ProcessStartStateList::ProcessList(), SanityCheck(), and TOICompactRewardDecPOMDPDiscrete::SetInitialized().
|
inlinevirtual |
Return a ref to the a-th observation of agent agentI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::GetObservation().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inline |
|
inlinevirtual |
Returns a pointer to the underlying observation model.
If speed is required (for instance when looping through all states) the pointer can be requested by an algorithm. It can than obtain a pointer to the actual implementation type by runtime type identification. (i.e., using typeid and dynamic_cast).
Implements MultiAgentDecisionProcessDiscreteInterface.
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inlinevirtual |
Return the probability of joint observation joI: P(joI|jaI,sucSI).
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_p_oModel, and ObservationModelDiscreteInterface::Get().
Referenced by TransitionObservationIndependentMADPDiscrete::GetObservationProbability(), SanityCheck(), and DecPOMDPDiscrete::SetReward().
|
inlinevirtual |
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
References _m_p_oModel, and ObservationModelDiscreteInterface::Get().
|
virtual |
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_eventObservability, _m_p_oModel, and _m_sparse.
|
inline |
Are we using sparse transition and observation models?
Referenced by DecPOMDPDiscrete::CreateNewRewardModel(), and ParserTOIDecPOMDPDiscrete::ParseAgent().
Returns a pointer to state i.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteStates::GetState().
Referenced by TransitionObservationIndependentMADPDiscrete::CreateJointStates(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TOICompactRewardDecPOMDPDiscrete::GetReward(), TransitionObservationIndependentMADPDiscrete::GetState(), and ProblemFireFighting::ProblemFireFighting().
|
inline |
|
virtual |
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_p_tModel, and _m_sparse.
|
inlinevirtual |
Returns a pointer to the underlying transition model.
If speed is required (for instance when looping through all states) the pointer can be requested by an algorithm. It can than obtain a pointer to the actual implementation type by runtime type identification. (i.e., using typeid and dynamic_cast).
Implements MultiAgentDecisionProcessDiscreteInterface.
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inlinevirtual |
Return the probability of successor state sucSI: P(sucSI|sI,jaI).
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_p_tModel, and TransitionModelDiscreteInterface::Get().
Referenced by ProblemDecTiger::FillTransitionModel(), TransitionObservationIndependentMADPDiscrete::GetTransitionProbability(), SanityCheck(), POSGDiscrete::SetReward(), and DecPOMDPDiscrete::SetReward().
|
inlinevirtual |
Returns the joint action index that corresponds to the array of specified individual action indices.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::IndividualToJointActionIndices().
Referenced by ProblemDecTigerWithCreaks::GetJointActionIndex().
|
inlinevirtual |
Returns the joint action index that corresponds to the vector of specified individual action indices.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::IndividualToJointActionIndices().
|
inlinevirtual |
indiv->joint for a restricted set (Scope) of agents
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::IndividualToJointActionIndices().
|
inlinevirtual |
Returns the joint observation index that corresponds to the vector of specified individual observation indices.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::IndividualToJointObservationIndices().
Referenced by ProblemDecTigerWithCreaks::GetJointObsIndex().
|
inlinevirtual |
indiv->joint for a restricted set (Scope) of agents
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::IndividualToJointObservationIndices().
|
inline |
A function that can be called by other classes in order to request a MultiAgentDecisionProcessDiscrete to (try to) initialize.
References SetInitialized().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inlinevirtual |
Returns a vector of indices to indiv.
action indicies corr. to joint action index jaI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::JointToIndividualActionIndices().
Referenced by ProblemFireFighting::FillObservationModel(), and ProblemFireFighting::FillTransitionModel().
|
inlinevirtual |
joint->indiv for a restricted set (Scope) of agents
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::JointToIndividualActionIndices().
|
inlinevirtual |
Returns a vector of indices to indiv.
observation indicies corr. to joint observation index joI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::JointToIndividualObservationIndices().
Referenced by ProblemFireFighting::FillObservationModel(), and ProblemDecTigerWithCreaks::FillObservationModel().
|
inlinevirtual |
joint->indiv for a restricted set (Scope) of agents
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::JointToIndividualObservationIndices().
|
inlinevirtual |
Converts a global joint action index jaI to a restricted joint action index ja_e, for agents scope agSc_e Returns a vector of indices to indiv.
action indicies corr. to joint action index jaI.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteActions::JointToRestrictedJointActionIndex().
|
inlinevirtual |
Converts a global joint observation index joI to a restricted joint observation index jo_e, for agents scope agSc_e Returns a vector of indices to indiv.
observation indicies corr. to joint observation index joI.
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteObservations::JointToRestrictedJointObservationIndex().
|
inline |
Prints some information on the MultiAgentDecisionProcessDiscrete.
References SoftPrint().
|
inlinevirtual |
Sample a state according to the initial state PDF.
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteStates::SampleInitialState().
Referenced by TransitionObservationIndependentMADPDiscrete::SampleInitialStates().
|
inlinevirtual |
Sample an observation.
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_p_oModel, and ObservationModelDiscrete::SampleJointObservation().
Referenced by TransitionObservationIndependentMADPDiscrete::SampleJointObservation().
|
inlinevirtual |
Reimplemented from MultiAgentDecisionProcessDiscreteInterface.
References _m_p_oModel, and ObservationModelDiscrete::SampleJointObservation().
|
inlinevirtual |
Sample a successor state.
Implements MultiAgentDecisionProcessDiscreteInterface.
References _m_p_tModel, and TransitionModelDiscrete::SampleSuccessorState().
Referenced by TransitionObservationIndependentMADPDiscrete::SampleSuccessorState().
|
private |
Check whether models appear valid probability distributions.
This is a private function as to avoid doubts as to what is and is not checked. (when called from a derived class, no derived features are checked).
References _m_A, _m_eventObservability, _m_O, _m_S, MADPComponentDiscreteActions::GetJointActionName(), MADPComponentDiscreteObservations::GetJointObservationName(), GetNrJointActions(), GetNrJointObservations(), GetNrStates(), GetObservationProbability(), MADPComponentDiscreteStates::GetStateName(), GetTransitionProbability(), and Globals::PROB_PRECISION.
Referenced by SetInitialized().
|
inline |
References MADPComponentDiscreteActions::SetInitialized().
Referenced by POMDPFormatParsing::ParserPOMDPFormat_Spirit::InitializeActions::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::InitializeActions::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
void MultiAgentDecisionProcessDiscrete::SetEventObservability | ( | bool | eventO | ) |
Indicate whether the observation model is defined over (s',a,s) (an event-driven model) or the standard (s',a)
Default is to not use event-driven models.
References _m_eventObservability.
|
inline |
Sets the index for false negative observations (see above)
|
protected |
Sets _m_initialized to b.
When setting to true, a verification of member elements is performed. (i.e. a check whether all vectors have the correct size and non-zero entries)
References _m_A, _m_initialized, _m_O, _m_p_oModel, _m_p_tModel, _m_S, SanityCheck(), MADPComponentDiscreteStates::SetInitialized(), MADPComponentDiscreteObservations::SetInitialized(), and MADPComponentDiscreteActions::SetInitialized().
Referenced by Initialize(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), ProblemFireFighting::ProblemFireFighting(), POSGDiscrete::SetInitialized(), and DecPOMDPDiscrete::SetInitialized().
|
inline |
References MADPComponentDiscreteStates::SetISD().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::StartStateRowProbs::operator()(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::StartStateRowProbs::operator()(), ParserPOMDPDiscrete::Parse(), ProblemFireFighting::ProblemFireFighting(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::ProcessStartStateList::ProcessList(), and POMDPFormatParsing::ParserPOMDPFormat_Spirit::ProcessStartStateList::ProcessList().
|
inline |
|
inline |
|
inline |
References MADPComponentDiscreteStates::SetNrStates().
Referenced by DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::SetNrStates::operator()(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::SetNrStates::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), and ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks().
|
inline |
Set the obversation model.
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inline |
Set the probability of joint observation joI: P(joI|jaI,sucSI).
References _m_p_oModel, and ObservationModelDiscreteInterface::Set().
Referenced by TOIDecMDPDiscrete::CreateStateObservations(), ProblemFireFighting::FillObservationModel(), ProblemDecTigerWithCreaks::FillObservationModel(), ProblemDecTiger::FillObservationModel(), and ParserPOMDPDiscrete::Parse().
|
inline |
References _m_p_oModel, and ObservationModelDiscreteInterface::Set().
|
inline |
References MADPComponentDiscreteObservations::SetInitialized().
Referenced by POMDPFormatParsing::ParserPOMDPFormat_Spirit::InitializeObservations::operator()(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::InitializeObservations::operator()(), ParserPOMDPDiscrete::Parse(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
void MultiAgentDecisionProcessDiscrete::SetSparse | ( | bool | sparse | ) |
Indicate whether sparse transition and observation models should be used.
Default is to not use sparse models. Only has effect before the class has been initialized.
References _m_sparse.
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), ArgumentUtils::GetDecPOMDPDiscreteInterfaceFromArgs(), ParserTOIDecPOMDPDiscrete::ParseAgent(), ProblemFireFighting::ProblemFireFighting(), and TransitionObservationIndependentMADPDiscrete::SetNrAgents().
|
inline |
|
inline |
Set the transition model.
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inline |
Set the probability of successor state sucSI: P(sucSI|sI,jaI).
References _m_p_tModel, and TransitionModelDiscreteInterface::Set().
Referenced by ProblemFireFighting::FillTransitionModel(), ProblemDecTigerWithCreaks::FillTransitionModel(), ProblemDecTiger::FillTransitionModel(), and ParserPOMDPDiscrete::Parse().
|
inline |
References MADPComponentDiscreteStates::SetUniformISD().
Referenced by DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::StartStateRowProbs::operator()(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::StartStateRowProbs::operator()(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), and ProblemFireFighting::ProblemFireFighting().
|
virtual |
SoftPrints information on the MultiAgentDecisionProcessDiscrete.
Implements MultiAgentDecisionProcessDiscreteInterface.
Reimplemented in POSGDiscrete.
References _m_A, _m_initialized, _m_O, _m_p_oModel, _m_p_tModel, _m_S, TransitionModelDiscrete::SoftPrint(), ObservationModelDiscrete::SoftPrint(), MultiAgentDecisionProcess::SoftPrint(), MADPComponentDiscreteStates::SoftPrint(), MADPComponentDiscreteObservations::SoftPrint(), and MADPComponentDiscreteActions::SoftPrint().
Referenced by Print(), POSGDiscrete::SoftPrint(), DecPOMDPDiscrete::SoftPrint(), and TransitionObservationIndependentMADPDiscrete::SoftPrint().
|
inlinevirtual |
Implements MultiAgentDecisionProcessDiscreteInterface.
References MADPComponentDiscreteStates::SoftPrintState().
Referenced by TransitionObservationIndependentMADPDiscrete::SoftPrintState().
|
private |
Referenced by MultiAgentDecisionProcessDiscrete(), SanityCheck(), SetInitialized(), and SoftPrint().
|
private |
Boolean that controls whether the observation model is defined over events.
Referenced by CreateNewObservationModel(), GetOGet(), MultiAgentDecisionProcessDiscrete(), SanityCheck(), and SetEventObservability().
|
private |
An index representing false negative observations, which are seen by planners, but not by agents.
This allows us to model and simulate unobservable transitions. A negative value indicates that this property has not been set.
Referenced by MultiAgentDecisionProcessDiscrete().
|
private |
Boolean to indicate whether this MADPDiscrete has been initialized.
Referenced by CreateNewObservationModel(), CreateNewTransitionModel(), MultiAgentDecisionProcessDiscrete(), SetInitialized(), and SoftPrint().
|
private |
Referenced by MultiAgentDecisionProcessDiscrete(), SanityCheck(), SetInitialized(), and SoftPrint().
|
private |
Pointer to observation model.
Referenced by CreateNewObservationModel(), GetObservationProbability(), GetOGet(), MultiAgentDecisionProcessDiscrete(), SampleJointObservation(), SetInitialized(), SetObservationProbability(), SoftPrint(), and ~MultiAgentDecisionProcessDiscrete().
|
private |
Pointer to transition model.
Referenced by CreateNewTransitionModel(), GetTGet(), GetTransitionProbability(), MultiAgentDecisionProcessDiscrete(), SampleSuccessorState(), SetInitialized(), SetTransitionProbability(), SoftPrint(), and ~MultiAgentDecisionProcessDiscrete().
|
private |
Referenced by MultiAgentDecisionProcessDiscrete(), SanityCheck(), SetInitialized(), and SoftPrint().
|
private |
Boolean that controls whether sparse transition and observation models are used.
Referenced by CreateNewObservationModel(), CreateNewTransitionModel(), GetOGet(), GetTGet(), MultiAgentDecisionProcessDiscrete(), and SetSparse().