MultiAgentDecisionProcess
QFunctionForFactoredDecPOMDP Class Reference

QFunctionForFactoredDecPOMDP is a base class for the implementation of a QFunction for a Factored DecPOMDP. More...

#include <QFunctionForFactoredDecPOMDP.h>

Inheritance diagram for QFunctionForFactoredDecPOMDP:
[legend]

Public Member Functions

virtual void ComputeWithCachedQValues (bool computeIfNotCached)
 Compute Qvalue function, while caching the Qvalues to disk. More...
 
virtual std::string GetCacheFilename () const
 Gets the filename where the Qvalues should be stored. More...
 
const
PlanningUnitFactoredDecPOMDPDiscrete
GetPU () const
 
const
PlanningUnitFactoredDecPOMDPDiscrete
GetPUF () const
 
virtual void Load (const std::string &filename)
 Load the Qvalues from disk from a file named filename. More...
 
 QFunctionForFactoredDecPOMDP (const PlanningUnitFactoredDecPOMDPDiscrete *puf)
 (default) Constructor More...
 
 QFunctionForFactoredDecPOMDP (const boost::shared_ptr< const PlanningUnitFactoredDecPOMDPDiscrete > &puf)
 
virtual void Save (const std::string &filename) const
 Stores the Qvalues to disk in file named filename. More...
 
void SetPU (const PlanningUnitDecPOMDPDiscrete *pu)
 
void SetPU (const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &pu)
 
void SetPUF (const PlanningUnitFactoredDecPOMDPDiscrete *pu)
 Changes the Planning unit pointed to. More...
 
void SetPUF (const boost::shared_ptr< const PlanningUnitFactoredDecPOMDPDiscrete > &pu)
 
- Public Member Functions inherited from QFunctionForFactoredDecPOMDPInterface
virtual ~QFunctionForFactoredDecPOMDPInterface ()
 (default) Constructor 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 Save () const
 Stores the Qvalues to disk. More...
 
virtual std::string SoftPrintBrief () const =0
 Returns a short description of the heuristic, can be used for constructing filenames. More...
 
virtual ~QFunctionInterface ()
 

Private Attributes

const
PlanningUnitFactoredDecPOMDPDiscrete
_m_puf
 
boost::shared_ptr< const
PlanningUnitFactoredDecPOMDPDiscrete
_m_pufShared
 

Detailed Description

QFunctionForFactoredDecPOMDP is a base class for the implementation of a QFunction for a Factored DecPOMDP.

In particular this function implements the QFunctionForFactoredDecPOMDPInterface i.e., the functions: SetPUF and GetPUF()

Constructor & Destructor Documentation

QFunctionForFactoredDecPOMDP::QFunctionForFactoredDecPOMDP ( const PlanningUnitFactoredDecPOMDPDiscrete puf)
inline

(default) Constructor

QFunctionForFactoredDecPOMDP::QFunctionForFactoredDecPOMDP ( const boost::shared_ptr< const PlanningUnitFactoredDecPOMDPDiscrete > &  puf)
inline

Member Function Documentation

virtual void QFunctionForFactoredDecPOMDP::ComputeWithCachedQValues ( bool  computeIfNotCached)
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.

string QFunctionForFactoredDecPOMDP::GetCacheFilename ( ) const
virtual

Gets the filename where the Qvalues should be stored.

Implements QFunctionInterface.

References directories::MADPGetResultsDir().

const PlanningUnitFactoredDecPOMDPDiscrete* QFunctionForFactoredDecPOMDP::GetPU ( ) const
inlinevirtual

Implements QFunctionForDecPOMDPInterface.

References _m_puf.

Referenced by GetPUF().

virtual void QFunctionForFactoredDecPOMDP::Load ( const std::string &  filename)
inlinevirtual

Load the Qvalues from disk from a file named filename.

Implements QFunctionInterface.

virtual void QFunctionForFactoredDecPOMDP::Save ( const std::string &  filename) const
inlinevirtual

Stores the Qvalues to disk in file named filename.

Implements QFunctionInterface.

void QFunctionForFactoredDecPOMDP::SetPU ( const PlanningUnitDecPOMDPDiscrete pu)
inlinevirtual
void QFunctionForFactoredDecPOMDP::SetPU ( const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &  pu)
inlinevirtual
void QFunctionForFactoredDecPOMDP::SetPUF ( const PlanningUnitFactoredDecPOMDPDiscrete pu)
inlinevirtual

Changes the Planning unit pointed to.

Implements QFunctionForFactoredDecPOMDPInterface.

void QFunctionForFactoredDecPOMDP::SetPUF ( const boost::shared_ptr< const PlanningUnitFactoredDecPOMDPDiscrete > &  pu)
inlinevirtual

Member Data Documentation

const PlanningUnitFactoredDecPOMDPDiscrete* QFunctionForFactoredDecPOMDP::_m_puf
private

Referenced by GetPU().

boost::shared_ptr<const PlanningUnitFactoredDecPOMDPDiscrete> QFunctionForFactoredDecPOMDP::_m_pufShared
private