MultiAgentDecisionProcess
|
AgentMDP represents an agent which uses a MDP-based policy. More...
#include <AgentMDP.h>
Public Member Functions | |
Index | Act (Index sI, Index joI, double reward) |
Return an individual action based on state, last joint observation and reward. More... | |
AgentMDP (const PlanningUnitDecPOMDPDiscrete *pu, Index id, const QTable &Q) | |
(default) Constructor More... | |
AgentMDP (const AgentMDP &a) | |
Copy constructor. More... | |
void | ResetEpisode () |
Will be called before an episode, to reinitialize the agent. More... | |
~AgentMDP () | |
Destructor. More... | |
Public Member Functions inherited from AgentFullyObservable | |
AgentFullyObservable (const PlanningUnitDecPOMDPDiscrete *pu, Index id) | |
(default) Constructor More... | |
AgentFullyObservable (const AgentFullyObservable &a) | |
Copy constructor. More... | |
~AgentFullyObservable () | |
Destructor. More... | |
Public Member Functions inherited from AgentDecPOMDPDiscrete | |
AgentDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete *pu, Index id) | |
(default) Constructor More... | |
AgentDecPOMDPDiscrete (const AgentDecPOMDPDiscrete &a) | |
Copy constructor. More... | |
const PlanningUnitDecPOMDPDiscrete * | GetPU () const |
Public Member Functions inherited from SimulationAgent | |
virtual Index | GetIndex () const |
Retrieves the index of this agent. More... | |
virtual bool | GetVerbose () const |
If true, the agent will report more. More... | |
void | Print () const |
Print out some information about this agent. More... | |
virtual void | SetIndex (Index id) |
Sets the index of this agent. More... | |
virtual void | SetVerbose (bool verbose) |
Set whether this agent should be verbose. More... | |
SimulationAgent (Index id, bool verbose=false) | |
(default) Constructor More... | |
virtual std::string | SoftPrint () const |
Return some information about this agent. More... | |
virtual | ~SimulationAgent () |
Destructor. More... | |
Private Attributes | |
QTable | _m_Q |
size_t | _m_t |
AgentMDP represents an agent which uses a MDP-based policy.
In particular, AgentMDP takes actions based upon states by looking up the maximizing action in the QTable (_m_Q) that this agent receives upon construction. This is in contrast to other AgentFullyObservable types that do some actual learning or planning during the simulation.
AgentMDP::AgentMDP | ( | const PlanningUnitDecPOMDPDiscrete * | pu, |
Index | id, | ||
const QTable & | Q | ||
) |
(default) Constructor
AgentMDP::AgentMDP | ( | const AgentMDP & | a | ) |
Copy constructor.
AgentMDP::~AgentMDP | ( | ) |
Destructor.
Return an individual action based on state, last joint observation and reward.
Implements AgentFullyObservable.
References _m_Q, _m_t, SimulationAgent::GetIndex(), PlanningUnitMADPDiscrete::GetNrJointActions(), AgentDecPOMDPDiscrete::GetPU(), and PlanningUnitMADPDiscrete::JointToIndividualActionIndices().
|
virtual |
Will be called before an episode, to reinitialize the agent.
Implements SimulationAgent.
References _m_t.
|
private |
Referenced by Act(), and ResetEpisode().