MultiAgentDecisionProcess  Release 0.2.1
Interface_ProblemToPolicyDiscrete Class Reference

Interface_ProblemToPolicyDiscrete is an interface from discrete problems to policies. More...

#include <Interface_ProblemToPolicyDiscrete.h>

+ Inheritance diagram for Interface_ProblemToPolicyDiscrete:

Public Member Functions

virtual bool AreCachedJointToIndivIndices (const PolicyGlobals::IndexDomainCategory pdc) const =0
 Check whether certain index conversions are cached.
virtual
PolicyGlobals::IndexDomainCategory 
GetDefaultIndexDomCat () const =0
 Return the default IndexDomainCategory for the problem.
virtual size_t GetNrActions (Index agentI) const =0
 Get the number of invididual actions of a particular agent.
virtual size_t GetNrAgents () const =0
 Get the number of agents involved in this problem.
size_t GetNrJointActions () const
 Get the number of joint actions.
virtual size_t GetNrPolicyDomainElements (Index agentI, PolicyGlobals::IndexDomainCategory cat, size_t depth=MAXHORIZON) const =0
 Get the number of elements in the domain of an agent's policy.
virtual Index IndividualToJointActionIndices (const Index *indivIndices) const =0
 Converts individual action indices to a joint action index.
virtual Index IndividualToJointActionIndices (const std::vector< Index > &indivIndices) const =0
 Converts individual action indices to a joint action index.
 Interface_ProblemToPolicyDiscrete ()
 (default) Constructor
virtual std::vector< Index > JointToIndividualPolicyDomainIndices (Index jdI, PolicyGlobals::IndexDomainCategory cat) const =0
 Converts joint indices to individual policy domain element indices.
virtual const std::vector
< Index > & 
JointToIndividualPolicyDomainIndicesRef (Index jdI, PolicyGlobals::IndexDomainCategory cat) const =0
 Converts individual policy domain element indices to joint indices.
virtual std::string SoftPrintAction (Index agentI, Index actionI) const =0
 Virtual function that has to be implemented by derived class.
virtual std::string SoftPrintPolicyDomainElement (Index agentI, Index dIndex, PolicyGlobals::IndexDomainCategory cat) const =0
 Virtual function that has to be implemented by derived class.
virtual ~Interface_ProblemToPolicyDiscrete ()
 Destructor.

Detailed Description

Interface_ProblemToPolicyDiscrete is an interface from discrete problems to policies.

I.e., it defines functions that must be implemented by a derived (problem) class such that it can be used to construct a JointPolicyPureVector / PolicyPureVector.

(the class (Joint)PolicyPureVector refers to objects implementing this interface. )

Definition at line 48 of file Interface_ProblemToPolicyDiscrete.h.

Constructor & Destructor Documentation

Interface_ProblemToPolicyDiscrete::Interface_ProblemToPolicyDiscrete ( )
inline

(default) Constructor

Definition at line 57 of file Interface_ProblemToPolicyDiscrete.h.

virtual Interface_ProblemToPolicyDiscrete::~Interface_ProblemToPolicyDiscrete ( )
inlinevirtual

Destructor.

Definition at line 60 of file Interface_ProblemToPolicyDiscrete.h.

Member Function Documentation

virtual bool Interface_ProblemToPolicyDiscrete::AreCachedJointToIndivIndices ( const PolicyGlobals::IndexDomainCategory  pdc) const
pure virtual
virtual PolicyGlobals::IndexDomainCategory Interface_ProblemToPolicyDiscrete::GetDefaultIndexDomCat ( ) const
pure virtual

Return the default IndexDomainCategory for the problem.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Referenced by JPolComponent_VectorImplementation::JPolComponent_VectorImplementation().

virtual size_t Interface_ProblemToPolicyDiscrete::GetNrActions ( Index  agentI) const
pure virtual
size_t Interface_ProblemToPolicyDiscrete::GetNrJointActions ( ) const
inline

Get the number of joint actions.

Reimplemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Definition at line 69 of file Interface_ProblemToPolicyDiscrete.h.

References GetNrActions(), and GetNrAgents().

virtual size_t Interface_ProblemToPolicyDiscrete::GetNrPolicyDomainElements ( Index  agentI,
PolicyGlobals::IndexDomainCategory  cat,
size_t  depth = MAXHORIZON 
) const
pure virtual

Get the number of elements in the domain of an agent's policy.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Referenced by Interface_ProblemToPolicyDiscretePure::GetNrPolicies().

virtual Index Interface_ProblemToPolicyDiscrete::IndividualToJointActionIndices ( const Index *  indivIndices) const
pure virtual

Converts individual action indices to a joint action index.

indivIndices is an array of size GetNrAgents()

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Referenced by JPolComponent_VectorImplementation::GetJointActionIndex(), and JointPolicyDiscrete::SampleJointAction().

virtual Index Interface_ProblemToPolicyDiscrete::IndividualToJointActionIndices ( const std::vector< Index > &  indivIndices) const
pure virtual

Converts individual action indices to a joint action index.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

virtual std::vector<Index> Interface_ProblemToPolicyDiscrete::JointToIndividualPolicyDomainIndices ( Index  jdI,
PolicyGlobals::IndexDomainCategory  cat 
) const
pure virtual

Converts joint indices to individual policy domain element indices.

A function that should be implemented by a derived class, if this derived class caches index vectors of the policy domains elements corresponding to a joint index. See AreCachedJointToIndivIndices()

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

virtual const std::vector<Index>& Interface_ProblemToPolicyDiscrete::JointToIndividualPolicyDomainIndicesRef ( Index  jdI,
PolicyGlobals::IndexDomainCategory  cat 
) const
pure virtual

Converts individual policy domain element indices to joint indices.

A function that should be implemented by a derived class, if this derived class caches index vectors of the policy domains elements corresponding to a joint index. See AreCachedJointToIndivIndices()

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

virtual std::string Interface_ProblemToPolicyDiscrete::SoftPrintAction ( Index  agentI,
Index  actionI 
) const
pure virtual

Virtual function that has to be implemented by derived class.

This should return a string describing action actionI of agent agentI.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Referenced by PolicyPureVector::SoftPrint().

virtual std::string Interface_ProblemToPolicyDiscrete::SoftPrintPolicyDomainElement ( Index  agentI,
Index  dIndex,
PolicyGlobals::IndexDomainCategory  cat 
) const
pure virtual

Virtual function that has to be implemented by derived class.

This should return a string describing element dIndex of the domain (e.g. an observation history) of agent agentI.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

Referenced by PolicyPureVector::SoftPrint().


The documentation for this class was generated from the following file: