MultiAgentDecisionProcess
Release 0.2.1
|
AlphaVectorPOMDP implements POMDP specific functionality for alpha-vector based planning. More...
#include <AlphaVectorPOMDP.h>
Public Member Functions | |
AlphaVectorPOMDP (const PlanningUnitDecPOMDPDiscrete &pu) | |
(default) Constructor | |
AlphaVector | BeliefBackup (const JointBeliefInterface &b, const GaoVectorSet &G) const |
Computes the AlphaVector resulting from backing up JointBeliefInterface b with the back-projected vectors in G. | |
AlphaVector | BeliefBackup (const JointBeliefInterface &b, Index a, const GaoVectorSet &G) const |
virtual | ~AlphaVectorPOMDP () |
Destructor. | |
![]() | |
AlphaVectorPlanning (const PlanningUnitDecPOMDPDiscrete &pu) | |
(default) Constructor | |
GaoVectorSet | BackProject (const ValueFunctionPOMDPDiscrete &v) const |
Back projects a value function. | |
GaoVectorSet | BackProject (const VectorSet &v) const |
Back projects a value function, represented as a VectorSet. | |
GaoVectorSet | BackProjectMonahan (const QFunctionsDiscrete &Qs) const |
GaoVectorSet | BackProjectMonahan (const ValueFunctionPOMDPDiscrete &V) const |
VectorSet | CrossSum (const VectorSet &A, const VectorSet &B) const |
Compute the cross-sum of two vector sets. | |
void | ExportPOMDPFile (const std::string &filename) const |
Exports the POMDP to file named filename. | |
ValueFunctionPOMDPDiscrete | GetImmediateRewardValueFunction () const |
Returns the value function induced by the reward model. | |
const PlanningUnitDecPOMDPDiscrete * | GetPU () const |
Returns a ref to the PlanningUnit. | |
void | Initialize () |
void | MonahanCrossSum (const GaoVectorSet &G, ValueFunctionPOMDPDiscrete &V, Index a, bool doIncPrune) const |
ValueFunctionPOMDPDiscrete | Prune (const ValueFunctionPOMDPDiscrete &V) const |
Prune a valuefunction. | |
VectorSet | Prune (const VectorSet &V) const |
Prune a VectorSet. | |
BeliefSet | SampleBeliefs (ArgumentHandlers::Arguments args) const |
Sample a belief set according to the arguments. | |
QFunctionsDiscrete | ValueFunctionToQ (const ValueFunctionPOMDPDiscrete &V) const |
virtual | ~AlphaVectorPlanning () |
Destructor. | |
![]() | |
void | AddTimedEvent (const std::string &id, clock_t duration) |
Adds event of certain duration, e.g., an external program call. | |
std::vector< double > | GetTimedEventDurations (const std::string &id) |
Returns all stored durations (in s) for a particular event. | |
void | LoadTimers (const std::string &filename) |
Load timing info from file filename. | |
void | PrintTimers () const |
Print stored timing info. | |
void | PrintTimersSummary () const |
Sums data and prints out a summary. | |
void | SaveTimers (const std::string &filename) const |
Save collected timing info to file filename. | |
void | SaveTimers (std::ofstream &of) const |
Save collected timing info to ofstream of. | |
void | StartTimer (const std::string &id) const |
Start to time an event identified by id. | |
void | StopTimer (const std::string &id) const |
Stop to time an event identified by id. | |
TimedAlgorithm () | |
(default) Constructor | |
virtual | ~TimedAlgorithm () |
Destructor. |
Additional Inherited Members | |
![]() | |
static void | ExportBeliefSet (const BeliefSet &B, const std::string &filename) |
Exports a belief set to a file. | |
static void | ExportPOMDPFile (const std::string &filename, const PlanningUnitDecPOMDPDiscrete *pu) |
Exports the POMDP represented by pu to file named filename. | |
static void | ExportValueFunction (const std::string &filename, const ValueFunctionPOMDPDiscrete &V) |
Exports a value function V to file named filename. | |
static void | ExportValueFunction (const std::string &filename, const QFunctionsDiscrete &Q) |
Exports a Q functions Q to file named filename. | |
static void | ExportValueFunction (const std::string &filename, const QFunctionsDiscreteNonStationary &Q) |
Exports a Q functions Q to file named filename. | |
static std::vector< int > | GetDuplicateIndices (const VectorSet &V) |
Returns a vector<int> which for each vector k in V specifies whether it is unique, in which case vector<int>[k] is set to -1, or whether it is a duplicate of another vector l in V, in which case vector<int>[k] is set to the index of l, where 0 <= l < V.size()). | |
static ValueFunctionPOMDPDiscrete | GetImmediateRewardValueFunction (const PlanningUnitDecPOMDPDiscrete *pu) |
Returns the value function induced by the reward model of pu. | |
static ValueFunctionPOMDPDiscrete | ImportValueFunction (const std::string &filename) |
Imports a value function from a file named filename. | |
static QFunctionsDiscreteNonStationary | ImportValueFunction (const std::string &filename, size_t nr, size_t nrA, size_t nrS) |
static ValueFunctionPOMDPDiscrete | QFunctionsToValueFunction (const QFunctionsDiscrete &Q) |
static QFunctionsDiscrete | ValueFunctionToQ (const ValueFunctionPOMDPDiscrete &V, size_t nrA, size_t nrS) |
static bool | VectorIsInValueFunction (const AlphaVector &alpha, const ValueFunctionPOMDPDiscrete &V) |
AlphaVectorPOMDP implements POMDP specific functionality for alpha-vector based planning.
Definition at line 45 of file AlphaVectorPOMDP.h.
AlphaVectorPOMDP::AlphaVectorPOMDP | ( | const PlanningUnitDecPOMDPDiscrete & | pu | ) |
(default) Constructor
Definition at line 38 of file AlphaVectorPOMDP.cpp.
|
virtual |
Destructor.
Definition at line 44 of file AlphaVectorPOMDP.cpp.
AlphaVector AlphaVectorPOMDP::BeliefBackup | ( | const JointBeliefInterface & | b, |
const GaoVectorSet & | G | ||
) | const |
Computes the AlphaVector resulting from backing up JointBeliefInterface b with the back-projected vectors in G.
Implements equation (3.18) of PhD thesis Matthijs.
Definition at line 51 of file AlphaVectorPOMDP.cpp.
References PlanningUnitDecPOMDPDiscrete::GetDiscount(), BeliefValue::GetMaximizingVectorIndex(), PlanningUnitMADPDiscrete::GetNrJointActions(), PlanningUnitMADPDiscrete::GetNrJointObservations(), PlanningUnitMADPDiscrete::GetNrStates(), AlphaVectorPlanning::GetPU(), PlanningUnitDecPOMDPDiscrete::GetReward(), AlphaVector::SetAction(), AlphaVector::SetValue(), TimedAlgorithm::StartTimer(), and TimedAlgorithm::StopTimer().
Referenced by PerseusPOMDPPlanner::BackupStage().
AlphaVector AlphaVectorPOMDP::BeliefBackup | ( | const JointBeliefInterface & | b, |
Index | a, | ||
const GaoVectorSet & | G | ||
) | const |
Definition at line 98 of file AlphaVectorPOMDP.cpp.
References PlanningUnitDecPOMDPDiscrete::GetDiscount(), BeliefValue::GetMaximizingVectorIndex(), PlanningUnitMADPDiscrete::GetNrJointObservations(), PlanningUnitMADPDiscrete::GetNrStates(), AlphaVectorPlanning::GetPU(), PlanningUnitDecPOMDPDiscrete::GetReward(), AlphaVector::SetAction(), AlphaVector::SetValue(), TimedAlgorithm::StartTimer(), and TimedAlgorithm::StopTimer().