MultiAgentDecisionProcess  Release 0.2.1
QFunctionJAOHTree Class Reference

QFunctionJAOHTree is represents QFunctionJAOH which store Qvalues in a tree. More...

#include <QFunctionJAOHTree.h>

+ Inheritance diagram for QFunctionJAOHTree:
+ Collaboration diagram for QFunctionJAOHTree:

Public Member Functions

void Compute ()
 Compute the heuristic.
double GetQ (Index jaohI, Index jaI) const
 Return the Qvalue for JointActionObservationHistory Index jaohI and JointAction index jaI.
void Load (std::string filename)
 Load the Qvalues from disk from a file named filename.
 QFunctionJAOHTree (const PlanningUnitDecPOMDPDiscrete &pu)
 Default constructor, requires a planning unit.
void Save (std::string filename) const
 Stores the Qvalues to disk in file named filename.
void SetPU (const PlanningUnitDecPOMDPDiscrete &pu)
virtual ~QFunctionJAOHTree ()
 Destructor.
- Public Member Functions inherited from QFunctionJAOH
void ComputeWithCachedQValues ()
 Destructor.
 QFunctionJAOH (const PlanningUnitDecPOMDPDiscrete &pu)
 Default constructor, requires a planning unit.
- Public Member Functions inherited from QFunctionJAOHInterface
virtual std::string GetCacheFilename () const
 Gets the filename where the Qvalues should be stored.
void Load ()
 Load the Qvalues from disk.
 QFunctionJAOHInterface ()
void Save () const
 Stores the Qvalues to disk.
virtual ~QFunctionJAOHInterface ()
 Destructor.
- Public Member Functions inherited from QFunctionForDecPOMDPInterface
 QFunctionForDecPOMDPInterface ()
 (default) Constructor
virtual ~QFunctionForDecPOMDPInterface ()
 Destructor.
- Public Member Functions inherited from QFunctionInterface
virtual ~QFunctionInterface ()
 Compute the heuristic.
- Public Member Functions inherited from QFunctionForDecPOMDP
const
PlanningUnitDecPOMDPDiscrete
GetPU () const
 QFunctionForDecPOMDP (const PlanningUnitDecPOMDPDiscrete &pu)
 (default) Constructor

Private Member Functions

void ComputeQ ()
 This function starts the recursive computing of Qvalues.
virtual double ComputeRecursively (size_t time_step, JointActionObservationHistoryTree *jaoht, Index lastJAI)=0
 Recursively compute Qvalues based on a particular JOAHTree.
void DeInitialize ()
void Initialize ()

Private Attributes

bool _m_initialized

Additional Inherited Members

- Protected Member Functions inherited from QFunctionJAOH
virtual void ComputeWithCachedQValues (std::string filenameCache)
 See ComputeWithCachedQValuesdQValues(), this version accepts a filename.
- Protected Attributes inherited from QFunctionJAOH
QTable _m_QValues
 Table in which the Qvalues are stored.

Detailed Description

QFunctionJAOHTree is represents QFunctionJAOH which store Qvalues in a tree.

Definition at line 38 of file QFunctionJAOHTree.h.

Constructor & Destructor Documentation

QFunctionJAOHTree::QFunctionJAOHTree ( const PlanningUnitDecPOMDPDiscrete pu)

Default constructor, requires a planning unit.

Definition at line 41 of file QFunctionJAOHTree.cpp.

References _m_initialized.

QFunctionJAOHTree::~QFunctionJAOHTree ( )
virtual

Destructor.

Definition at line 49 of file QFunctionJAOHTree.cpp.

References DeInitialize().

Member Function Documentation

void QFunctionJAOHTree::Compute ( )
virtual

Compute the heuristic.

(after associated with an initialized PlanningUnitDecPOMDPDiscrete)

Implements QFunctionInterface.

Definition at line 74 of file QFunctionJAOHTree.cpp.

References _m_initialized, ComputeQ(), and Initialize().

virtual double QFunctionJAOHTree::ComputeRecursively ( size_t  time_step,
JointActionObservationHistoryTree jaoht,
Index  lastJAI 
)
privatepure virtual

Recursively compute Qvalues based on a particular JOAHTree.

Function that should be reimplemented by derived classes that use ComputeQ() (e.g., QPOMDP, QBG).

Referenced by ComputeQ().

void QFunctionJAOHTree::DeInitialize ( )
private

Definition at line 54 of file QFunctionJAOHTree.cpp.

References _m_initialized, and QFunctionJAOH::_m_QValues.

Referenced by SetPU(), and ~QFunctionJAOHTree().

double QFunctionJAOHTree::GetQ ( Index  jaohI,
Index  jaI 
) const
inlinevirtual

Return the Qvalue for JointActionObservationHistory Index jaohI and JointAction index jaI.

Implements QFunctionJAOHInterface.

Definition at line 85 of file QFunctionJAOHTree.h.

References QFunctionJAOH::_m_QValues.

void QFunctionJAOHTree::Initialize ( )
private

Definition at line 60 of file QFunctionJAOHTree.cpp.

References _m_initialized, QFunctionJAOH::_m_QValues, and QFunctionForDecPOMDP::GetPU().

Referenced by Compute().

void QFunctionJAOHTree::Load ( std::string  filename)
virtual

Load the Qvalues from disk from a file named filename.

Reimplemented from QFunctionJAOHInterface.

Definition at line 87 of file QFunctionJAOHTree.cpp.

References QFunctionJAOH::_m_QValues, QFunctionForDecPOMDP::GetPU(), and MDPSolver::LoadQTable().

void QFunctionJAOHTree::Save ( std::string  filename) const
virtual

Stores the Qvalues to disk in file named filename.

Reimplemented from QFunctionJAOHInterface.

Definition at line 82 of file QFunctionJAOHTree.cpp.

References QFunctionJAOH::_m_QValues, and MDPSolver::SaveQTable().

void QFunctionJAOHTree::SetPU ( const PlanningUnitDecPOMDPDiscrete pu)
virtual

Reimplemented from QFunctionForDecPOMDP.

Definition at line 68 of file QFunctionJAOHTree.cpp.

References DeInitialize().

Member Data Documentation

bool QFunctionJAOHTree::_m_initialized
private

Definition at line 42 of file QFunctionJAOHTree.h.

Referenced by Compute(), DeInitialize(), Initialize(), and QFunctionJAOHTree().


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