GClasses
|
This is a simple and common action iterator that can be used when there is a discrete set of possible actions. More...
#include <GPolicyLearner.h>
Public Member Functions | |
GDiscreteActionIterator (int actionCount) | |
virtual | ~GDiscreteActionIterator () |
virtual int | actionCount () |
Returns the total number of action values. | |
virtual int | actionDims () |
Returns 1. | |
virtual void | randomAction (double *pOutAction, GRand *pRand) |
Returns a random action. | |
virtual void | reset (const double *pState) |
Resets the iterator. | |
virtual bool | nextAction (double *pOutAction) |
Iterates to the next action. Returns false if there are no more. | |
Protected Attributes | |
int | m_action |
int | m_count |
This is a simple and common action iterator that can be used when there is a discrete set of possible actions.
GClasses::GDiscreteActionIterator::GDiscreteActionIterator | ( | int | actionCount | ) | [inline] |
virtual GClasses::GDiscreteActionIterator::~GDiscreteActionIterator | ( | ) | [inline, virtual] |
virtual int GClasses::GDiscreteActionIterator::actionCount | ( | ) | [inline, virtual] |
Returns the total number of action values.
Implements GClasses::GAgentActionIterator.
virtual int GClasses::GDiscreteActionIterator::actionDims | ( | ) | [inline, virtual] |
Returns 1.
Implements GClasses::GAgentActionIterator.
virtual bool GClasses::GDiscreteActionIterator::nextAction | ( | double * | pOutAction | ) | [virtual] |
Iterates to the next action. Returns false if there are no more.
Implements GClasses::GAgentActionIterator.
virtual void GClasses::GDiscreteActionIterator::randomAction | ( | double * | pOutAction, |
GRand * | pRand | ||
) | [virtual] |
Returns a random action.
Implements GClasses::GAgentActionIterator.
virtual void GClasses::GDiscreteActionIterator::reset | ( | const double * | pState | ) | [virtual] |
Resets the iterator.
Implements GClasses::GAgentActionIterator.
int GClasses::GDiscreteActionIterator::m_action [protected] |
int GClasses::GDiscreteActionIterator::m_count [protected] |