MultiAgentDecisionProcess
Release 0.2.1
|
PolicyDiscrete is a class that represents a discrete policy. More...
#include <PolicyDiscrete.h>
Public Member Functions | |
virtual PolicyDiscrete * | Clone () const =0 |
Returns a pointer to a copy of this class. | |
virtual double | GetActionProb (Index i, Index ja) const =0 |
Returns the probability that the policy specifies action for domain index i. | |
IndexDomainCategory | GetIndexDomainCategory () const |
Returns the Category of the domain over which the indices of this policy are specified. | |
const Interface_ProblemToPolicyDiscrete * | GetInterfacePTPDiscrete () const |
return a pointer to the referred Interface_ProblemToPolicyDiscrete. | |
PolicyDiscrete (const Interface_ProblemToPolicyDiscrete &iptpd, PolicyGlobals::IndexDomainCategory idc, Index agentI) | |
(default) Constructor | |
PolicyDiscrete (const PolicyDiscrete &a) | |
Copy constructor. | |
Index | SampleAction (Index i) const |
samples an action for domain index i. | |
void | SetIndexDomainCategory (IndexDomainCategory idc) |
Sets the category of the domain over which the indices of this policy are specified. | |
virtual | ~PolicyDiscrete () |
Destructor. | |
![]() | |
size_t | GetDepth () const |
Returns the depth of the policy. | |
Policy (Index agentI) | |
Constructor, initializes the depth to the maximum horizon. | |
virtual void | Print () const |
Prints a description of a policy to cout. | |
virtual void | SetDepth (size_t d) |
Sets the depth of the policy. | |
virtual std::string | SoftPrint () const =0 |
Prints a description of a policy to a string. | |
virtual | ~Policy () |
Destructor. |
Private Attributes | |
const Interface_ProblemToPolicyDiscrete * | _m_I_PTPD |
PolicyGlobals::IndexDomainCategory | _m_indexDomCat |
Maintains the IndexDomainCategory. |
Additional Inherited Members | |
![]() | |
Index | _m_agentI |
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.
Definition at line 55 of file PolicyDiscrete.h.
|
inline |
(default) Constructor
Definition at line 69 of file PolicyDiscrete.h.
|
inline |
Copy constructor.
Definition at line 77 of file PolicyDiscrete.h.
|
inlinevirtual |
Destructor.
Definition at line 84 of file PolicyDiscrete.h.
|
pure virtual |
Returns a pointer to a copy of this class.
Implements Policy.
Implemented in PolicyPureVector, and PolicyDiscretePure.
|
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().
|
inline |
Returns the Category of the domain over which the indices of this policy are specified.
Definition at line 100 of file PolicyDiscrete.h.
Referenced by PolicyPureVector::GetIndex(), PolicyPureVector::Increment(), PolicyPureVector::PolicyPureVector(), PolicyPureVector::SetDepth(), PolicyPureVector::SetIndex(), and PolicyPureVector::SoftPrint().
|
inline |
return a pointer to the referred Interface_ProblemToPolicyDiscrete.
Definition at line 117 of file PolicyDiscrete.h.
Referenced by PolicyDiscretePure::GetInterfacePTPDiscretePure(), and SampleAction().
Index PolicyDiscrete::SampleAction | ( | Index | i | ) | const |
samples an action for domain index i.
Definition at line 32 of file PolicyDiscrete.cpp.
References Policy::_m_agentI, GetActionProb(), GetInterfacePTPDiscrete(), and Interface_ProblemToPolicyDiscrete::GetNrActions().
Referenced by JointPolicyDiscrete::SampleJointActionVector().
|
inline |
Sets the category of the domain over which the indices of this policy are specified.
Definition at line 93 of file PolicyDiscrete.h.
|
private |
Definition at line 60 of file PolicyDiscrete.h.
|
private |
Maintains the IndexDomainCategory.
Definition at line 62 of file PolicyDiscrete.h.