MultiAgentDecisionProcess
|
JointActionHistory represents a joint action history. More...
#include <JointActionHistory.h>
Public Member Functions | |
virtual JointActionHistory * | Clone () const |
Returns a pointer to a copy of this class. More... | |
const std::vector< Index > & | GetIndividualActionHistoryIndices () const |
Returns the indices of the indiv. action histories. More... | |
JointActionHistory (PlanningUnitMADPDiscrete &pu) | |
Constructor - creates a new initial (=empty) JointActionHistory. More... | |
JointActionHistory (PlanningUnitMADPDiscrete &pu, Index jObsI) | |
Creates a initial action history specifying obsI as the action at time step t=0 (o^t=0) More... | |
JointActionHistory (Index jObsI, JointActionHistory *pred) | |
Creates a action history specifying jObsI for the last joint action and pred as the preceeding JointActionHistory. More... | |
JointActionHistory (const JointActionHistory &a) | |
Copy constructor. More... | |
void | Print () const |
Prints the joint observation history. More... | |
std::string | SoftPrint () const |
SoftPrints the joint observation history. More... | |
~JointActionHistory () | |
Destructor. 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 Attributes | |
std::vector< Index > | _m_individualActionHistories |
A vector of ints which are the indices of individual ActionHistories this gives an alternate description of the current JointAction History. More... | |
bool | _m_isEmpty |
True if the last joint action (index) is empty (i.e., there is no last joint action.) This is true for a action history at time step 0. More... | |
Index | _m_jointActionI |
The last joint action (index). More... | |
PlanningUnitMADPDiscrete * | _m_planningUnitMADPDiscrete |
JointActionHistory * | _m_pred |
The predecessor joint belief. More... | |
Additional Inherited Members | |
Protected Attributes inherited from History | |
size_t | _m_length |
How long (how many time-steps) is this history? More... | |
JointActionHistory represents a joint action history.
This consists of a joint action history index, the last joint action (index) a pointer to the predecessor JOH. and a vector of indexes to the individual action histories.
JointActionHistory::JointActionHistory | ( | PlanningUnitMADPDiscrete & | pu | ) |
Constructor - creates a new initial (=empty) JointActionHistory.
This method relies on the fact that the empty individual action histories are indexed 0.
References _m_individualActionHistories, _m_isEmpty, _m_jointActionI, _m_pred, PlanningUnitMADPDiscrete::GetNrAgents(), and History::SetLength().
Referenced by Clone().
JointActionHistory::JointActionHistory | ( | PlanningUnitMADPDiscrete & | pu, |
Index | jObsI | ||
) |
Creates a initial action history specifying obsI as the action at time step t=0 (o^t=0)
JointActionHistory::JointActionHistory | ( | Index | jObsI, |
JointActionHistory * | pred | ||
) |
Creates a action history specifying jObsI for the last joint action and pred as the preceeding JointActionHistory.
References _m_individualActionHistories, _m_isEmpty, _m_jointActionI, _m_planningUnitMADPDiscrete, _m_pred, History::GetLength(), and History::SetLength().
JointActionHistory::JointActionHistory | ( | const JointActionHistory & | a | ) |
|
inlinevirtual |
const vector< Index > & JointActionHistory::GetIndividualActionHistoryIndices | ( | ) | const |
Returns the indices of the indiv. action histories.
References _m_individualActionHistories.
|
inlinevirtual |
Prints the joint observation history.
Implements History.
References SoftPrint().
Referenced by PlanningUnitMADPDiscrete::InitializeJointActionHistories(), JointActionHistory(), and ~JointActionHistory().
string JointActionHistory::SoftPrint | ( | ) | const |
SoftPrints the joint observation history.
References _m_isEmpty, _m_jointActionI, History::_m_length, _m_planningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetJointAction(), SoftPrint(), and JointAction::SoftPrintBrief().
Referenced by Print(), and SoftPrint().
|
private |
A vector of ints which are the indices of individual ActionHistories this gives an alternate description of the current JointAction History.
Referenced by GetIndividualActionHistoryIndices(), and JointActionHistory().
|
private |
True if the last joint action (index) is empty (i.e., there is no last joint action.) This is true for a action history at time step 0.
Referenced by JointActionHistory(), and SoftPrint().
|
private |
The last joint action (index).
Referenced by JointActionHistory(), and SoftPrint().
|
private |
Referenced by JointActionHistory(), and SoftPrint().
|
private |
The predecessor joint belief.
Together with the last joint action(_m_jointActionI) this gives a full description of this joint action history.
Referenced by JointActionHistory(), and SoftPrint().