MultiAgentDecisionProcess
|
ObservationHistory represents an action history of a single agent. More...
#include <ObservationHistory.h>
Public Member Functions | |
virtual ObservationHistory * | Clone () const |
Returns a pointer to a copy of this class. More... | |
bool | ContainsEmptyOI () const |
Check whether this history contains an empty observation. More... | |
Index | GetLastObservationIndex () const |
Returns the index of the last observation. More... | |
const ObservationHistory * | GetPredecessor () const |
Return a reference to the Observation history that precedes this. More... | |
ObservationHistory (PlanningUnitMADPDiscrete &pu, Index agentI) | |
(default) Constructor - creates a new initial (=empty) ObservationHistory for agent agentI More... | |
ObservationHistory (PlanningUnitMADPDiscrete &pu, Index agentI, Index obsI) | |
Creates a initial observation history specifying obsI as the observation at time step t=0 (o^t=0) More... | |
ObservationHistory (Index obsI, ObservationHistory *pred) | |
Creates a observation history specifying obsI for the last observation and pred as the preceeding ObservationHistory. More... | |
void | Print () const |
Print this to cout. More... | |
std::string | SoftPrint () const |
Prints a description of this to a string. More... | |
~ObservationHistory () | |
Copy constructor. More... | |
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 | |
bool | _m_containsEmptyOI |
True if the last observation (index) is empty (i.e., there is no last observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation. More... | |
Index | _m_observationI |
The last observation (index). More... | |
PlanningUnitMADPDiscrete * | _m_PlanningUnitMADPDiscrete |
ref to the pu More... | |
ObservationHistory * | _m_pred |
The predecessor observation hist. 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... | |
ObservationHistory represents an action history of a single agent.
It does so by storing an index and a pointer to a preceeding observation history.
ObservationHistory::ObservationHistory | ( | PlanningUnitMADPDiscrete & | pu, |
Index | agentI | ||
) |
(default) Constructor - creates a new initial (=empty) ObservationHistory for agent agentI
References _m_containsEmptyOI, _m_observationI, _m_pred, and History::SetLength().
Referenced by Clone().
ObservationHistory::ObservationHistory | ( | PlanningUnitMADPDiscrete & | pu, |
Index | agentI, | ||
Index | obsI | ||
) |
Creates a initial observation history specifying obsI as the observation at time step t=0 (o^t=0)
ObservationHistory::ObservationHistory | ( | Index | obsI, |
ObservationHistory * | pred | ||
) |
Creates a observation history specifying obsI for the last observation and pred as the preceeding ObservationHistory.
References _m_containsEmptyOI, _m_observationI, _m_pred, History::GetLength(), and History::SetLength().
ObservationHistory::~ObservationHistory | ( | ) |
|
inlinevirtual |
|
inline |
Check whether this history contains an empty observation.
References _m_containsEmptyOI.
Referenced by ActionObservationHistory::SoftPrint().
|
inline |
Returns the index of the last observation.
References _m_observationI.
Referenced by ActionObservationHistory::SoftPrint().
|
inline |
Return a reference to the Observation history that precedes this.
References _m_pred.
|
inlinevirtual |
Print this to cout.
Implements History.
References SoftPrint().
Referenced by ~ObservationHistory().
string ObservationHistory::SoftPrint | ( | void | ) | const |
Prints a description of this to a string.
References IndividualHistory::_m_agentI, _m_containsEmptyOI, History::_m_length, _m_observationI, _m_PlanningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetObservation(), SoftPrint(), and NamedDescribedEntity::SoftPrintBrief().
Referenced by Print(), and SoftPrint().
|
private |
True if the last observation (index) is empty (i.e., there is no last observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation.
(this behavior is defined in MADPComponentDiscreteObservations)
Referenced by ContainsEmptyOI(), ObservationHistory(), and SoftPrint().
|
private |
The last observation (index).
Referenced by GetLastObservationIndex(), ObservationHistory(), and SoftPrint().
|
private |
ref to the pu
Referenced by SoftPrint().
|
private |
The predecessor observation hist.
Together with the last joint observation(_m_observationI) this gives a full description of this observation history.
Referenced by GetPredecessor(), ObservationHistory(), and SoftPrint().