MultiAgentDecisionProcess  Release 0.2.1
AgentRandom Class Reference

AgentRandom represents an agent which chooses action uniformly at random. More...

#include <AgentRandom.h>

+ Inheritance diagram for AgentRandom:
+ Collaboration diagram for AgentRandom:

Public Member Functions

Index Act ()
 Returns an individual action uniformly at random.
Index Act (Index joI)
 Return an individual action index based on an individual observation index.
Index Act (Index sI, Index joI, double reward)
 Return an individual action based on state, last joint observation and reward.
 AgentRandom (const PlanningUnitDecPOMDPDiscrete &pu, Index id)
 (default) Constructor
 AgentRandom (const AgentRandom &a)
 Copy constructor.
void ResetEpisode ()
 Will be called before an episode, to reinitialize the agent.
 ~AgentRandom ()
 Destructor.
- Public Member Functions inherited from AgentFullyObservable
 AgentFullyObservable ()
 (default) Constructor
 AgentFullyObservable (const PlanningUnitDecPOMDPDiscrete &pu, Index id)
 AgentFullyObservable (const AgentFullyObservable &a)
 Copy constructor.
 ~AgentFullyObservable ()
 Destructor.
- Public Member Functions inherited from AgentDecPOMDPDiscrete
 AgentDecPOMDPDiscrete ()
 (default) Constructor
 AgentDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete &pu, Index id)
 AgentDecPOMDPDiscrete (const AgentDecPOMDPDiscrete &a)
 Copy constructor.
const
PlanningUnitDecPOMDPDiscrete
GetPU () const
- Public Member Functions inherited from SimulationAgent
virtual Index GetIndex () const
 Retrieves the index of this agent.
virtual bool GetVerbose () const
 If true, the agent will report more.
void Print () const
 Print out some information about this agent.
virtual void SetIndex (Index id)
 Sets the index of this agent.
virtual void SetVerbose (bool verbose)
 Set whether this agent should be verbose.
 SimulationAgent (Index id, bool verbose=false)
 (default) Constructor
virtual std::string SoftPrint () const
 Return some information about this agent.
virtual ~SimulationAgent ()
 Destructor.
- Public Member Functions inherited from AgentLocalObservations
 AgentLocalObservations ()
 (default) Constructor
 AgentLocalObservations (const PlanningUnitDecPOMDPDiscrete &pu, Index id)
 AgentLocalObservations (const AgentLocalObservations &a)
 Copy constructor.
 ~AgentLocalObservations ()
 Destructor.

Detailed Description

AgentRandom represents an agent which chooses action uniformly at random.

Definition at line 41 of file AgentRandom.h.

Constructor & Destructor Documentation

AgentRandom::AgentRandom ( const PlanningUnitDecPOMDPDiscrete pu,
Index  id 
)

(default) Constructor

Definition at line 36 of file AgentRandom.cpp.

AgentRandom::AgentRandom ( const AgentRandom a)

Copy constructor.

Definition at line 41 of file AgentRandom.cpp.

AgentRandom::~AgentRandom ( )

Destructor.

Definition at line 47 of file AgentRandom.cpp.

Member Function Documentation

Index AgentRandom::Act ( )

Returns an individual action uniformly at random.

Definition at line 51 of file AgentRandom.cpp.

References SimulationAgent::GetIndex(), PlanningUnitMADPDiscrete::GetNrActions(), and AgentDecPOMDPDiscrete::GetPU().

Index AgentRandom::Act ( Index  oI)
inlinevirtual

Return an individual action index based on an individual observation index.

Implements AgentLocalObservations.

Definition at line 62 of file AgentRandom.h.

References Act().

Referenced by Act().

Index AgentRandom::Act ( Index  sI,
Index  joI,
double  reward 
)
inlinevirtual

Return an individual action based on state, last joint observation and reward.

Implements AgentFullyObservable.

Definition at line 64 of file AgentRandom.h.

References Act().

Referenced by Act().

void AgentRandom::ResetEpisode ( )
virtual

Will be called before an episode, to reinitialize the agent.

Implements SimulationAgent.

Definition at line 59 of file AgentRandom.cpp.


The documentation for this class was generated from the following files: