|
MultiAgentDecisionProcess
|
BayesianGame is a class that represents a general Bayesian game in which each agent has its own utility function. More...
#include <BayesianGame.h>
Public Member Functions | |
| BayesianGame (size_t nrAgents, const std::vector< size_t > &nrActions, const std::vector< size_t > &nrTypes) | |
| BayesianGame (const BayesianGame &a) | |
| Copy constructor. More... | |
| void | Print () const |
| Prints out this BayesianGame. More... | |
| bool | SetInitialized (bool b) |
| Sets the initialized status to b. More... | |
| void | SetUtility (const Index agent, const Index jtype, const Index ja, const double u) |
| Sets the utility for agent, jtype, ja to u. More... | |
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... | |
Private Attributes | |
| bool | _m_initialized |
| private bool to indicate whether this BG is initialized. More... | |
| std::vector< RewardModelMapping > | _m_utilFuncs |
| Util functions - in general case 1 for each agent. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from BayesianGameBase | |
| void | ChangeNrActions (Index agI, size_t new_nr) |
| void | ChangeNrTypes (Index agI, size_t new_nr) |
| void | Initialize () |
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... | |
BayesianGame is a class that represents a general Bayesian game in which each agent has its own utility function.
This is a self contained class: meaning that it does not depend on any Multi-agent decision problem or Planning unit. This implies that, in order to convert a time-step of a MADP Planning Unit to a Bayesian game, indices of observation(-action) histories have to be converted. This class uses its own indices.
| BayesianGame::BayesianGame | ( | size_t | nrAgents, |
| const std::vector< size_t > & | nrActions, | ||
| const std::vector< size_t > & | nrTypes | ||
| ) |
| BayesianGame::BayesianGame | ( | const BayesianGame & | a | ) |
Copy constructor.
| void BayesianGame::Print | ( | ) | const |
Prints out this BayesianGame.
References BayesianGameBase::_m_nrAgents, _m_utilFuncs, and BayesianGameBase::Print().
| bool BayesianGame::SetInitialized | ( | bool | b | ) |
Sets the initialized status to b.
When setting to true - checks are performed to see if this is a consistent Bayesian Game.
References _m_initialized.
|
inline |
Sets the utility for agent, jtype, ja to u.
|
private |
private bool to indicate whether this BG is initialized.
To access the BayesianGameBase initialized bool use: BayesianGameBase::_m_initialized.
Referenced by SetInitialized().
|
private |
Util functions - in general case 1 for each agent.
We use RewardModelMapping substituting joint type indices for state indices.
Referenced by BayesianGame(), and Print().