MultiAgentDecisionProcess
|
QFunctionJAOH represents a Q-function that operates on joint action-observation histories. More...
#include <QFunctionJAOH.h>
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... | |
QFunctionJAOH represents a Q-function that operates on joint action-observation histories.
QFunctionJAOH::QFunctionJAOH | ( | const PlanningUnitDecPOMDPDiscrete * | pu | ) |
Default constructor, requires a planning unit.
QFunctionJAOH::QFunctionJAOH | ( | const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > & | pu | ) |
|
inlinevirtual |
Destructor.
|
protectedvirtual |
See ComputeWithCachedQValues(), this version accepts a filename.
Reimplemented in QMDP.
References _m_QValues, QFunctionInterface::Compute(), QFunctionForDecPOMDP::GetPU(), QTable::Load(), MDPSolver::LoadQTable(), and QTable::Save().
Referenced by ComputeWithCachedQValues().
|
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().
|
protected |
Table in which the Qvalues are stored.
Referenced by QMDP::CacheJaohQValues(), QFunctionJAOHTree::ComputeQ(), ComputeWithCachedQValues(), QFunctionJAOHTree::DeInitialize(), QMDP::DeInitialize(), QFunctionJAOHTree::GetQ(), QMDP::GetQ(), QFunctionJAOHTree::Initialize(), QMDP::Initialize(), QFunctionJAOHTree::Load(), QMDP::Load(), QFunctionJAOHTree::Save(), and QMDP::Save().