MultiAgentDecisionProcess
|
BayesianGameWithClusterInfo represents an identical-payoff BG that can be clustered. More...
#include <BayesianGameWithClusterInfo.h>
Public Types | |
enum | BGClusterAlgorithm { Lossless, ApproxJB, ApproxPjaoh, ApproxPjaohJB } |
Public Member Functions | |
BayesianGameWithClusterInfo (const PlanningUnitDecPOMDPDiscrete *pu, const QFunctionJAOHInterface *q, const boost::shared_ptr< const PartialJointPolicyDiscretePure > &pastJPol, BGClusterAlgorithm clusterAlg=Lossless) | |
Constructor used to construct a BayesianGameWithClusterInfo from scratch. More... | |
BayesianGameWithClusterInfo (const PlanningUnitDecPOMDPDiscrete *pu) | |
Constructor used to construct am empty BayesianGameWithClusterInfo. More... | |
BayesianGameWithClusterInfo (const BayesianGameWithClusterInfo &a) | |
Copy constructor. More... | |
BGwCI_sharedPtr | Cluster () |
Returns a losslessly clustered copy of this BG. More... | |
double | ComputeMarginalTypeProbability (Index agI, Index typeI) const |
Index | FindTypeClusterIndex (Index agI, const TypeCluster *tc, Index aI, Index oI) const |
BGClusterAlgorithm | GetClusterAlgorithm () const |
boost::shared_ptr< const JointPolicyDiscretePure > | GetPastJointPolicyPVFCBG () const |
double | GetThresholdJB () const |
double | GetThresholdPjaoh () const |
const TypeCluster * | GetTypeCluster (Index agI, Index tcI) const |
Return pointer to agent agI's tcI-th TypeCluster. More... | |
BayesianGameWithClusterInfo & | operator= (const BayesianGameWithClusterInfo &o) |
Copy assignment operator. More... | |
void | Print () const |
Print this BayesianGameIdenticalPayoff to cout. More... | |
void | SetThresholdJB (double threshold) |
void | SetThresholdPjaoh (double threshold) |
std::string | SoftPrint () const |
Prints a description of this entire BayesianGameIdenticalPayoff to a string. More... | |
virtual | ~BayesianGameWithClusterInfo () |
Destructor. More... | |
Public Member Functions inherited from BayesianGameForDecPOMDPStage | |
BayesianGameForDecPOMDPStage (const PlanningUnitDecPOMDPDiscrete *pu, const QFunctionJAOHInterface *q, const boost::shared_ptr< const PartialJointPolicyDiscretePure > &pastJPol) | |
Constructor that creates and initializes a BG from scratch. More... | |
BayesianGameForDecPOMDPStage (const PlanningUnitDecPOMDPDiscrete *pu) | |
Constructor that creates an empty BG. More... | |
BayesianGameForDecPOMDPStage (const BayesianGameForDecPOMDPStage &a) | |
Copy constructor. More... | |
void | ClearAllImmediateRewards () |
We can also clear this cache. More... | |
void | ComputeAllImmediateRewards (const FactoredDecPOMDPDiscreteInterface *fd=0) |
When performing a lot of GetImmediateReward calls we can first compute a cache of immediate rewards, to speed things up. More... | |
double | ComputeDiscountedImmediateRewardForJPol (const boost::shared_ptr< JointPolicyDiscretePure > &jpolBG, const PlanningUnitFactoredDecPOMDPDiscrete *pu=0) const |
Compute the discounted expected imm reward for jpolBG. More... | |
double | GetImmediateReward (Index jtI, Index jaI, const FactoredDecPOMDPDiscreteInterface *fd=0) const |
Returns the (expected) immediate reward for jtI, jaI. More... | |
const PlanningUnitDecPOMDPDiscrete * | GetPUDecPOMDPDiscrete () const |
const QFunctionJAOHInterface * | GetQHeur () const |
BayesianGameForDecPOMDPStage & | operator= (const BayesianGameForDecPOMDPStage &o) |
Copy assignment operator. More... | |
~BayesianGameForDecPOMDPStage () | |
Destructor. More... | |
Public Member Functions inherited from BayesianGameForDecPOMDPStageInterface | |
BayesianGameForDecPOMDPStageInterface () | |
Constructor without arguments, needed for serialization. More... | |
BayesianGameForDecPOMDPStageInterface (const boost::shared_ptr< const PartialJointPolicyDiscretePure > &pastJPol) | |
BayesianGameForDecPOMDPStageInterface (Index t) | |
boost::shared_ptr< const PartialJointPolicyDiscretePure > | GetPastJointPolicy () const |
Index | GetStage () const |
virtual | ~BayesianGameForDecPOMDPStageInterface () |
Destructor. More... | |
Public Member Functions inherited from BayesianGameIdenticalPayoff | |
BayesianGameIdenticalPayoff () | |
BayesianGameIdenticalPayoff (const BayesianGameIdenticalPayoff &o) | |
BayesianGameIdenticalPayoff (size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes, bool useSparseRewardModel=false) | |
virtual double | ComputeValueJPol (const JointPolicyDiscretePure &jpolBG) const |
evaluates the value of a joint policy. More... | |
double | GetUtility (const Index jtype, const Index ja) const |
Gets the utility for (for all agents) jtype, ja. More... | |
double | GetUtility (const std::vector< Index > &indTypeIndices, const std::vector< Index > &indActionIndices) const |
Gets the utility for (for all agents) joint type corresponding to the individual type indices (indTypeIndices) and joint action corresponding to individual action indices (indActionIndices). More... | |
BayesianGameIdenticalPayoff & | operator= (const BayesianGameIdenticalPayoff &o) |
Copy assignment operator. More... | |
void | PrintUtilForJointType (Index jtype) const |
Prints the utilities for jtype. More... | |
bool | SetInitialized (bool b) |
Sets the initialized status to b. More... | |
void | SetUtility (const Index jtype, const Index ja, const double u) |
Sets the utility for (for all agents) jtype, ja to u. More... | |
void | SetUtility (const std::vector< Index > &indTypeIndices, const std::vector< Index > &indActionIndices, const double u) |
Sets the utility for (for all agents) joint type corresponding to the individual type indices (indTypeIndices) and joint action corresponding to individual action indices (indActionIndices). More... | |
std::string | SoftPrintUtilForJointType (Index jtype) const |
Prints the utilities for jtype. More... | |
virtual | ~BayesianGameIdenticalPayoff () |
Destructor. More... | |
Public Member Functions inherited from BayesianGameIdenticalPayoffInterface | |
BayesianGameIdenticalPayoffInterface () | |
(default) Constructor More... | |
BayesianGameIdenticalPayoffInterface (size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes) | |
double | ComputeValueJPol (const JointPolicyDiscretePure &jpolBG) const |
BayesianGameIdenticalPayoffInterface & | operator= (const BayesianGameIdenticalPayoffInterface &o) |
Public Member Functions inherited from BayesianGameBase | |
void | AddProbability (Index i, double p) |
Adds p to the probability of joint type i. More... | |
void | AddProbability (const std::vector< Index > &indIndices, double p) |
Adds p to the probability of joint type corresponding to the individual type indices (indIndices). More... | |
virtual bool | AreCachedJointToIndivIndices (const PolicyGlobals::PolicyDomainCategory pdc) const |
Check whether certain index conversions are cached. More... | |
BayesianGameBase () | |
BayesianGameBase (size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes, int verboseness=0) | |
BayesianGameBase (const BayesianGameBase &a) | |
Copy constructor. More... | |
bool | CacheJointToIndivAOH_Indices () const |
bool | CacheJointToIndivOH_Indices () const |
bool | CacheJointToIndivType_Indices () const |
virtual PolicyGlobals::PolicyDomainCategory | GetDefaultIndexDomCat () const |
Return the default PolicyDomainCategory for the problem. More... | |
size_t | GetNrActions (Index agentI) const |
Get the number of invididual actions of a particular agent. More... | |
const std::vector< size_t > & | GetNrActions () const |
size_t | GetNrAgents () const |
implement the Interface_ProblemToPolicyDiscrete interface: More... | |
size_t | GetNrJointActions () const |
LIndex | GetNrJointPolicies () const |
size_t | GetNrJointTypes () const |
LIndex | GetNrPolicies (Index ag) const |
size_t | GetNrPolicyDomainElements (Index agentI, PolicyGlobals::PolicyDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of elements in the domain of an agent's policy. More... | |
const std::vector< size_t > & | GetNrTypes () const |
size_t | GetNrTypes (Index agI) const |
virtual double | GetProbability (Index i) const |
Gets the probability of joint type i. More... | |
virtual double | GetProbability (const std::vector< Index > &indIndices) const |
Gets the probability of joint type corresponding to the individual type indices (indIndices) More... | |
Index | IndividualToJointActionIndices (const Index *IndArr) const |
Converts individual action indices to a joint action index. More... | |
Index | IndividualToJointActionIndices (const std::vector< Index > &indices) const |
Converts individual action indices to a joint action index. More... | |
Index | IndividualToJointTypeIndices (const std::vector< Index > &indices) const |
std::vector< Index > | JointToIndividualActionIndices (Index jaI) const |
std::vector< Index > | JointToIndividualPolicyDomainIndices (Index jdI, PolicyGlobals::PolicyDomainCategory cat) const |
implementation of JointToIndividualPolicyDomainIndices More... | |
const std::vector< Index > & | JointToIndividualPolicyDomainIndicesRef (Index jdI, PolicyGlobals::PolicyDomainCategory cat) const |
implementation of JointToIndividualPolicyDomainIndicesRef More... | |
const std::vector< Index > & | JointToIndividualTypeIndices (Index jTypeI) const |
BayesianGameBase & | operator= (const BayesianGameBase &o) |
void | Print () const |
Print this BayesianGameBase to cout. More... | |
virtual void | SanityCheck () |
Sanity check should be overriden by classes that do not use the implementation provided by this class (e.g. More... | |
void | SanityCheckBGBase () |
bool | SetInitialized (bool b) |
Sets the initialized status to b. More... | |
void | SetProbability (Index i, double p) |
Sets the probability of joint type i to p. More... | |
void | SetProbability (const std::vector< Index > &indIndices, double p) |
Sets the probability of joint type corresponding to the individual type indices (indIndices) to p. More... | |
std::string | SoftPrint () const |
Prints a description of this BayesianGameBase to a string. More... | |
std::string | SoftPrintAction (Index agentI, Index actionI) const |
Virtual function that has to be implemented by derived class. More... | |
std::string | SoftPrintPolicyDomainElement (Index agentI, Index typeIndex, PolicyGlobals::PolicyDomainCategory cat) const |
Virtual function that has to be implemented by derived class. More... | |
std::string | SoftPrintSummary () const |
std::string | SoftPrintType (Index agentI, Index typeIndex) const |
~BayesianGameBase () | |
Destructor. More... | |
Public Member Functions inherited from Interface_ProblemToPolicyDiscretePure | |
LIndex | GetNrJointPolicies (PolicyGlobals::PolicyDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of joint policies, given the policy's domain. More... | |
LIndex | GetNrPolicies (Index ag, PolicyGlobals::PolicyDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of policies for an agent, given the policy's domain. More... | |
virtual | ~Interface_ProblemToPolicyDiscretePure () |
Destructor. More... | |
Public Member Functions inherited from Interface_ProblemToPolicyDiscrete | |
size_t | GetNrJointActions () const |
Get the number of joint actions. More... | |
Interface_ProblemToPolicyDiscrete () | |
(default) Constructor More... | |
virtual | ~Interface_ProblemToPolicyDiscrete () |
Destructor. More... | |
Static Public Member Functions | |
static BGwCI_sharedPtr | ConstructExtendedBGWCI (const BGwCI_constPtr &pBG, const JointPolicyDiscretePure &prevJPolBG, const QFunctionJAOHInterface *q) |
static std::string | SoftPrint (BGClusterAlgorithm clusterAlg) |
Static Public Member Functions inherited from BayesianGameIdenticalPayoff | |
static BayesianGameIdenticalPayoff | GenerateRandomBG (size_t nrAgents, std::vector< size_t > acs, std::vector< size_t > obs) |
Generates a random BG with identical payoffs. More... | |
static BayesianGameIdenticalPayoff | Load (const std::string &filename) |
Loads a BG from file. More... | |
static BayesianGameIdenticalPayoff | LoadTextFormat (const std::string &filename) |
static void | Save (const BayesianGameIdenticalPayoff &bg, const std::string &filename) |
static void | SaveTextFormat (const BayesianGameIdenticalPayoff &bg, const std::string &filename) |
Protected Member Functions | |
BayesianGameWithClusterInfo (const PlanningUnitDecPOMDPDiscrete *pu, const QFunctionJAOHInterface *q, Index t, const BGwCI_constPtr &prevBG, const boost::shared_ptr< const JointPolicyDiscretePure > &prevJPolBG, size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes, BGClusterAlgorithm clusterAlg, double thresholdJB, double thresholdPjaoh) | |
This constructor builds a BayesianGameWithClusterInfo from a BGWCI for the previous stage (i.e., using `bootstrapping'). More... | |
size_t | ConstructClusteredIndividualTypes (Index agI, TypeClusterList *newTypeList) |
constructs the new, clustered, set of types for agI. More... | |
void | Extend () |
called by ConstructExtendedBGWCI More... | |
void | ShiftProbabilityAndUtility (Index agI, Index t1, Index t2) |
shifts all the probability mass from agent agI's type t2 to t1. More... | |
bool | TestApproximateEquivalence (Index agI, Index t1, Index t2, double thresholdJB, double thresholdPjaoh) const |
bool | TestExactEquivalence (Index agI, Index t1, Index t2) const |
Test equivalence of agent agI's types t1 and t2. More... | |
Protected Member Functions inherited from BayesianGameForDecPOMDPStage | |
BayesianGameForDecPOMDPStage (const PlanningUnitDecPOMDPDiscrete *pu, const QFunctionJAOHInterface *q, Index t, size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes) | |
Constructor that only creates a BG of specified dimensions. More... | |
double | ComputeImmediateReward (Index jtI, Index jaI) const |
Compute the immediate reward for an action and joint type. More... | |
PartialJointPolicyDiscretePure * | ConstructExtendedPolicy (PartialJointPolicyDiscretePure &jpolPrevTs, JointPolicyDiscretePure &jpolBG, std::vector< size_t > &nrOHts, std::vector< Index > &firstOHtsI) |
Extends a previous policy jpolPrevTs to the next stage. More... | |
void | Fill_FirstOHtsI (Index ts, std::vector< Index > &firstOHtsI) |
Fills the (empty) vector firstOHtsI, with the indices (for each agent) of the first observation history of time step ts. More... | |
void | Fill_jaI_Array (Index ts, Index joIs[], boost::shared_ptr< const JointPolicyDiscretePure > jpolPrevTs, Index *jaI_arr) |
Fills the array jaI_arr with the joint actions taken for the JOHs as specified by the array of joint observations joIs according to jpolPrevTs. More... | |
void | Fill_joI_Array (const Index ts, const std::vector< Index > &indTypes, const std::vector< Index > &firstOHtsI, Index *joI_arr) |
Fills the array of joint observation given the individual types and offsets (firstOHtsI). More... | |
void | Initialize () |
Initialized the BG - called from constructor. More... | |
void | ProbRewardForjoahI (Index ts, Index jtI, Index *jaI_arr, Index *joI_arr, Index &jaohI, double &PjaohI, double &ExpR_0_prevTS_thisJAOH) |
Calculates the jaohI corresponding to jaI_arr and joI_arr and also returnes the P(jaohI) and the expected obtained reward for previous time steps GIVEN this joint action history. More... | |
Protected Member Functions inherited from BayesianGameBase | |
void | ChangeNrActions (Index agI, size_t new_nr) |
void | ChangeNrTypes (Index agI, size_t new_nr) |
void | Initialize () |
Private Attributes | |
BGClusterAlgorithm | _m_clusterAlgorithm |
The type of clustering we are performing. More... | |
std::vector< Index > | _m_jaohReps |
A list with a representative history for each joint type. More... | |
BGwCI_constPtr | _m_pBG |
The pointer to the previous BG. More... | |
boost::shared_ptr< const JointPolicyDiscretePure > | _m_pBGJPol |
The pointer to the joint BG policy for the previous BG (that lead to this BG) More... | |
const QHybrid * | _m_qHybrid |
A pointer to the Qfunction, if it is a hybrid one, otherwise 0. More... | |
const QFunctionJointBeliefInterface * | _m_qJB |
A pointer to the Qfunction, if it is defined over joint beliefs, otherwise 0. More... | |
double | _m_thresholdJB |
double | _m_thresholdPjaoh |
std::vector< TypeClusterList * > | _m_typeLists |
storing the extra information about the individual types. More... | |
Additional Inherited Members | |
Protected Attributes inherited from BayesianGameForDecPOMDPStage | |
bool | _m_areCachedImmediateRewards |
are the immediate rewards cached? More... | |
std::vector< std::vector < double > > | _m_immR |
the cache for the immediate rewards: immR[jt][ja] More... | |
std::vector < JointBeliefInterface * > | _m_JBs |
The joint beliefs induced by the joint types. More... | |
Protected Attributes inherited from BayesianGameBase | |
bool | _m_initialized |
private bool to indicate whether this BG is initialized. More... | |
bool | _m_JAoverflow |
Boolean that indicates whether the number of joint actions can be represented by size_t (or that overflowing occurs) More... | |
bool | _m_JToverflow |
Boolean that indicates whether the number of joint types can be represented by size_t (or that overflowing occurs) More... | |
std::vector< size_t > | _m_nrActions |
the number of actions for each agent More... | |
size_t | _m_nrAgents |
the number of players (or agents) More... | |
size_t | _m_nrJA |
the number of joint types: More... | |
size_t | _m_nrJTypes |
the number of joint actions: More... | |
std::vector< size_t > | _m_nrTypes |
the number of types for each agent More... | |
size_t * | _m_stepSizeActions |
an size_t array that caches the stepsize array for actions: More... | |
size_t * | _m_stepSizeTypes |
an size_t array that caches the stepsize array for types: More... | |
int | _m_verboseness |
_m_verboseness >0 verbose, <0 is quiet More... | |
BayesianGameWithClusterInfo represents an identical-payoff BG that can be clustered.
BayesianGameWithClusterInfo::BayesianGameWithClusterInfo | ( | const PlanningUnitDecPOMDPDiscrete * | pu, |
const QFunctionJAOHInterface * | q, | ||
const boost::shared_ptr< const PartialJointPolicyDiscretePure > & | pastJPol, | ||
BGClusterAlgorithm | clusterAlg = Lossless |
||
) |
Constructor used to construct a BayesianGameWithClusterInfo from scratch.
Given a past Dec-POMDP policy a new BG is constructed (not `bootstrapped' from a previous BG). This means that the resulting BG look exactly the same as when constructing a regular BayesianGameForDecPOMDPStage, only with the additional information about state probabilies (the joint beliefs) and types. Note that the type structure will contain for each agent a list with exactly 1 type for each history
store this type:
References _m_jaohReps, _m_typeLists, TypeCluster::AddType(), TypeCluster::begin(), Globals::CastLIndexToIndex(), PlanningUnitMADPDiscrete::GetActionObservationHistoryIndex(), Type_AOHIndex::GetAOHIndex(), BayesianGameBase::GetNrAgents(), BayesianGameBase::GetNrJointTypes(), BayesianGameBase::GetNrTypes(), PlanningUnitMADPDiscrete::GetObservationHistoryArrays(), BayesianGameForDecPOMDPStage::GetPUDecPOMDPDiscrete(), BayesianGameForDecPOMDPStageInterface::GetStage(), PlanningUnitMADPDiscrete::GetSuccessorOHI(), BayesianGameBase::IndividualToJointTypeIndices(), and BayesianGameBase::JointToIndividualTypeIndices().
Referenced by Cluster(), and ConstructExtendedBGWCI().
BayesianGameWithClusterInfo::BayesianGameWithClusterInfo | ( | const PlanningUnitDecPOMDPDiscrete * | pu | ) |
Constructor used to construct am empty BayesianGameWithClusterInfo.
References _m_typeLists, and PlanningUnitMADPDiscrete::GetNrAgents().
|
protected |
This constructor builds a BayesianGameWithClusterInfo from a BGWCI for the previous stage (i.e., using `bootstrapping').
Because we first need to compute the number of new types for each agent by extending the type-lists from prevBG, it is impracticle to call this constructor directly. Rather this constructor is called by ConstructExtendedBGWCI.
BayesianGameWithClusterInfo::BayesianGameWithClusterInfo | ( | const BayesianGameWithClusterInfo & | a | ) |
Copy constructor.
References _m_clusterAlgorithm, _m_jaohReps, _m_pBG, _m_pBGJPol, _m_qHybrid, _m_qJB, _m_thresholdJB, _m_thresholdPjaoh, and _m_typeLists.
|
virtual |
Destructor.
References _m_typeLists.
BGwCI_sharedPtr BayesianGameWithClusterInfo::Cluster | ( | ) |
Returns a losslessly clustered copy of this BG.
make a deep copy of the joint beliefs!
renumber the typeclusters for each agent
References _m_clusterAlgorithm, _m_jaohReps, BayesianGameForDecPOMDPStage::_m_JBs, BayesianGameBase::_m_nrActions, BayesianGameBase::_m_nrAgents, _m_pBG, _m_pBGJPol, _m_qJB, _m_thresholdJB, _m_thresholdPjaoh, BayesianGameWithClusterInfo(), ConstructClusteredIndividualTypes(), TypeCluster::GetIndex(), BayesianGameBase::GetNrAgents(), BayesianGameBase::GetNrJointTypes(), BayesianGameBase::GetProbability(), BayesianGameForDecPOMDPStage::GetPUDecPOMDPDiscrete(), BayesianGameForDecPOMDPStage::GetQHeur(), BayesianGameForDecPOMDPStageInterface::GetStage(), BayesianGameIdenticalPayoff::GetUtility(), BayesianGameBase::IndividualToJointTypeIndices(), TypeCluster::SetIndex(), and PrintTools::SoftPrintVector().
|
protected |
constructs the new, clustered, set of types for agI.
newTypeList is the new, empty TypeClusterList for agI. the function returns the number of (new, clustered) types for the agent.
check if this type has (marginal) prob. > 0
check if this type has (marginal) prob. > 0
References _m_clusterAlgorithm, _m_thresholdJB, _m_thresholdPjaoh, _m_typeLists, ApproxJB, ApproxPjaoh, ApproxPjaohJB, TypeCluster::clear(), ComputeMarginalTypeProbability(), Globals::EqualProbability(), BayesianGameBase::GetNrTypes(), BayesianGameForDecPOMDPStageInterface::GetStage(), Lossless, TypeCluster::Merge(), Globals::PROB_PRECISION, ShiftProbabilityAndUtility(), TestApproximateEquivalence(), and TestExactEquivalence().
Referenced by Cluster().
|
static |
|
protected |
called by ConstructExtendedBGWCI
References _m_jaohReps, BayesianGameForDecPOMDPStage::_m_JBs, _m_pBG, _m_pBGJPol, _m_qHybrid, _m_qJB, _m_typeLists, TypeCluster::AddType(), TypeCluster::begin(), Globals::CastLIndexToIndex(), Type_PointerTuple::GetAction(), TypeCluster::GetIndex(), PlanningUnitMADPDiscrete::GetNewJointBeliefInterface(), BayesianGameBase::GetNrAgents(), BayesianGameBase::GetNrJointActions(), BayesianGameBase::GetNrJointTypes(), PlanningUnitMADPDiscrete::GetNrObservations(), Type_PointerTuple::GetObservation(), Type_PointerTuple::GetPredecessor(), BayesianGameForDecPOMDPStage::GetPUDecPOMDPDiscrete(), QFunctionJointBeliefInterface::GetQ(), QFunctionJAOHInterface::GetQ(), QHybrid::GetQ(), BayesianGameForDecPOMDPStage::GetQHeur(), BayesianGameForDecPOMDPStageInterface::GetStage(), BayesianGameBase::IndividualToJointActionIndices(), PlanningUnitMADPDiscrete::IndividualToJointObservationIndices(), BayesianGameBase::JointToIndividualTypeIndices(), BayesianGameBase::SetProbability(), BayesianGameIdenticalPayoff::SetUtility(), QHybrid::StageRepresentedAsTree(), and JointBeliefInterface::Update().
Index BayesianGameWithClusterInfo::FindTypeClusterIndex | ( | Index | agI, |
const TypeCluster * | tc, | ||
Index | aI, | ||
Index | oI | ||
) | const |
|
inline |
|
inline |
References _m_pBGJPol.
|
inline |
|
inline |
|
inline |
Return pointer to agent agI's tcI-th TypeCluster.
BayesianGameWithClusterInfo & BayesianGameWithClusterInfo::operator= | ( | const BayesianGameWithClusterInfo & | o | ) |
Copy assignment operator.
|
inlinevirtual |
Print this BayesianGameIdenticalPayoff to cout.
Reimplemented from BayesianGameForDecPOMDPStage.
References SoftPrint().
|
inline |
|
inline |
|
protected |
shifts all the probability mass from agent agI's type t2 to t1.
This function is used when clustering types t1 and t2. In particular, this function shifts the probability mass of all joint types involving t2 to the corresponding ones involving t1. E.g.: Let <t u>=""> denote a joint type, then this function performs: P( <t1 u> ) := P ( <t1 u>=""> ) + P( <t2 u > ) P( <t2 u> ) := 0
Note: when performing approximate clustering, this function should also average the utilities of the corresponding joint types.
References _m_clusterAlgorithm, BayesianGameBase::_m_nrTypes, BayesianGameBase::GetNrAgents(), BayesianGameBase::GetNrJointActions(), BayesianGameBase::GetProbability(), BayesianGameIdenticalPayoff::GetUtility(), IndexTools::Increment(), BayesianGameBase::IndividualToJointTypeIndices(), Lossless, BayesianGameBase::SetProbability(), and BayesianGameIdenticalPayoff::SetUtility().
Referenced by ConstructClusteredIndividualTypes().
|
static |
References ApproxJB, ApproxPjaoh, ApproxPjaohJB, and Lossless.
Referenced by GMAA_MAAstarCluster::ConstructAndValuateNextPolicies().
|
virtual |
Prints a description of this entire BayesianGameIdenticalPayoff to a string.
Reimplemented from BayesianGameForDecPOMDPStage.
References _m_jaohReps, BayesianGameForDecPOMDPStage::_m_JBs, _m_pBG, _m_pBGJPol, _m_typeLists, BayesianGameBase::GetNrAgents(), BayesianGameBase::JointToIndividualTypeIndices(), BayesianGameForDecPOMDPStage::SoftPrint(), and PrintTools::SoftPrintVector().
Referenced by GMAA_kGMAACluster::ConstructAndValuateNextPolicies(), and Print().
|
protected |
TODO: check if both p1, p2 > 0
References BayesianGameForDecPOMDPStage::_m_JBs, BayesianGameBase::_m_nrTypes, Globals::EqualProbability(), BeliefInterface::GetIterator(), BayesianGameBase::GetNrAgents(), BeliefIteratorGeneric::GetProbability(), BayesianGameBase::GetProbability(), BayesianGameForDecPOMDPStageInterface::GetStage(), IndexTools::Increment(), BayesianGameBase::IndividualToJointTypeIndices(), and BeliefIteratorGeneric::Next().
Referenced by ConstructClusteredIndividualTypes().
|
protected |
Test equivalence of agent agI's types t1 and t2.
References BayesianGameForDecPOMDPStage::_m_JBs, BayesianGameBase::_m_nrTypes, Globals::EqualProbability(), BeliefInterface::GetIterator(), BayesianGameBase::GetNrAgents(), BeliefIteratorGeneric::GetProbability(), BayesianGameBase::GetProbability(), BayesianGameForDecPOMDPStageInterface::GetStage(), BeliefIteratorGeneric::GetStateIndex(), IndexTools::Increment(), BayesianGameBase::IndividualToJointTypeIndices(), and BeliefIteratorGeneric::Next().
Referenced by ConstructClusteredIndividualTypes().
|
private |
The type of clustering we are performing.
Referenced by BayesianGameWithClusterInfo(), Cluster(), ConstructClusteredIndividualTypes(), and ShiftProbabilityAndUtility().
|
private |
A list with a representative history for each joint type.
For each joint type we maintain a representative joint action- observation history.
Referenced by BayesianGameWithClusterInfo(), Cluster(), Extend(), and SoftPrint().
|
private |
The pointer to the previous BG.
Referenced by BayesianGameWithClusterInfo(), Cluster(), Extend(), and SoftPrint().
|
private |
The pointer to the joint BG policy for the previous BG (that lead to this BG)
the previous BG policy (i.e., not a PartialJointPolicyDiscretePure)
Referenced by BayesianGameWithClusterInfo(), Cluster(), Extend(), GetPastJointPolicyPVFCBG(), and SoftPrint().
|
private |
A pointer to the Qfunction, if it is a hybrid one, otherwise 0.
Referenced by BayesianGameWithClusterInfo(), and Extend().
|
private |
A pointer to the Qfunction, if it is defined over joint beliefs, otherwise 0.
Referenced by BayesianGameWithClusterInfo(), Cluster(), and Extend().
|
private |
Referenced by BayesianGameWithClusterInfo(), Cluster(), and ConstructClusteredIndividualTypes().
|
private |
Referenced by BayesianGameWithClusterInfo(), Cluster(), and ConstructClusteredIndividualTypes().
|
private |
storing the extra information about the individual types.
Each agent has a list of types or TypeClusters, as they can represent a cluster of action-observation histories.
Referenced by BayesianGameWithClusterInfo(), ConstructClusteredIndividualTypes(), Extend(), FindTypeClusterIndex(), SoftPrint(), and ~BayesianGameWithClusterInfo().