MultiAgentDecisionProcess
JointPolicyDiscretePure Class Referenceabstract

JointPolicyDiscretePure is represents a pure joint policy for a discrete MADP. More...

#include <JointPolicyDiscretePure.h>

Inheritance diagram for JointPolicyDiscretePure:
[legend]

Public Member Functions

virtual JointPolicyDiscretePureClone () const =0
 Returns a pointer to a copy of this class. More...
 
virtual Index GetActionIndex (Index aI, Index domainI) const =0
 Returns the action index for domainI for agent aI. More...
 
double GetActionProb (Index agentI, Index domI, Index aI) const
 Returns the probability that the policy specifies action aI for domain index domI for agentI. More...
 
const
Interface_ProblemToPolicyDiscretePure
GetInterfacePTPDiscretePure () const
 Return pointer to the Interface_ProblemToPolicyDiscretePure. More...
 
boost::shared_ptr< const
Interface_ProblemToPolicyDiscretePure
GetInterfacePTPDiscretePureShared () const
 
virtual Index GetJointActionIndex (Index i) const =0
 Returns the jaI taken by this policy for joint domain index johI. More...
 
virtual Index GetJointActionIndex (LIndex i) const =0
 Returns the jaI taken by this policy for joint domain index johI. More...
 
double GetJointActionProb (Index i, Index ja) const
 Returns the probability that the policy specifies joint action a for domain index i. More...
 
double GetJointActionProb (LIndex i, Index ja) const
 Returns the probability that the policy specifies joint action a for domain index i. More...
 
 JointPolicyDiscretePure ()
 default Constructor - constructs empty policy More...
 
 JointPolicyDiscretePure (const Interface_ProblemToPolicyDiscretePure *pu, PolicyGlobals::PolicyDomainCategory idc)
 (default) Constructor More...
 
 JointPolicyDiscretePure (const I_PtPDpure_constPtr &pu, PolicyGlobals::PolicyDomainCategory idc)
 
 JointPolicyDiscretePure (const JointPolicyDiscretePure &a)
 Copy constructor. More...
 
virtual JointPolicyDiscretePureoperator= (const JointPolicyDiscretePure &o)
 Copy assignment operator. More...
 
virtual void RandomInitialization ()=0
 Randomly initialize the joint policy. More...
 
virtual void RandomInitialization (Index agentI)=0
 Randomly initialize the policy for agentI. More...
 
virtual void SetAction (Index agentI, Index domainI, Index aI)=0
 Sets the policy for agentI to domainI->aI. More...
 
void SetInterfacePTPDiscretePure (Interface_ProblemToPolicyDiscretePure *pu)
 Sets the planning unit for this joint policy. More...
 
virtual std::string SoftPrint () const =0
 Prints a description of this JointPolicyPureVector to a string. More...
 
virtual std::string SoftPrintBrief () const =0
 Prints a brief description to a string. More...
 
virtual boost::shared_ptr
< JointPolicyPureVector
ToJointPolicyPureVector () const =0
 
virtual ~JointPolicyDiscretePure ()
 Destructor. More...
 
- Public Member Functions inherited from JointPolicyDiscrete
virtual PolicyDiscreteGetIndividualPolicyDiscrete (Index agI) const =0
 return pointer to individual policy of agent agI More...
 
const
Interface_ProblemToPolicyDiscrete
GetInterfacePTPDiscrete () const
 return a pointer to the referred Interface_ProblemToPolicyDiscrete. More...
 
boost::shared_ptr< const
Interface_ProblemToPolicyDiscrete
GetInterfacePTPDiscreteShared () const
 return a shared pointer to the referred Interface_ProblemToPolicyDiscrete. More...
 
size_t GetNrDomainElements (Index agentI) const
 Returns the number of policy domain elements for agent agentI. More...
 
PolicyDomainCategory GetPolicyDomainCategory () const
 returns the Category of the domain over which the indices of this policy are specified. More...
 
 JointPolicyDiscrete ()
 default constructor creates an empty policy More...
 
 JointPolicyDiscrete (const Interface_ProblemToPolicyDiscrete *pu, PolicyGlobals::PolicyDomainCategory idc)
 (default) Constructor More...
 
 JointPolicyDiscrete (const I_PtPD_constPtr &pu, PolicyGlobals::PolicyDomainCategory idc)
 
 JointPolicyDiscrete (const JointPolicyDiscrete &a)
 Copy constructor. More...
 
virtual JointPolicyDiscreteoperator= (const JointPolicyDiscrete &o)
 Assignment operator. More...
 
Index SampleJointAction (Index i) const
 Returns a sampled joint action. More...
 
Index SampleJointAction (const std::vector< Index > &Is) const
 Returns a sampled joint action. More...
 
void SampleJointActionVector (Index i, std::vector< Index > &jaVec) const
 Returns a sampled joint action. More...
 
void SampleJointActionVector (const std::vector< Index > &Is, std::vector< Index > &jaVec) const
 Returns a sampled joint action. More...
 
void SetInterfacePTPDiscrete (const Interface_ProblemToPolicyDiscrete *p)
 sets the pointer to the Interface_ProblemToPolicyDiscrete. More...
 
void SetInterfacePTPDiscrete (I_PtPD_constPtr p)
 sets the shared pointer to the Interface_ProblemToPolicyDiscrete. More...
 
void SetPolicyDomainCategory (PolicyDomainCategory idc)
 sets the category of the domain over which the indices of this policy are specified. More...
 
virtual ~JointPolicyDiscrete ()
 Destructor. More...
 
- Public Member Functions inherited from JointPolicy
size_t GetDepth () const
 Returns the depth of the joint policy. More...
 
size_t GetNrAgents () const
 Returns the number of agents for which the joint policy is defined. More...
 
 JointPolicy (size_t nrAg)
 Constructor, initializes the depth to the maximum horizon. More...
 
 JointPolicy (const JointPolicy &o)
 copy constructor: More...
 
virtual bool operator< (const JointPolicy &o) const =0
 less-than operator. More...
 
virtual JointPolicyoperator= (const JointPolicy &o)
 copy assignment operator More...
 
virtual void Print () const
 Prints a description of a joint policy to cout. More...
 
virtual void SetDepth (size_t d)
 Sets the depth of the joint policy. More...
 
virtual ~JointPolicy ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from JointPolicy
size_t _m_nrAgents
 some other numbers we cache: More...
 

Detailed Description

JointPolicyDiscretePure is represents a pure joint policy for a discrete MADP.

The number of pure joint policies as represented by this class is finite.

Constructor & Destructor Documentation

JointPolicyDiscretePure::JointPolicyDiscretePure ( )
inline

default Constructor - constructs empty policy

JointPolicyDiscretePure::JointPolicyDiscretePure ( const Interface_ProblemToPolicyDiscretePure pu,
PolicyGlobals::PolicyDomainCategory  idc 
)

(default) Constructor

JointPolicyDiscretePure::JointPolicyDiscretePure ( const I_PtPDpure_constPtr pu,
PolicyGlobals::PolicyDomainCategory  idc 
)
JointPolicyDiscretePure::JointPolicyDiscretePure ( const JointPolicyDiscretePure a)

Copy constructor.

virtual JointPolicyDiscretePure::~JointPolicyDiscretePure ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual JointPolicyDiscretePure* JointPolicyDiscretePure::Clone ( ) const
pure virtual
double JointPolicyDiscretePure::GetActionProb ( Index  agentI,
Index  domI,
Index  aI 
) const
virtual

Returns the probability that the policy specifies action aI for domain index domI for agentI.

Required by JointPolicyDiscrete.

Implements JointPolicyDiscrete.

References GetActionIndex().

boost::shared_ptr<const Interface_ProblemToPolicyDiscretePure> JointPolicyDiscretePure::GetInterfacePTPDiscretePureShared ( ) const
inline
virtual Index JointPolicyDiscretePure::GetJointActionIndex ( Index  i) const
pure virtual
virtual Index JointPolicyDiscretePure::GetJointActionIndex ( LIndex  i) const
pure virtual

Returns the jaI taken by this policy for joint domain index johI.

Implemented in JointPolicyPureVector, and PartialJointPolicyPureVector.

double JointPolicyDiscretePure::GetJointActionProb ( Index  i,
Index  ja 
) const
virtual

Returns the probability that the policy specifies joint action a for domain index i.

Required by JointPolicyDiscrete.

Implements JointPolicyDiscrete.

References GetJointActionIndex().

double JointPolicyDiscretePure::GetJointActionProb ( LIndex  i,
Index  ja 
) const
virtual

Returns the probability that the policy specifies joint action a for domain index i.

Required by JointPolicyDiscrete.

Implements JointPolicyDiscrete.

References GetJointActionIndex().

JointPolicyDiscretePure & JointPolicyDiscretePure::operator= ( const JointPolicyDiscretePure o)
virtual
virtual void JointPolicyDiscretePure::RandomInitialization ( )
pure virtual

Randomly initialize the joint policy.

Implemented in JointPolicyPureVector, and PartialJointPolicyPureVector.

virtual void JointPolicyDiscretePure::RandomInitialization ( Index  agentI)
pure virtual

Randomly initialize the policy for agentI.

Implemented in JointPolicyPureVector, and PartialJointPolicyPureVector.

virtual void JointPolicyDiscretePure::SetAction ( Index  agentI,
Index  domainI,
Index  aI 
)
pure virtual

Sets the policy for agentI to domainI->aI.

Implemented in JointPolicyPureVector, and PartialJointPolicyPureVector.

Referenced by BayesianGameForDecPOMDPStage::ConstructExtendedPolicy().

void JointPolicyDiscretePure::SetInterfacePTPDiscretePure ( Interface_ProblemToPolicyDiscretePure pu)
inline

Sets the planning unit for this joint policy.

References JointPolicyDiscrete::SetInterfacePTPDiscrete().

virtual std::string JointPolicyDiscretePure::SoftPrint ( ) const
pure virtual
virtual std::string JointPolicyDiscretePure::SoftPrintBrief ( ) const
pure virtual

Prints a brief description to a string.

Implemented in JointPolicyPureVector, JointPolicyPureVectorForClusteredBG, and PartialJointPolicyPureVector.

virtual boost::shared_ptr<JointPolicyPureVector> JointPolicyDiscretePure::ToJointPolicyPureVector ( ) const
pure virtual