MultiAgentDecisionProcess
Release 0.2.1
|
QFunctionJAOH represents a Q-function that operates on joint action-observation histories. More...
#include <QFunctionJAOH.h>
Public Member Functions | |
void | ComputeWithCachedQValues () |
Destructor. | |
QFunctionJAOH (const PlanningUnitDecPOMDPDiscrete &pu) | |
Default constructor, requires a planning unit. | |
![]() | |
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. | |
![]() | |
QFunctionForDecPOMDPInterface () | |
(default) Constructor | |
virtual | ~QFunctionForDecPOMDPInterface () |
Destructor. | |
![]() | |
virtual void | Compute ()=0 |
virtual | ~QFunctionInterface () |
Compute the heuristic. | |
![]() | |
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. |
QFunctionJAOH represents a Q-function that operates on joint action-observation histories.
Definition at line 46 of file QFunctionJAOH.h.
QFunctionJAOH::QFunctionJAOH | ( | const PlanningUnitDecPOMDPDiscrete & | pu | ) |
Default constructor, requires a planning unit.
Definition at line 37 of file QFunctionJAOH.cpp.
|
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().
|
protected |
Table in which the Qvalues are stored.
Definition at line 55 of file QFunctionJAOH.h.
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().