MultiAgentDecisionProcess
PolicyDiscrete Class Referenceabstract

PolicyDiscrete is a class that represents a discrete policy. More...

#include <PolicyDiscrete.h>

Inheritance diagram for PolicyDiscrete:
[legend]

Public Member Functions

virtual PolicyDiscreteClone () const =0
 Returns a pointer to a copy of this class. More...
 
virtual double GetActionProb (Index i, Index ja) const =0
 Returns the probability that the policy specifies action for domain index i. More...
 
const
Interface_ProblemToPolicyDiscrete
GetInterfacePTPDiscrete () const
 return a pointer to the referred Interface_ProblemToPolicyDiscrete. More...
 
PolicyDomainCategory GetPolicyDomainCategory () const
 Returns the Category of the domain over which the indices of this policy are specified. More...
 
 PolicyDiscrete (const Interface_ProblemToPolicyDiscrete *iptpd, PolicyGlobals::PolicyDomainCategory idc, Index agentI)
 (default) Constructor More...
 
 PolicyDiscrete (const I_PtPD_constPtr &iptpd, PolicyGlobals::PolicyDomainCategory idc, Index agentI)
 
 PolicyDiscrete (const PolicyDiscrete &a)
 Copy constructor. More...
 
Index SampleAction (Index i) const
 samples an action for domain index i. More...
 
void SetPolicyDomainCategory (PolicyDomainCategory idc)
 Sets the category of the domain over which the indices of this policy are specified. More...
 
virtual ~PolicyDiscrete ()
 Destructor. More...
 
- Public Member Functions inherited from Policy
size_t GetDepth () const
 Returns the depth of the policy. More...
 
 Policy (Index agentI)
 Constructor, initializes the depth to the maximum horizon. More...
 
virtual void Print () const
 Prints a description of a policy to cout. More...
 
virtual void SetDepth (size_t d)
 Sets the depth of the policy. More...
 
virtual std::string SoftPrint () const =0
 Prints a description of a policy to a string. More...
 
virtual ~Policy ()
 Destructor. More...
 

Private Attributes

const
Interface_ProblemToPolicyDiscrete
_m_I_PTPD
 
I_PtPD_constPtr _m_I_PTPDshared
 
PolicyGlobals::PolicyDomainCategory _m_indexDomCat
 Maintains the PolicyDomainCategory. More...
 

Additional Inherited Members

- Protected Attributes inherited from Policy
Index _m_agentI
 

Detailed Description

PolicyDiscrete is a class that represents a discrete policy.

A `discrete joint policy' is a policy for a discrete problem. I.e., the problem specifies, for each agent, a discrete domain for the policy and discrete actions.

A PolicyDiscrete from discrete indices over the domain (typically action-observation histories or types) to (degenerate) probability distributions over indices over (joint) actions.

This means that this class includes both pure and stochastic pure policies.

Constructor & Destructor Documentation

PolicyDiscrete::PolicyDiscrete ( const Interface_ProblemToPolicyDiscrete iptpd,
PolicyGlobals::PolicyDomainCategory  idc,
Index  agentI 
)
inline

(default) Constructor

PolicyDiscrete::PolicyDiscrete ( const I_PtPD_constPtr iptpd,
PolicyGlobals::PolicyDomainCategory  idc,
Index  agentI 
)
inline
PolicyDiscrete::PolicyDiscrete ( const PolicyDiscrete a)
inline

Copy constructor.

virtual PolicyDiscrete::~PolicyDiscrete ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual PolicyDiscrete* PolicyDiscrete::Clone ( ) const
pure virtual

Returns a pointer to a copy of this class.

Implements Policy.

Implemented in PolicyPureVector, and PolicyDiscretePure.

virtual double PolicyDiscrete::GetActionProb ( Index  i,
Index  ja 
) const
pure virtual

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

Implementations for pure policies clearly should return 0 or 1.

Implemented in PolicyDiscretePure.

Referenced by SampleAction().

const Interface_ProblemToPolicyDiscrete* PolicyDiscrete::GetInterfacePTPDiscrete ( ) const
inline
PolicyDomainCategory PolicyDiscrete::GetPolicyDomainCategory ( ) const
inline

Returns the Category of the domain over which the indices of this policy are specified.

Referenced by PolicyPureVector::GetIndex(), PolicyPureVector::Increment(), PolicyPureVector::PolicyPureVector(), PolicyPureVector::SetDepth(), PolicyPureVector::SetIndex(), and PolicyPureVector::SoftPrint().

Index PolicyDiscrete::SampleAction ( Index  i) const
void PolicyDiscrete::SetPolicyDomainCategory ( PolicyDomainCategory  idc)
inline

Sets the category of the domain over which the indices of this policy are specified.

Member Data Documentation

const Interface_ProblemToPolicyDiscrete* PolicyDiscrete::_m_I_PTPD
private
I_PtPD_constPtr PolicyDiscrete::_m_I_PTPDshared
private
PolicyGlobals::PolicyDomainCategory PolicyDiscrete::_m_indexDomCat
private

Maintains the PolicyDomainCategory.