MultiAgentDecisionProcess
|
ActionObservationHistory represents an action-observation history of an agent. More...
#include <ActionObservationHistory.h>
Public Member Functions | |
ActionObservationHistory (PlanningUnitMADPDiscrete &pu, Index agentI) | |
(default) Constructor - creates a new initial (=empty) ObservationHistory for agent agentI More... | |
ActionObservationHistory (Index aI, Index oI, ActionObservationHistory *pred) | |
Creates the action-observation history resulting from action aI and obs. More... | |
virtual ActionObservationHistory * | Clone () const |
Returns a pointer to a copy of this class. More... | |
Index | GetActionHistoryIndex () const |
Gets the action history index corresponding to this ActObsHist. More... | |
Index | GetObservationHistoryIndex () const |
Gets the observation history index corresponding to this ActObsHist. More... | |
void | Print () const |
void | SetActionHistoryIndex (Index ahI) |
Sets the action history index corresponding to this ActObsHist. More... | |
void | SetObservationHistoryIndex (Index ohI) |
Sets the observation history index corresponding to this ActObsHist. More... | |
std::string | SoftPrint () const |
Public Member Functions inherited from IndividualHistory | |
IndividualHistory (Index agentI) | |
(default) Constructor More... | |
virtual | ~IndividualHistory () |
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 Attributes | |
Index | _m_ahI |
The index of the action history contained. More... | |
Index | _m_ohI |
The index of the observation history contained. More... | |
PlanningUnitMADPDiscrete * | _m_planningUnitMADPDiscrete |
ActionObservationHistory * | _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 IndividualHistory | |
Index | _m_agentI |
The agent this history belongs to. More... | |
Protected Attributes inherited from History | |
size_t | _m_length |
How long (how many time-steps) is this history? More... | |
ActionObservationHistory represents an action-observation history of an agent.
ActionObservationHistory::ActionObservationHistory | ( | PlanningUnitMADPDiscrete & | pu, |
Index | agentI | ||
) |
(default) Constructor - creates a new initial (=empty) ObservationHistory for agent agentI
References _m_ahI, _m_ohI, _m_pred, and History::SetLength().
Referenced by Clone().
ActionObservationHistory::ActionObservationHistory | ( | Index | aI, |
Index | oI, | ||
ActionObservationHistory * | pred | ||
) |
Creates the action-observation history resulting from action aI and obs.
oI after ActionObservationHistory pred.
References IndividualHistory::_m_agentI, _m_ahI, _m_ohI, _m_planningUnitMADPDiscrete, _m_pred, Globals::CastLIndexToIndex(), PlanningUnitMADPDiscrete::GetActionHistoryTree(), TreeNode< Tcontained >::GetIndex(), History::GetLength(), PlanningUnitMADPDiscrete::GetObservationHistoryTree(), ObservationHistoryTree::GetSuccessor(), and History::SetLength().
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements History.
References ActionObservationHistory().
|
inline |
Gets the action history index corresponding to this ActObsHist.
References _m_ahI.
|
inline |
Gets the observation history index corresponding to this ActObsHist.
References _m_ohI.
|
inlinevirtual |
Implements History.
References SoftPrint().
Referenced by PlanningUnitMADPDiscrete::CreateActionObservationHistoryTree(), and ActionObservationHistoryTree::Print().
|
inline |
Sets the action history index corresponding to this ActObsHist.
|
inline |
Sets the observation history index corresponding to this ActObsHist.
string ActionObservationHistory::SoftPrint | ( | ) | const |
References IndividualHistory::_m_agentI, _m_ahI, History::_m_length, _m_ohI, _m_planningUnitMADPDiscrete, _m_pred, ObservationHistory::ContainsEmptyOI(), PlanningUnitMADPDiscrete::GetAction(), PlanningUnitMADPDiscrete::GetActionHistoryTree(), TreeNode< Tcontained >::GetContainedElement(), ActionHistory::GetLastActionIndex(), ObservationHistory::GetLastObservationIndex(), PlanningUnitMADPDiscrete::GetObservation(), PlanningUnitMADPDiscrete::GetObservationHistoryTree(), ActionHistory::IsEmpty(), SoftPrint(), and NamedDescribedEntity::SoftPrintBrief().
Referenced by Print(), and SoftPrint().
|
private |
The index of the action history contained.
Referenced by ActionObservationHistory(), GetActionHistoryIndex(), and SoftPrint().
|
private |
The index of the observation history contained.
Referenced by ActionObservationHistory(), GetObservationHistoryIndex(), and SoftPrint().
|
private |
Referenced by ActionObservationHistory(), and SoftPrint().
|
private |
The predecessor together with the last joint actionObservation (_m_actionObservationI) this gives a full description of this joint actionObservation history.
Referenced by ActionObservationHistory(), and SoftPrint().