MultiAgentDecisionProcess
QFunctionJAOH Class Reference

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

#include <QFunctionJAOH.h>

Inheritance diagram for QFunctionJAOH:
[legend]

Public Member Functions

virtual void ComputeWithCachedQValues (bool computeIfNotCached=true)
 Compute Qvalue function, while caching the Qvalues to disk. More...
 
 QFunctionJAOH (const PlanningUnitDecPOMDPDiscrete *pu)
 Default constructor, requires a planning unit. More...
 
 QFunctionJAOH (const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &pu)
 
virtual ~QFunctionJAOH ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionJAOHInterface
virtual double GetQ (Index jaohI, Index jaI) const =0
 Returns Q(joint A-O history jaohI, jaI). More...
 
 QFunctionJAOHInterface ()
 
virtual ~QFunctionJAOHInterface ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionForDecPOMDPInterface
 QFunctionForDecPOMDPInterface ()
 (default) Constructor More...
 
virtual ~QFunctionForDecPOMDPInterface ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionInterface
virtual void Compute ()=0
 Compute the heuristic. More...
 
virtual void Load ()
 Load the Qvalues from disk. More...
 
virtual void Load (const std::string &filename)=0
 Load the Qvalues from disk from a file named filename. More...
 
virtual void Save () const
 Stores the Qvalues to disk. More...
 
virtual void Save (const std::string &filename) const =0
 Stores the Qvalues to disk in file named filename. More...
 
virtual std::string SoftPrintBrief () const =0
 Returns a short description of the heuristic, can be used for constructing filenames. More...
 
virtual ~QFunctionInterface ()
 
- Public Member Functions inherited from QFunctionForDecPOMDP
virtual std::string GetCacheFilename () const
 Gets the filename where the Qvalues should be stored. More...
 
const
PlanningUnitDecPOMDPDiscrete
GetPU () const
 
 QFunctionForDecPOMDP (const PlanningUnitDecPOMDPDiscrete *pu)
 (default) Constructor More...
 
 QFunctionForDecPOMDP (const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &pu)
 
void SetPU (const PlanningUnitDecPOMDPDiscrete *pu)
 
void SetPU (const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &pu)
 

Protected Member Functions

virtual void ComputeWithCachedQValues (const std::string &filenameCache, bool computeIfNotCached=true)
 See ComputeWithCachedQValues(), this version accepts a filename. More...
 

Protected Attributes

QTable _m_QValues
 Table in which the Qvalues are stored. More...
 

Detailed Description

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

Constructor & Destructor Documentation

QFunctionJAOH::QFunctionJAOH ( const PlanningUnitDecPOMDPDiscrete pu)

Default constructor, requires a planning unit.

QFunctionJAOH::QFunctionJAOH ( const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &  pu)
virtual QFunctionJAOH::~QFunctionJAOH ( )
inlinevirtual

Destructor.

Member Function Documentation

void QFunctionJAOH::ComputeWithCachedQValues ( const std::string &  filenameCache,
bool  computeIfNotCached = true 
)
protectedvirtual
virtual void QFunctionJAOH::ComputeWithCachedQValues ( bool  computeIfNotCached = true)
inlinevirtual

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. This behavior can be changed by settings computeIfNotCached to false, in which case an Exception will be thrown if the Q function has not been previously stored on disk.

Implements QFunctionInterface.

References ComputeWithCachedQValues(), and QFunctionForDecPOMDP::GetCacheFilename().

Member Data Documentation