MultiAgentDecisionProcess
|
MultiAgentDecisionProcess is an class that defines the primary properties of a decision process. More...
#include <MultiAgentDecisionProcess.h>
Public Member Functions | |
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... | |
Public Member Functions inherited from MultiAgentDecisionProcessInterface | |
virtual MultiAgentDecisionProcessInterface * | Clone () const =0 |
Returns a copy of this class. More... | |
virtual | ~MultiAgentDecisionProcessInterface () |
Destructor. More... | |
Protected Attributes | |
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... | |
Private Member Functions | |
void | InitializeUnixName () |
Private Attributes | |
NamedDescribedEntity | _m_name |
MultiAgentDecisionProcess is an class that defines the primary properties of a decision process.
These primary properties are: -the number of agents -possibly, a vector of (named) agents -the filename to be parsed, if applicable.
It is the only current implementation of MultiAgentDecisionProcessInterface
MultiAgentDecisionProcess::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.
References _m_allAgentsScope, InitializeUnixName(), and Scope::Insert().
MultiAgentDecisionProcess::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.
References InitializeUnixName().
|
virtual |
Destructor.
References _m_problemFile.
void MultiAgentDecisionProcess::AddAgent | ( | std::string | name | ) |
Add a new agent with name "name" to the MADP.
NOTE: This increments the number of agents as well!
References _m_agents, _m_allAgentsScope, _m_nrAgents, and Scope::Insert().
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), and DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddAgents::operator()().
Index MultiAgentDecisionProcess::GetAgentIndexByName | ( | const std::string & | s | ) | const |
Returns the index of an agent given its name, if it exists.
References _m_agents.
string MultiAgentDecisionProcess::GetAgentNameByIndex | ( | Index | i | ) | const |
Returns the name of the agent at the given index.
References _m_agents.
Referenced by FactoredDecPOMDPDiscrete::ExportSpuddFile().
|
inlinevirtual |
Implements MultiAgentDecisionProcessInterface.
References _m_allAgentsScope.
Referenced by FactoredDecPOMDPDiscrete::ExportSpuddFile().
|
inline |
References NamedDescribedEntity::GetDescription().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete().
|
inline |
References NamedDescribedEntity::GetName().
Referenced by FactoredDecPOMDPDiscrete::ExportSpuddFile(), and DecPOMDPDiscrete::ExtractMADPDiscrete().
|
virtual |
Returns the number of agents in this MultiAgentDecisionProcess.
Implements MultiAgentDecisionProcessInterface.
References _m_nrAgents.
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), ProblemFireFightingGraph::ConstructActions(), ProblemFOBSFireFightingGraph::ConstructActions(), TransitionObservationIndependentMADPDiscrete::ConstructJointObservationsRecursively(), TransitionObservationIndependentMADPDiscrete::CreateCentralizedObservationTransitionModel(), TransitionObservationIndependentMADPDiscrete::CreateCentralizedSparseTransitionModel(), TransitionObservationIndependentMADPDiscrete::CreateISD(), TransitionObservationIndependentMADPDiscrete::CreateJointActions(), TransitionObservationIndependentMADPDiscrete::CreateJointObservations(), TransitionObservationIndependentMADPDiscrete::CreateJointStates(), MultiAgentDecisionProcessDiscreteFactoredStates::CreateNewObservationModel(), TOIDecPOMDPDiscrete::CreateNewRewardModel(), TOIDecMDPDiscrete::CreateStateObservations(), FactoredDecPOMDPDiscrete::ExportSpuddFile(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TransitionObservationIndependentMADPDiscrete::GetInitialStateProbability(), TransitionObservationIndependentMADPDiscrete::GetJointActionDiscrete(), TransitionObservationIndependentMADPDiscrete::GetJointObservation(), TransitionObservationIndependentMADPDiscrete::GetObservationProbability(), TOIFactoredRewardDecPOMDPDiscrete::GetReward(), TOICompactRewardDecPOMDPDiscrete::GetReward(), TransitionObservationIndependentMADPDiscrete::GetState(), TransitionObservationIndependentMADPDiscrete::GetTransitionProbability(), MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN(), TransitionObservationIndependentMADPDiscrete::JointToIndividualObservationIndicesNoCache(), MultiAgentDecisionProcessDiscreteFactoredStates::MarginalizeTransitionObservationModel(), ParserTOIDecPOMDPDiscrete::Parse(), ParserTOIDecPOMDPDiscrete::ParseRewards(), POSGDiscrete::POSGDiscrete(), MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor(), TransitionObservationIndependentMADPDiscrete::SampleInitialStates(), TransitionObservationIndependentMADPDiscrete::SampleJointObservation(), TransitionObservationIndependentMADPDiscrete::SampleSuccessorState(), TOIFactoredRewardDecPOMDPDiscrete::SetInitialized(), TOICompactRewardDecPOMDPDiscrete::SetInitialized(), TransitionObservationIndependentMADPDiscrete::SetInitialized(), ProblemFireFightingGraph::SetYScopes(), ProblemFOBSFireFightingGraph::SetYScopes(), ProblemFOBSFireFightingFactored::SetYScopes(), ProblemFireFightingFactored::SetYScopes(), TOIFactoredRewardDecPOMDPDiscrete::SoftPrint(), TOICompactRewardDecPOMDPDiscrete::SoftPrint(), POSGDiscrete::SoftPrint(), TransitionObservationIndependentMADPDiscrete::SoftPrint(), and ProblemAloha::SoftPrintBriefDescription().
string MultiAgentDecisionProcess::GetProblemFile | ( | ) | const |
Returns the name of the problem file.
References _m_problemFile.
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), ParserPOMDPDiscrete::Parse(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::Parse(), POMDPFormatParsing::ParserPOMDPFormat_Spirit::Parse(), ParserTOIDecPOMDPDiscrete::ParseAgent(), ParserTOIDecPOMDPDiscrete::ParseBase(), ParserTOIDecPOMDPDiscrete::ParseRewards(), and TransitionObservationIndependentMADPDiscrete::SetNrAgents().
|
inlinevirtual |
Returns a name which can be in unix path, by default the base part of the problem filename.
Implements MultiAgentDecisionProcessInterface.
|
private |
References _m_problemFile, and _m_unixName.
Referenced by MultiAgentDecisionProcess().
|
inline |
References SoftPrint().
|
inline |
|
inline |
void MultiAgentDecisionProcess::SetNrAgents | ( | size_t | nrAgents | ) |
Sets the number of agents.
this creates nrAgents unnamed agents.
References _m_agents, _m_allAgentsScope, _m_nrAgents, and Scope::Insert().
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete(), ProblemAloha::InitializeAloha(), ProblemFOBSFireFightingFactored::InitializePFFF(), ProblemFireFightingFactored::InitializePFFF(), DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddAgents::operator()(), ParserPOMDPDiscrete::Parse(), POMDPDiscrete::POMDPDiscrete(), ProblemDecTiger::ProblemDecTiger(), ProblemDecTigerWithCreaks::ProblemDecTigerWithCreaks(), ProblemFireFighting::ProblemFireFighting(), and TransitionObservationIndependentMADPDiscrete::SetNrAgents().
|
inline |
Sets the name which can be used inin unix paths.
Referenced by ProblemAloha::InitializeAloha(), ProblemFOBSFireFightingFactored::InitializePFFF(), and ProblemFireFightingFactored::InitializePFFF().
string MultiAgentDecisionProcess::SoftPrint | ( | ) | const |
Prints some information on the MultiAgentDecisionProcess.
References _m_name, _m_nrAgents, _m_problemFile, _m_unixName, NamedDescribedEntity::GetDescription(), and NamedDescribedEntity::GetName().
Referenced by Print(), MultiAgentDecisionProcessDiscrete::SoftPrint(), MultiAgentDecisionProcessDiscreteFactoredStates::SoftPrint(), and TransitionObservationIndependentMADPDiscrete::SoftPrint().
|
protected |
Vector containing Agent objects, which are indexed named entities.
Referenced by AddAgent(), GetAgentIndexByName(), GetAgentNameByIndex(), and SetNrAgents().
|
protected |
Scope containing all agents - usefull sometimes.
Referenced by AddAgent(), GetAllAgentScope(), MultiAgentDecisionProcess(), and SetNrAgents().
|
private |
Referenced by SoftPrint().
|
protected |
The number of agents participating in the MADP.
Referenced by AddAgent(), ProblemAloha::ConstructActions(), ProblemDecTigerWithCreaks::ConstructActions(), ProblemDecTiger::ConstructActions(), ProblemAloha::ConstructObservations(), ProblemDecTigerWithCreaks::ConstructObservations(), ProblemDecTiger::ConstructObservations(), TransitionObservationIndependentMADPDiscrete::CreateJointActionsRecursively(), GetNrAgents(), SetNrAgents(), ProblemAloha::SetOScopes(), SoftPrint(), and TransitionObservationIndependentMADPDiscrete::SoftPrintActionSets().
|
protected |
String holding the filename of the problem file to be parsed - if applicable.
Referenced by GetProblemFile(), InitializeUnixName(), SoftPrint(), and ~MultiAgentDecisionProcess().
|
protected |
String for the unix name of the MADP.
Referenced by InitializeUnixName(), and SoftPrint().