MultiAgentDecisionProcess
|
BGCG_SolverNonserialDynamicProgramming implements non-serial dynamic programming for collaborative graphical Bayesian games. More...
#include <BGCG_SolverNonserialDynamicProgramming.h>
Public Member Functions | |
BGCG_SolverNonserialDynamicProgramming (const boost::shared_ptr< const BayesianGameCollaborativeGraphical > &bgcg) | |
(default) Constructor More... | |
bool | IsExactSolver () const |
Methods should indicated whether they compute exact (optimal) solutions or not. More... | |
void | SetCBGlowerBound (double lb) |
void | SetCBGupperBound (double ub) |
double | Solve () |
The methods that performs the planning. More... | |
Public Member Functions inherited from BGCG_Solver | |
BGCG_Solver (const boost::shared_ptr< const BayesianGameCollaborativeGraphical > &bgcg, size_t nrSolutions=1) | |
(default) Constructor More... | |
boost::shared_ptr< const BayesianGameCollaborativeGraphical > | GetBGCG () const |
BGCG_Solver & | operator= (const BGCG_Solver &o) |
Copy assignment operator. More... | |
virtual | ~BGCG_Solver () |
Copy constructor. More... | |
Public Member Functions inherited from BayesianGameIdenticalPayoffSolver | |
void | AddSolution (const JointPolicyPureVector &jp, double value) |
void | AddSolution (const JointPolicyPureVectorForClusteredBG &jp, double value) |
void | AddSolution (LIndex jpolIndex, double value) |
BayesianGameIdenticalPayoffSolver (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bg, size_t nrDesiredSolutions=1) | |
(default) Constructor More... | |
double | Evaluate (const JointPolicyPureVector &jpolBG) const |
double | Evaluate (const JointPolicyPureVectorForClusteredBG &jpolBG) const |
boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > | GetBGIPI () const |
double | GetExpectedReward () const |
const boost::shared_ptr < JointPolicy > | GetJointPolicy () const |
const JointPolicyPureVector & | GetJointPolicyPureVector () const |
virtual boost::shared_ptr < JointPolicyDiscretePure > | GetNewJpol () const |
returns a new policy to be used with this BayesianGameIdenticalPayoffSolver More... | |
boost::shared_ptr< JPPVValuePair > | GetNextSolutionJPPV () const |
boost::shared_ptr < PartialJPDPValuePair > | GetNextSolutionPJPDP () const |
size_t | GetNrDesiredSolutions () const |
size_t | GetNrFoundSolutions () const |
Gets the found number of solutions. More... | |
double | GetPayoff () const |
std::ofstream * | GetResultsOFStream () const |
std::ofstream * | GetTimingsOFStream () const |
bool | GetWriteAnyTimeResults () const |
bool | IsEmptyJPPV () const |
bool | IsEmptyPJPDP () const |
void | PopNextSolutionJPPV () |
void | PopNextSolutionPJPDP () |
void | SaveSolution (const std::string &filename) const |
void | SetAnyTimeResults (bool turn_on, std::ofstream *results, std::ofstream *timings) |
Turns Anytime results on and of. More... | |
virtual void | SetDeadline (double deadlineInSeconds) |
To limit the amount of time the solver uses. More... | |
void | SetNrDesiredSolutions (size_t n) |
Gets the desired number of solutions to be returned. More... | |
std::string | SoftPrintSolution () const |
virtual | ~BayesianGameIdenticalPayoffSolver () |
Destructor. More... | |
Private Member Functions | |
std::vector< Index > | ComputeHeuristicAgentOrder () const |
Returns an order in which to eliminate agents. More... | |
void | CreateInitialLocalBGFunctionsFromBGCG () |
void | EliminateAgent (Index agToElim) |
LIndex | GetJpolIndexForBestResponses (const std::vector< Index > &agentOrdering) const |
void | InitializeNeighborsAndAgentFuncs () |
Private Attributes | |
std::vector< std::set < LocalBGValueFunctionInterface * > > | _m_agentFunctions |
Maintains the local BGvalue functions in which each agent participates. More... | |
std::vector< std::vector< Index > > | _m_bestResponses |
Scopes | _m_bestResponseScopes |
std::set < LocalBGValueFunctionInterface * > | _m_local_Fs |
std::vector< std::set< Index > > | _m_neighbors |
The set of neighbors for each agent. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from BayesianGameIdenticalPayoffSolver | |
virtual void | CheckDeadline (const std::string &errorMessage) const |
Checks whether the deadline has expired. Throws EDeadline. More... | |
virtual void | InitDeadline () |
Should be called at the beginning of Solve(). More... | |
Protected Attributes inherited from BGCG_Solver | |
boost::shared_ptr< const BayesianGameCollaborativeGraphical > | _m_bgcg |
BGCG_SolverNonserialDynamicProgramming implements non-serial dynamic programming for collaborative graphical Bayesian games.
BGCG_SolverNonserialDynamicProgramming::BGCG_SolverNonserialDynamicProgramming | ( | const boost::shared_ptr< const BayesianGameCollaborativeGraphical > & | bgcg | ) |
(default) Constructor
|
private |
Returns an order in which to eliminate agents.
References BGCG_Solver::GetBGCG().
Referenced by Solve().
|
private |
References _m_local_Fs, and BGCG_Solver::GetBGCG().
Referenced by Solve().
|
private |
References _m_agentFunctions, _m_bestResponses, _m_bestResponseScopes, _m_local_Fs, _m_neighbors, Globals::CastLIndexToIndex(), LocalBGValueFunctionInterface::GetAgentScope(), BGCG_Solver::GetBGCG(), LocalBGValueFunctionInterface::GetValue(), IndexTools::JointToIndividualIndices(), PrintTools::PrintProgress(), LocalBGValueFunctionInterface::SoftPrint(), and PrintTools::SoftPrint().
Referenced by Solve().
|
private |
References _m_bestResponses, _m_bestResponseScopes, Globals::CastLIndexToIndex(), BGCG_Solver::GetBGCG(), IndexTools::IndividualToJointIndices(), IndexTools::RestrictIndividualIndicesToScope(), PolicyPureVector::SetIndex(), PolicyPureVector::SoftPrint(), PrintTools::SoftPrint(), and PolicyGlobals::TYPE_INDEX.
Referenced by Solve().
|
private |
References _m_agentFunctions, _m_local_Fs, _m_neighbors, LocalBGValueFunctionInterface::GetAgentScope(), BGCG_Solver::GetBGCG(), and LocalBGValueFunctionInterface::SoftPrint().
Referenced by Solve().
|
inlinevirtual |
Methods should indicated whether they compute exact (optimal) solutions or not.
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
virtual |
The methods that performs the planning.
Returns the expected reward.
Implements BGCG_Solver.
References _m_bestResponses, _m_bestResponseScopes, _m_local_Fs, BayesianGameIdenticalPayoffSolver::AddSolution(), ComputeHeuristicAgentOrder(), CreateInitialLocalBGFunctionsFromBGCG(), EliminateAgent(), BGCG_Solver::GetBGCG(), GetJpolIndexForBestResponses(), InitializeNeighborsAndAgentFuncs(), and PrintTools::SoftPrintVector().
Referenced by GMAA_MAA_ELSI::CAVNP_quick_n_dirty2().
|
private |
Maintains the local BGvalue functions in which each agent participates.
Referenced by EliminateAgent(), and InitializeNeighborsAndAgentFuncs().
|
private |
Referenced by EliminateAgent(), GetJpolIndexForBestResponses(), and Solve().
|
private |
Referenced by EliminateAgent(), GetJpolIndexForBestResponses(), and Solve().
|
private |
Referenced by CreateInitialLocalBGFunctionsFromBGCG(), EliminateAgent(), InitializeNeighborsAndAgentFuncs(), and Solve().
|
private |
The set of neighbors for each agent.
Referenced by EliminateAgent(), and InitializeNeighborsAndAgentFuncs().