MultiAgentDecisionProcess
Interface_ProblemToPolicyDiscrete Class Referenceabstract

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

#include <Interface_ProblemToPolicyDiscrete.h>

Inheritance diagram for Interface_ProblemToPolicyDiscrete:
[legend]

Public Member Functions

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

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. )

Constructor & Destructor Documentation

Interface_ProblemToPolicyDiscrete::Interface_ProblemToPolicyDiscrete ( )
inline

(default) Constructor

virtual Interface_ProblemToPolicyDiscrete::~Interface_ProblemToPolicyDiscrete ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual bool Interface_ProblemToPolicyDiscrete::AreCachedJointToIndivIndices ( const PolicyGlobals::PolicyDomainCategory  pdc) const
pure virtual

Check whether certain index conversions are cached.

Implemented in PlanningUnitMADPDiscrete, and BayesianGameBase.

virtual PolicyGlobals::PolicyDomainCategory Interface_ProblemToPolicyDiscrete::GetDefaultIndexDomCat ( ) const
pure virtual

Return the default PolicyDomainCategory 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.

References GetNrActions(), and GetNrAgents().

virtual size_t Interface_ProblemToPolicyDiscrete::GetNrPolicyDomainElements ( Index  agentI,
PolicyGlobals::PolicyDomainCategory  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::PolicyDomainCategory  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::PolicyDomainCategory  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::PolicyDomainCategory  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().