MultiAgentDecisionProcess  Release 0.2.1
BayesianGameIdenticalPayoffSolver< JP > Class Template Reference

BayesianGameIdenticalPayoffSolver is an interface for solvers for Bayesian games with identical payoff. More...

#include <BayesianGameIdenticalPayoffSolver.h>

+ Inheritance diagram for BayesianGameIdenticalPayoffSolver< JP >:
+ Collaboration diagram for BayesianGameIdenticalPayoffSolver< JP >:

Public Member Functions

 BayesianGameIdenticalPayoffSolver (const BayesianGameIdenticalPayoffInterface &bg, size_t nrSolutions=1)
 (default) Constructor
double Evaluate (const JP &jpolBG) const
double GetExpectedReward () const
const JointPolicyGetJointPolicy () const
const JointPolicyPureVectorGetJointPolicyPureVector () const
JP * GetNewJpol () const
size_t GetNrDesiredSolutions () const
 Gets the desired number of solutions to be returned.
size_t GetNrFoundSolutions () const
 Gets the found number of solutions.
const BGIPSolutionGetSolution () const
BGIPSolutionGetSolution ()
void SetAnyTimeResults (bool turn_on, std::ofstream *results, std::ofstream *timings)
 Turns Anytime results on and of.
virtual double Solve ()=0
 The methods that performs the planning.
virtual ~BayesianGameIdenticalPayoffSolver ()
 Destructor.
- Public Member Functions inherited from Referrer< BayesianGameIdenticalPayoffInterface >
BayesianGameIdenticalPayoffInterfaceGetReferred () const
 Return the referred thing...
 Referrer (BayesianGameIdenticalPayoffInterface *t_p=0)
 (default) Constructor
 Referrer (BayesianGameIdenticalPayoffInterface &t)
 Alternative constructor.
 Referrer (const Referrer &a)
 Copy constructor.
void SetReferred (BayesianGameIdenticalPayoffInterface *t_p)
 Change the referred thing...
virtual ~Referrer ()
 Destructor.

Protected Attributes

std::ofstream * _m_results_f
 the file to which writes the results are written
BGIPSolution _m_solution
 Stores the solution found by the solver.
std::ofstream * _m_timings_f
 the file to which writes the timings of the results are written
bool _m_writeAnyTimeResults
 This variable gives the number of solutions to return (k).

Detailed Description

template<class JP>
class BayesianGameIdenticalPayoffSolver< JP >

BayesianGameIdenticalPayoffSolver is an interface for solvers for Bayesian games with identical payoff.

The template argument JP represents the joint policy class the solver should return.

Definition at line 55 of file BayesianGameIdenticalPayoffSolver.h.

Constructor & Destructor Documentation

template<class JP>
BayesianGameIdenticalPayoffSolver< JP >::BayesianGameIdenticalPayoffSolver ( const BayesianGameIdenticalPayoffInterface bg,
size_t  nrSolutions = 1 
)
inline

(default) Constructor

takes a reference to the BG to be solved. nrSolutions is the number of solutions that the solver should return. I.e., if set higher than 1, it returns the k best found joint policies.

Definition at line 81 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
virtual BayesianGameIdenticalPayoffSolver< JP >::~BayesianGameIdenticalPayoffSolver ( )
inlinevirtual

Destructor.

Definition at line 92 of file BayesianGameIdenticalPayoffSolver.h.

Member Function Documentation

template<class JP>
double BayesianGameIdenticalPayoffSolver< JP >::Evaluate ( const JP &  jpolBG) const
inline
template<class JP>
double BayesianGameIdenticalPayoffSolver< JP >::GetExpectedReward ( void  ) const
inline

Definition at line 102 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
const JointPolicy* BayesianGameIdenticalPayoffSolver< JP >::GetJointPolicy ( void  ) const
inline

Definition at line 98 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
const JointPolicyPureVector& BayesianGameIdenticalPayoffSolver< JP >::GetJointPolicyPureVector ( void  ) const
inline
template<class JP>
JP* BayesianGameIdenticalPayoffSolver< JP >::GetNewJpol ( ) const
inline
template<class JP>
size_t BayesianGameIdenticalPayoffSolver< JP >::GetNrDesiredSolutions ( ) const
inline

Gets the desired number of solutions to be returned.

Definition at line 150 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
size_t BayesianGameIdenticalPayoffSolver< JP >::GetNrFoundSolutions ( ) const
inline

Gets the found number of solutions.

Definition at line 153 of file BayesianGameIdenticalPayoffSolver.h.

Referenced by BGIP_SolverAlternatingMaximization< JP >::Solve().

template<class JP>
const BGIPSolution& BayesianGameIdenticalPayoffSolver< JP >::GetSolution ( ) const
inline

Definition at line 104 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
BGIPSolution& BayesianGameIdenticalPayoffSolver< JP >::GetSolution ( )
inline

Definition at line 106 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
void BayesianGameIdenticalPayoffSolver< JP >::SetAnyTimeResults ( bool  turn_on,
std::ofstream *  results,
std::ofstream *  timings 
)
inline

Turns Anytime results on and of.

When turning on, valid ofstream pointers must be provided for the results and timings file.

Definition at line 113 of file BayesianGameIdenticalPayoffSolver.h.

template<class JP>
virtual double BayesianGameIdenticalPayoffSolver< JP >::Solve ( )
pure virtual

The methods that performs the planning.

Returns the expected reward.

Implemented in BGIP_SolverAlternatingMaximization< JP >, BGIP_SolverBruteForceSearch< JP >, and BGIP_SolverRandom.

Referenced by AlphaVectorBG::BeliefBackupBGIP_Solver(), and GMAA_kGMAA::ConstructAndValuateNextPolicies().

Member Data Documentation

template<class JP>
std::ofstream* BayesianGameIdenticalPayoffSolver< JP >::_m_results_f
protected

the file to which writes the results are written

Definition at line 69 of file BayesianGameIdenticalPayoffSolver.h.

Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::SetAnyTimeResults().

template<class JP>
std::ofstream* BayesianGameIdenticalPayoffSolver< JP >::_m_timings_f
protected

the file to which writes the timings of the results are written

Definition at line 71 of file BayesianGameIdenticalPayoffSolver.h.

Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::SetAnyTimeResults().

template<class JP>
bool BayesianGameIdenticalPayoffSolver< JP >::_m_writeAnyTimeResults
protected

This variable gives the number of solutions to return (k).

boolean that indicates whether anytime results should be written

Definition at line 66 of file BayesianGameIdenticalPayoffSolver.h.

Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::SetAnyTimeResults().


The documentation for this class was generated from the following file: