MultiAgentDecisionProcess
|
JointActionObservationHistory represents a joint action observation history. More...
#include <JointActionObservationHistory.h>
Public Member Functions | |
virtual JointActionObservationHistory * | Clone () const |
Returns a pointer to a copy of this class. More... | |
const std::vector< Index > & | GetIndividualActionObservationHistoryIndices () const |
Returns the indices of the indiv. action observation histories. More... | |
Index | GetJointActionIndex () const |
Gets the last joint action index. More... | |
void | GetJointActionObservationHistoryVectors (std::vector< Index > &jaIs, std::vector< Index > &joIs) |
Get vectors of joint action and observation indices stored by this history. More... | |
Index | GetJointObservationIndex () const |
Gets the last joint observation index. More... | |
PlanningUnitMADPDiscrete * | GetPlanningUnitMADPDiscrete () |
Returns PlanningUnitMADPDiscrete. More... | |
JointActionObservationHistory (PlanningUnitMADPDiscrete &pu) | |
(default) Constructor - creates a new initial (=empty) JointActionObservationHistory. More... | |
JointActionObservationHistory (Index jaI, Index joI, JointActionObservationHistory *pred) | |
Creates the joint action-obs. More... | |
void | Print () const |
Prints the history. More... | |
std::string | SoftPrint () const |
SoftPrints the history. More... | |
std::string | SoftPrintJointIndices () const |
SoftPrints the history in terms of joint action/observation indices. More... | |
Public Member Functions inherited from JointHistory | |
JointHistory () | |
(default) Constructor More... | |
virtual | ~JointHistory () |
Destructor. More... | |
Public Member Functions inherited from History | |
size_t | GetLength () const |
Returns the length of the history, i.e., the number of time steps. More... | |
History () | |
(default) Constructor More... | |
void | SetLength (size_t length) |
Set the length of the history, i.e., the number of time steps. More... | |
virtual | ~History () |
Destructor. More... | |
Private Member Functions | |
void | GetJointActionObservationHistoryVectorsRecursive (std::vector< Index > &jaIs, std::vector< Index > &joIs) |
Private Attributes | |
std::vector< Index > | _m_individualActionObservationHistories |
A vector of Indices which are the indices of individual ActionObservationHistories this gives an alternate description of the current JointActionObservation History. More... | |
Index | _m_jaI |
The last joint action (index). More... | |
Index | _m_joI |
The last joint observation (index). More... | |
PlanningUnitMADPDiscrete * | _m_planningUnitMADPDiscrete |
pointer to the pu More... | |
JointActionObservationHistory * | _m_pred |
The predecessor together with the last joint actionObservation (_m_actionObservationI) this gives a full description of this joint actionObservation history. More... | |
Additional Inherited Members | |
Protected Attributes inherited from History | |
size_t | _m_length |
How long (how many time-steps) is this history? More... | |
JointActionObservationHistory represents a joint action observation history.
JointActionObservationHistory::JointActionObservationHistory | ( | PlanningUnitMADPDiscrete & | pu | ) |
(default) Constructor - creates a new initial (=empty) JointActionObservationHistory.
References _m_individualActionObservationHistories, _m_jaI, _m_joI, _m_planningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetNrAgents(), and History::SetLength().
Referenced by Clone().
JointActionObservationHistory::JointActionObservationHistory | ( | Index | jaI, |
Index | joI, | ||
JointActionObservationHistory * | pred | ||
) |
Creates the joint action-obs.
history resulting from joint action jaI and obs. joI after JointActionObservationHistory pred.
References _m_individualActionObservationHistories, _m_jaI, _m_joI, _m_planningUnitMADPDiscrete, _m_pred, GetIndividualActionObservationHistoryIndices(), History::GetLength(), PlanningUnitMADPDiscrete::GetNrAgents(), PlanningUnitMADPDiscrete::GetSuccessorAOHI(), PlanningUnitMADPDiscrete::JointToIndividualActionIndices(), PlanningUnitMADPDiscrete::JointToIndividualObservationIndices(), and History::SetLength().
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements History.
References JointActionObservationHistory().
|
inline |
Returns the indices of the indiv. action observation histories.
References _m_individualActionObservationHistories.
Referenced by JointActionObservationHistory().
|
inline |
Gets the last joint action index.
References _m_jaI.
void JointActionObservationHistory::GetJointActionObservationHistoryVectors | ( | std::vector< Index > & | jaIs, |
std::vector< Index > & | joIs | ||
) |
Get vectors of joint action and observation indices stored by this history.
References GetJointActionObservationHistoryVectorsRecursive(), SoftPrint(), and PrintTools::SoftPrintVector().
|
private |
References _m_jaI, _m_joI, History::_m_length, _m_pred, and GetJointActionObservationHistoryVectorsRecursive().
Referenced by GetJointActionObservationHistoryVectors(), and GetJointActionObservationHistoryVectorsRecursive().
|
inline |
Gets the last joint observation index.
References _m_joI.
|
inline |
Returns PlanningUnitMADPDiscrete.
References _m_planningUnitMADPDiscrete.
Referenced by JointActionObservationHistoryTree::GetSuccessor().
|
inlinevirtual |
Prints the history.
Implements History.
References SoftPrint().
Referenced by PlanningUnitMADPDiscrete::InitializeJointActionObservationHistories(), JointActionObservationHistoryTree::Print(), BayesianGameForDecPOMDPStage::ProbRewardForjoahI(), and GMAA_MAA_ELSI::ProbRewardForjoahI().
string JointActionObservationHistory::SoftPrint | ( | ) | const |
SoftPrints the history.
References _m_jaI, _m_joI, History::_m_length, _m_planningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetJointAction(), PlanningUnitMADPDiscrete::GetJointObservation(), SoftPrint(), JointObservation::SoftPrintBrief(), and JointAction::SoftPrintBrief().
Referenced by PlanningUnitMADPDiscrete::GetJAOHProbs(), GetJointActionObservationHistoryVectors(), Print(), and SoftPrint().
string JointActionObservationHistory::SoftPrintJointIndices | ( | ) | const |
SoftPrints the history in terms of joint action/observation indices.
References _m_jaI, _m_joI, History::_m_length, _m_planningUnitMADPDiscrete, _m_pred, IndexTools::ActionAndObservation_to_ActionObservationIndex(), PlanningUnitMADPDiscrete::GetNrJointActions(), PlanningUnitMADPDiscrete::GetNrJointObservations(), and SoftPrintJointIndices().
Referenced by SoftPrintJointIndices().
|
private |
A vector of Indices which are the indices of individual ActionObservationHistories this gives an alternate description of the current JointActionObservation History.
Referenced by GetIndividualActionObservationHistoryIndices(), and JointActionObservationHistory().
|
private |
The last joint action (index).
Referenced by GetJointActionIndex(), GetJointActionObservationHistoryVectorsRecursive(), JointActionObservationHistory(), SoftPrint(), and SoftPrintJointIndices().
|
private |
The last joint observation (index).
Referenced by GetJointActionObservationHistoryVectorsRecursive(), GetJointObservationIndex(), JointActionObservationHistory(), SoftPrint(), and SoftPrintJointIndices().
|
private |
pointer to the pu
Referenced by GetPlanningUnitMADPDiscrete(), JointActionObservationHistory(), SoftPrint(), and SoftPrintJointIndices().
|
private |
The predecessor together with the last joint actionObservation (_m_actionObservationI) this gives a full description of this joint actionObservation history.
Referenced by GetJointActionObservationHistoryVectorsRecursive(), JointActionObservationHistory(), SoftPrint(), and SoftPrintJointIndices().