MultiAgentDecisionProcess
QFunctionInterface Class Referenceabstract

QFunctionInterface is an abstract class for all Q-Functions. More...

#include <QFunctionInterface.h>

Inheritance diagram for QFunctionInterface:
[legend]

Public Member Functions

virtual void Compute ()=0
 Compute the heuristic. More...
 
virtual void ComputeWithCachedQValues (bool computeIfNotCached=true)=0
 Compute Qvalue function, while caching the Qvalues to disk. More...
 
virtual std::string GetCacheFilename () const =0
 Gets the filename where the Qvalues should be stored. 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 ()
 

Detailed Description

QFunctionInterface is an abstract class for all Q-Functions.

Constructor & Destructor Documentation

virtual QFunctionInterface::~QFunctionInterface ( )
inlinevirtual

Member Function Documentation

virtual void QFunctionInterface::ComputeWithCachedQValues ( bool  computeIfNotCached = true)
pure virtual

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.

Implemented in QFunctionForFactoredDecPOMDP, QHybrid, QFunctionJAOH, and QFunctionJointBelief.

virtual std::string QFunctionInterface::GetCacheFilename ( ) const
pure virtual

Gets the filename where the Qvalues should be stored.

Implemented in QFunctionForFactoredDecPOMDP, and QFunctionForDecPOMDP.

Referenced by ArgumentUtils::GetHybridQheuristicFromArgs(), Load(), and Save().

virtual void QFunctionInterface::Load ( )
inlinevirtual

Load the Qvalues from disk.

References GetCacheFilename(), and Load().

Referenced by QHybrid::ComputeWithCachedQValues(), Load(), and QHybrid::Load().

virtual void QFunctionInterface::Load ( const std::string &  filename)
pure virtual
virtual void QFunctionInterface::Save ( ) const
inlinevirtual

Stores the Qvalues to disk.

References GetCacheFilename(), and Save().

Referenced by QHybrid::ComputeWithCachedQValues(), Save(), and QHybrid::Save().

virtual void QFunctionInterface::Save ( const std::string &  filename) const
pure virtual
virtual std::string QFunctionInterface::SoftPrintBrief ( ) const
pure virtual