MultiAgentDecisionProcess
Release 0.2.1
|
ValueFunctionDecPOMDPDiscrete represents and calculates the value function of a (pure) joint policy for a discrete Dec-POMDP. More...
#include <ValueFunctionDecPOMDPDiscrete.h>
Public Member Functions | |
double | CalculateV (bool cache=true) |
Calculates the value function, which is stored and returns V(0). | |
ValueFunctionDecPOMDPDiscrete (PlanningUnitDecPOMDPDiscrete &p, JointPolicyDiscretePure &jp) | |
Constructor. | |
ValueFunctionDecPOMDPDiscrete (PlanningUnitDecPOMDPDiscrete *p, JointPolicyDiscretePure *jp) | |
Constructor. | |
ValueFunctionDecPOMDPDiscrete (const ValueFunctionDecPOMDPDiscrete &a) | |
Copy constructor. | |
~ValueFunctionDecPOMDPDiscrete () | |
Destructor. | |
![]() | |
virtual PlanningUnit * | GetPU () const =0 |
Return a reference to the planning unit. | |
virtual | ~ValueFunction () |
Destructor. | |
![]() | |
PlanningUnitDecPOMDPDiscrete * | GetReferred () const |
Return the referred thing... | |
Referrer (PlanningUnitDecPOMDPDiscrete *t_p=0) | |
(default) Constructor | |
Referrer (PlanningUnitDecPOMDPDiscrete &t) | |
Alternative constructor. | |
Referrer (const Referrer &a) | |
Copy constructor. | |
void | SetReferred (PlanningUnitDecPOMDPDiscrete *t_p) |
Change the referred thing... | |
virtual | ~Referrer () |
Destructor. | |
![]() | |
JointPolicyDiscretePure * | GetReferred () const |
Return the referred thing... | |
Referrer (JointPolicyDiscretePure *t_p=0) | |
(default) Constructor | |
Referrer (JointPolicyDiscretePure &t) | |
Alternative constructor. | |
Referrer (const Referrer &a) | |
Copy constructor. | |
void | SetReferred (JointPolicyDiscretePure *t_p) |
Change the referred thing... | |
virtual | ~Referrer () |
Destructor. |
Private Types | |
typedef boost::numeric::ublas::matrix < double > | Matrix |
Private Member Functions | |
double | CalculateV0RecursivelyCached () |
double | CalculateV0RecursivelyNotCached () |
double | CalculateVsjohRecursivelyCached (Index sI, Index johI, Index stage) |
Function used by CalculateV0Recursively. | |
double | CalculateVsjohRecursivelyNotCached (Index sI, Index johI, Index stage) |
Function used by CalculateV0Recursively. | |
void | CreateV () |
Creates a brand new value function (deleting the current one if it exists). | |
void | DeleteV () |
Deletes the current value function. | |
Index | GetCombinedIndex (Index sI, Index JOHI) const |
JointPolicyDiscretePure * | GetJPol () const |
PlanningUnitDecPOMDPDiscrete * | GetPU () const |
bool | IsCached (Index sI, Index JOHI) |
void | SetCached (Index sI, Index JOHI) |
Private Attributes | |
std::map< Index, bool > | _m_cached |
size_t | _m_h |
JointPolicyDiscretePure * | _m_jpol |
size_t | _m_nrJO |
size_t | _m_nrJOH |
size_t | _m_nrS |
Matrix * | _m_p_V |
PlanningUnitDecPOMDPDiscrete * | _m_pu |
bool | _m_V_initialized |
ValueFunctionDecPOMDPDiscrete represents and calculates the value function of a (pure) joint policy for a discrete Dec-POMDP.
Definition at line 45 of file ValueFunctionDecPOMDPDiscrete.h.
|
private |
Definition at line 60 of file ValueFunctionDecPOMDPDiscrete.h.
ValueFunctionDecPOMDPDiscrete::ValueFunctionDecPOMDPDiscrete | ( | PlanningUnitDecPOMDPDiscrete & | p, |
JointPolicyDiscretePure & | jp | ||
) |
Constructor.
Definition at line 35 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_h, _m_jpol, _m_nrJO, _m_nrJOH, _m_nrS, _m_p_V, _m_pu, _m_V_initialized, PlanningUnit::GetHorizon(), PlanningUnitMADPDiscrete::GetNrJointObservationHistories(), PlanningUnitMADPDiscrete::GetNrJointObservations(), and PlanningUnitMADPDiscrete::GetNrStates().
ValueFunctionDecPOMDPDiscrete::ValueFunctionDecPOMDPDiscrete | ( | PlanningUnitDecPOMDPDiscrete * | p, |
JointPolicyDiscretePure * | jp | ||
) |
Constructor.
Definition at line 50 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_h, _m_jpol, _m_nrJO, _m_nrJOH, _m_nrS, _m_p_V, _m_pu, _m_V_initialized, PlanningUnit::GetHorizon(), PlanningUnitMADPDiscrete::GetNrJointObservationHistories(), PlanningUnitMADPDiscrete::GetNrJointObservations(), and PlanningUnitMADPDiscrete::GetNrStates().
ValueFunctionDecPOMDPDiscrete::ValueFunctionDecPOMDPDiscrete | ( | const ValueFunctionDecPOMDPDiscrete & | a | ) |
Copy constructor.
Definition at line 67 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_jpol, _m_nrJOH, _m_p_V, _m_pu, and _m_V_initialized.
ValueFunctionDecPOMDPDiscrete::~ValueFunctionDecPOMDPDiscrete | ( | ) |
double ValueFunctionDecPOMDPDiscrete::CalculateV | ( | bool | cache = true | ) |
Calculates the value function, which is stored and returns V(0).
Definition at line 118 of file ValueFunctionDecPOMDPDiscrete.cpp.
References CalculateV0RecursivelyCached(), and CalculateV0RecursivelyNotCached().
Referenced by JESPExhaustivePlanner::ExhaustiveBestResponse(), BruteForceSearchPlanner::Plan(), and DICEPSPlanner::Plan().
|
private |
Definition at line 126 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_nrS, _m_pu, CalculateVsjohRecursivelyCached(), CreateV(), DEBUG_CALCV, DEBUG_CALCV_CACHE, PlanningUnitMADPDiscrete::GetInitialStateProbability(), GetJPol(), Globals::INITIAL_JOHI, and JointPolicy::Print().
Referenced by CalculateV().
|
private |
Definition at line 157 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_nrS, _m_pu, CalculateVsjohRecursivelyNotCached(), DEBUG_CALCV, PlanningUnitMADPDiscrete::GetInitialStateProbability(), GetJPol(), Globals::INITIAL_JOHI, and JointPolicy::Print().
Referenced by CalculateV().
|
private |
Function used by CalculateV0Recursively.
This recursively Calculates the expected payoff of the joint policy starting from state sI and joint observation history johI.
Definition at line 185 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_h, _m_nrJO, _m_nrS, _m_p_V, _m_pu, DEBUG_CALCV, DEBUG_CALCV_CACHE, JointPolicyDiscretePure::GetJointActionIndex(), GetJPol(), PlanningUnitMADPDiscrete::GetObservationProbability(), PlanningUnitDecPOMDPDiscrete::GetReward(), PlanningUnitMADPDiscrete::GetSuccessorJOHI(), PlanningUnitMADPDiscrete::GetTransitionProbability(), IsCached(), and SetCached().
Referenced by CalculateV0RecursivelyCached().
|
private |
Function used by CalculateV0Recursively.
This recursively Calculates the expected payoff of the joint policy starting from state sI and joint observation history johI.
Definition at line 261 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_h, _m_nrJO, _m_nrS, _m_pu, DEBUG_CALCV, JointPolicyDiscretePure::GetJointActionIndex(), GetJPol(), PlanningUnitMADPDiscrete::GetObservationProbability(), GetPU(), PlanningUnitDecPOMDPDiscrete::GetReward(), PlanningUnitMADPDiscrete::GetSuccessorJOHI(), PlanningUnitMADPDiscrete::GetTimeStepForJOHI(), and PlanningUnitMADPDiscrete::GetTransitionProbability().
Referenced by CalculateV0RecursivelyNotCached().
|
private |
Creates a brand new value function (deleting the current one if it exists).
Definition at line 93 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_nrJOH, _m_nrS, _m_p_V, _m_V_initialized, and DeleteV().
Referenced by CalculateV0RecursivelyCached().
|
private |
Deletes the current value function.
Definition at line 83 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_cached, _m_p_V, and _m_V_initialized.
Referenced by CreateV(), and ~ValueFunctionDecPOMDPDiscrete().
|
inlineprivate |
Definition at line 65 of file ValueFunctionDecPOMDPDiscrete.h.
References _m_nrJOH.
Referenced by IsCached(), and SetCached().
|
inlineprivate |
Definition at line 83 of file ValueFunctionDecPOMDPDiscrete.h.
References _m_jpol.
Referenced by CalculateV0RecursivelyCached(), CalculateV0RecursivelyNotCached(), CalculateVsjohRecursivelyCached(), and CalculateVsjohRecursivelyNotCached().
|
inlineprivate |
Definition at line 79 of file ValueFunctionDecPOMDPDiscrete.h.
References _m_pu.
Referenced by CalculateVsjohRecursivelyNotCached().
|
inlineprivate |
Definition at line 68 of file ValueFunctionDecPOMDPDiscrete.h.
References _m_cached, and GetCombinedIndex().
Referenced by CalculateVsjohRecursivelyCached().
|
private |
Definition at line 105 of file ValueFunctionDecPOMDPDiscrete.cpp.
References _m_cached, and GetCombinedIndex().
Referenced by CalculateVsjohRecursivelyCached().
|
private |
Definition at line 63 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by DeleteV(), IsCached(), and SetCached().
|
private |
Definition at line 58 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CalculateVsjohRecursivelyCached(), CalculateVsjohRecursivelyNotCached(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 52 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by GetJPol(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 56 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CalculateVsjohRecursivelyCached(), CalculateVsjohRecursivelyNotCached(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 55 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CreateV(), GetCombinedIndex(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 57 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CalculateV0RecursivelyCached(), CalculateV0RecursivelyNotCached(), CalculateVsjohRecursivelyCached(), CalculateVsjohRecursivelyNotCached(), CreateV(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 62 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CalculateVsjohRecursivelyCached(), CreateV(), DeleteV(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 51 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CalculateV0RecursivelyCached(), CalculateV0RecursivelyNotCached(), CalculateVsjohRecursivelyCached(), CalculateVsjohRecursivelyNotCached(), GetPU(), and ValueFunctionDecPOMDPDiscrete().
|
private |
Definition at line 59 of file ValueFunctionDecPOMDPDiscrete.h.
Referenced by CreateV(), DeleteV(), and ValueFunctionDecPOMDPDiscrete().