MultiAgentDecisionProcess  Release 0.2.1
QFunctionJAOH Class Reference

QFunctionJAOH represents a Q-function that operates on joint action-observation histories. More...

#include <QFunctionJAOH.h>

+ Inheritance diagram for QFunctionJAOH:
+ Collaboration diagram for QFunctionJAOH:

Public Member Functions

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.
virtual double GetQ (Index jaohI, Index jaI) const =0
 Returns Q(joint A-O history jaohI, jaI).
void Load ()
 Load the Qvalues from disk.
virtual void Load (std::string filename)
 Load the Qvalues from disk from a file named filename.
 QFunctionJAOHInterface ()
void Save () const
 Stores the Qvalues to disk.
virtual void Save (std::string filename) const
 Stores the Qvalues to disk in file named filename.
virtual ~QFunctionJAOHInterface ()
 Destructor.
- Public Member Functions inherited from QFunctionForDecPOMDPInterface
 QFunctionForDecPOMDPInterface ()
 (default) Constructor
virtual ~QFunctionForDecPOMDPInterface ()
 Destructor.
- Public Member Functions inherited from QFunctionInterface
virtual void Compute ()=0
virtual ~QFunctionInterface ()
 Compute the heuristic.
- Public Member Functions inherited from QFunctionForDecPOMDP
const
PlanningUnitDecPOMDPDiscrete
GetPU () const
 QFunctionForDecPOMDP (const PlanningUnitDecPOMDPDiscrete &pu)
 (default) Constructor
void SetPU (const PlanningUnitDecPOMDPDiscrete &pu)

Protected Member Functions

virtual void ComputeWithCachedQValues (std::string filenameCache)
 See ComputeWithCachedQValuesdQValues(), this version accepts a filename.

Protected Attributes

QTable _m_QValues
 Table in which the Qvalues are stored.

Detailed Description

QFunctionJAOH represents a Q-function that operates on joint action-observation histories.

Definition at line 46 of file QFunctionJAOH.h.

Constructor & Destructor Documentation

QFunctionJAOH::QFunctionJAOH ( const PlanningUnitDecPOMDPDiscrete pu)

Default constructor, requires a planning unit.

Definition at line 37 of file QFunctionJAOH.cpp.

Member Function Documentation

void QFunctionJAOH::ComputeWithCachedQValues ( std::string  filenameCache)
protectedvirtual

See ComputeWithCachedQValuesdQValues(), this version accepts a filename.

Definition at line 44 of file QFunctionJAOH.cpp.

References _m_QValues, QFunctionInterface::Compute(), QFunctionForDecPOMDP::GetPU(), MDPSolver::LoadQTable(), and MDPSolver::SaveQTable().

void QFunctionJAOH::ComputeWithCachedQValues ( )

Destructor.

Compute Qvalue function, while caching the Qvalues to disk. Before computing them, the function checks whether the Qvalues have been computed before, and if so, loads them from disk. If not, it computes them, and afterwards saves them for re-use.

Definition at line 80 of file QFunctionJAOH.cpp.

References QFunctionJAOHInterface::GetCacheFilename().

Member Data Documentation


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