MultiAgentDecisionProcess
|
BGIP_SolverBruteForceSearch is a class that performs Brute force search for identical payoff Bayesian Games. More...
#include <BGIP_SolverBruteForceSearch.h>
Public Member Functions | |
BGIP_SolverBruteForceSearch (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bg, size_t verbose=0, size_t nrDesiredSolutions=INT_MAX, size_t deadlineInSeconds=0) | |
Constructor. More... | |
bool | GetNextJointPolicyAndValueSpecific (boost::shared_ptr< JointPolicyDiscretePure > &jpol, double &value) |
The specific implementation that should be implemented by the derived class: More... | |
bool | IsExactSolver () const |
Methods should indicated whether they compute exact (optimal) solutions or not. More... | |
void | SetCBGlowerBound (double lowerbound) |
void | SetCBGupperBound (double upperbound) |
double | Solve () |
The methods that performs the planning. More... | |
Public Member Functions inherited from BGIP_IncrementalSolverInterface_T< JP > | |
BGIP_IncrementalSolverInterface_T (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bg, size_t nrDesiredSolutions=INT_MAX) | |
virtual boost::shared_ptr < JointPolicyDiscretePure > | GetNewJpol () const |
this gives a implementation of GetNewJpol (specified in BayesianGameIdenticalPayoffSolver) More... | |
Public Member Functions inherited from BGIP_IncrementalSolverInterface | |
bool | AllSolutionsHaveBeenReturned () const |
BGIP_IncrementalSolverInterface (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bg, size_t nrDesiredSolutions=INT_MAX) | |
bool | GetNextJointPolicyAndValue (boost::shared_ptr< JointPolicyDiscretePure > &jpol, double &value) |
Gets the next solution from the Incremental CBG solver. More... | |
virtual | ~BGIP_IncrementalSolverInterface () |
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 |
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 Attributes | |
double | _m_CBGlowerBound |
double | _m_CBGupperBound |
size_t | _m_deadlineInSeconds |
Stores the maximum execution time. More... | |
bool | _m_solved |
Keeps track whether Solve() has been called. More... | |
size_t | _m_verbosity |
stores the MaxPlus parameter for the verbosity level 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 BGIP_IncrementalSolverInterface | |
size_t | _m_nrSolutionsReturned |
The number of solutions we already returned (not computed) More... | |
BGIP_SolverBruteForceSearch is a class that performs Brute force search for identical payoff Bayesian Games.
The template argument JP represents the joint policy class the solver should return.
|
inline |
Constructor.
Directly Associates a problem with the planner Information regarding the problem is used to construct a joint policy of the proper shape.
|
inlinevirtual |
The specific implementation that should be implemented by the derived class:
Implements BGIP_IncrementalSolverInterface.
References BayesianGameIdenticalPayoffSolver::GetNextSolutionJPPV(), BayesianGameIdenticalPayoffSolver::GetNextSolutionPJPDP(), BayesianGameIdenticalPayoffSolver::IsEmptyJPPV(), BayesianGameIdenticalPayoffSolver::IsEmptyPJPDP(), BayesianGameIdenticalPayoffSolver::PopNextSolutionJPPV(), BayesianGameIdenticalPayoffSolver::PopNextSolutionPJPDP(), and BGIP_SolverBruteForceSearch< JP >::Solve().
|
inlinevirtual |
Methods should indicated whether they compute exact (optimal) solutions or not.
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
The methods that performs the planning.
Returns the expected reward.
Implements BayesianGameIdenticalPayoffSolver.
References BayesianGameIdenticalPayoffSolver::AddSolution(), Globals::CastLIndexToDouble(), DEBUG_BGIP_SOLVER_BFS, BayesianGameIdenticalPayoffSolver::GetBGIPI(), TimeTools::GetDeltaTimeDouble(), BGIP_IncrementalSolverInterface_T< JP >::GetNewJpol(), BayesianGameIdenticalPayoffSolver::GetNrDesiredSolutions(), BayesianGameBase::GetProbability(), BayesianGameIdenticalPayoffSolver::GetResultsOFStream(), BayesianGameIdenticalPayoffSolver::GetTimingsOFStream(), BayesianGameIdenticalPayoffInterface::GetUtility(), BayesianGameIdenticalPayoffSolver::GetWriteAnyTimeResults(), and Globals::PROB_PRECISION.
Referenced by QFunctionJAOHTree::ComputeQ(), QBG::ComputeRecursively(), QHybrid::ComputeRecursively(), QBG::ComputeRecursivelyNoCache(), and BGIP_SolverBruteForceSearch< JP >::GetNextJointPolicyAndValueSpecific().
|
private |
|
private |
|
private |
Stores the maximum execution time.
If the solver expects it will take more time, it aborts an expection.
|
private |
Keeps track whether Solve() has been called.
|
private |
stores the MaxPlus parameter for the verbosity level