MultiAgentDecisionProcess
|
PolicyPoolJPolValPair is a policy pool with partial joint policy - value pairs. More...
#include <PolicyPoolPartialJPolValPair.h>
Public Member Functions | |
PartialPolicyPoolItemInterface_sharedPtr | GetBestRanked () const |
returns the contained item with the highest value. More... | |
void | Init (const Interface_ProblemToPolicyDiscretePure *pu) |
initializes the policy pool with the empty joint policy and a heuristic value set to infinuty (i.e., DBL_MAX) More... | |
void | Insert (PartialPolicyPoolItemInterface_sharedPtr ppi) |
Add a PolicyPoolItem to the Pool. More... | |
PolicyPoolPartialJPolValPair & | operator= (const PolicyPoolPartialJPolValPair &o) |
Copy assignment operator. More... | |
PartialPolicyPoolInterface & | operator= (const PartialPolicyPoolInterface &o) |
Copy assignment operator. More... | |
PolicyPoolPartialJPolValPair () | |
(default) Constructor More... | |
void | Pop (PartialPolicyPoolItemInterface_sharedPtr ppiToBeRemoved=PartialPolicyPoolItemInterface_sharedPtr()) |
Removes the item returned by 'Select'. More... | |
void | PopBestRanked () |
remove the GetBestRanked() item More... | |
void | Prune (double v) |
prune the items in the policy pool with exp.value < v More... | |
PartialPolicyPoolItemInterface_sharedPtr | Select () const |
The 'Select' operator from refGMAA. More... | |
size_t | Size () const |
return the number of items in the policy pool More... | |
std::string | SoftPrint () const |
void | Union (PartialPolicyPoolInterface_sharedPtr pp) |
add all elements of pp to 'this'. More... | |
~PolicyPoolPartialJPolValPair () | |
Copy constructor. More... | |
Public Member Functions inherited from PartialPolicyPoolInterface | |
size_t | Empty () const |
return whether the number of items in the policy pool is 0 More... | |
virtual | ~PartialPolicyPoolInterface () |
(default) Constructor More... | |
Private Attributes | |
std::priority_queue < PartialJPDPValuePair_sharedPtr > * | _m_jpvpQueue_p |
The pointer to the PartialJPDPValuePair queue. More... | |
PolicyPoolJPolValPair is a policy pool with partial joint policy - value pairs.
PolicyPoolPartialJPolValPair::PolicyPoolPartialJPolValPair | ( | ) |
(default) Constructor
PolicyPoolPartialJPolValPair::~PolicyPoolPartialJPolValPair | ( | ) |
Copy constructor.
Destructor.
|
inlinevirtual |
returns the contained item with the highest value.
This function returns a pointer to the PartialPolicyPoolItemInterface contained in this Policy pool with the highest (heuristic) value.
Heuristic is between brackets, because this function is typically used when we found lower bounds (i.e. full policies) and then select the maximum lowerbound.
Because this class always 'select's the best ranked policy, this function does the same as 'Select()'.
Implements PartialPolicyPoolInterface.
References Select().
|
virtual |
initializes the policy pool with the empty joint policy and a heuristic value set to infinuty (i.e., DBL_MAX)
A pointer to a Interface_ProblemToPolicyDiscretePure is needed to create the joint policy.
Implements PartialPolicyPoolInterface.
References PolicyGlobals::OHIST_INDEX, and PartialJointPolicyPureVector::SetDepth().
|
virtual |
PolicyPoolPartialJPolValPair & PolicyPoolPartialJPolValPair::operator= | ( | const PolicyPoolPartialJPolValPair & | o | ) |
Copy assignment operator.
References DEBUG_PPJPVP_ASSIGN.
|
virtual |
Copy assignment operator.
This must be implemented by the derived class (with this prototype). For an example, see PolicyPoolJPolValPair.
For now, this function is purely abstract. Might there be some members added to this (base) class, then an implementation could be made. This should then be called using PartialPolicyPoolInterface::operator=(o) from the copy assignment operator of the derived class. See also http://www.icu-project.org/docs/papers/cpp_report/the_assignment_operator_revisited.html.
Implements PartialPolicyPoolInterface.
References DEBUG_PPJPVP_ASSIGN.
|
virtual |
Removes the item returned by 'Select'.
This removes the next PolicyPoolItem (a wrapper for a partial joint policy, together with some properties), as would be returned by 'Select'.
If ppiToBeRemoved is specified, it actually checks that the desired PPI is removed.
Implements PartialPolicyPoolInterface.
Referenced by PopBestRanked().
|
inlinevirtual |
remove the GetBestRanked() item
Removes the PartialPolicyPoolItemInterface contained in this Policy pool with the highest (heuristic) value. (as is returned by GetBestRanked() )
Because this class always 'select's the best ranked policy, this function does the same as 'Pop()'.
Implements PartialPolicyPoolInterface.
References Pop().
|
virtual |
|
virtual |
The 'Select' operator from refGMAA.
This returns a reference to the next PolicyPoolItem (a wrapper for a partial joint policy, together with some properties).
The returned PolicyPoolItem is not removed from the PolicyPool.
Implements PartialPolicyPoolInterface.
Referenced by GetBestRanked().
|
inlinevirtual |
|
virtual |
Implements PartialPolicyPoolInterface.
|
virtual |
add all elements of pp to 'this'.
Note, that the pool pp is emptied in this process.
Implements PartialPolicyPoolInterface.
References _m_jpvpQueue_p.
|
private |
The pointer to the PartialJPDPValuePair queue.
Referenced by Union().