|
MultiAgentDecisionProcess
|
ActionHistory represents an action history of a single agent. More...
#include <ActionHistory.h>
Public Member Functions | |
| ActionHistory (PlanningUnitMADPDiscrete &pu, Index agentI) | |
| (default) Constructor - creates a new initial (=empty) ActionHistory for agent agentI More... | |
| ActionHistory (Index aI, ActionHistory *pred) | |
| Creates a action history specifying aI for the last action and pred as the preceeding ActionHistory. More... | |
| virtual ActionHistory * | Clone () const |
| Returns a pointer to a copy of this class. More... | |
| Index | GetLastActionIndex () const |
| Returns the index of the last action. More... | |
| bool | IsEmpty () const |
| Check whether this history is empty. More... | |
| void | Print () const |
| Print this to cout. More... | |
| std::string | SoftPrint () const |
| Prints a description of this to a string. More... | |
| ~ActionHistory () | |
| Destructor. 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 | |
| Index | _m_actionI |
| The last action (index). More... | |
| bool | _m_isEmpty |
| True if the last action (index) is empty (i.e., there is no last action.) This is true for a action history at time step 0. More... | |
| PlanningUnitMADPDiscrete * | _m_planningUnitMADPDiscrete |
| ActionHistory * | _m_pred |
| The predecessor joint belief. 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... | |
ActionHistory represents an action history of a single agent.
It does so by storing an index and a pointer to a preceeding action history.
| ActionHistory::ActionHistory | ( | PlanningUnitMADPDiscrete & | pu, |
| Index | agentI | ||
| ) |
(default) Constructor - creates a new initial (=empty) ActionHistory for agent agentI
References _m_actionI, _m_isEmpty, _m_pred, and History::SetLength().
Referenced by Clone().
| ActionHistory::ActionHistory | ( | Index | aI, |
| ActionHistory * | pred | ||
| ) |
Creates a action history specifying aI for the last action and pred as the preceeding ActionHistory.
References _m_actionI, _m_isEmpty, _m_pred, History::GetLength(), and History::SetLength().
|
inlinevirtual |
|
inline |
Returns the index of the last action.
References _m_actionI.
Referenced by ActionObservationHistory::SoftPrint().
|
inline |
Check whether this history is empty.
References _m_isEmpty.
Referenced by ActionObservationHistory::SoftPrint().
|
inlinevirtual |
| string ActionHistory::SoftPrint | ( | ) | const |
Prints a description of this to a string.
References _m_actionI, IndividualHistory::_m_agentI, _m_isEmpty, History::_m_length, _m_planningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetAction(), and SoftPrint().
Referenced by Print(), and SoftPrint().
|
private |
The last action (index).
Referenced by ActionHistory(), GetLastActionIndex(), and SoftPrint().
|
private |
True if the last action (index) is empty (i.e., there is no last action.) This is true for a action history at time step 0.
Referenced by ActionHistory(), IsEmpty(), and SoftPrint().
|
private |
Referenced by SoftPrint().
|
private |
The predecessor joint belief.
Together with the last joint action(_m_actionI) this gives a full description of this joint action history.
Referenced by ActionHistory(), and SoftPrint().