HOG2
Public Member Functions | Protected Attributes | List of all members
LearningUnit< state, action, environment > Class Template Reference

#include <LearningUnit.h>

Inheritance diagram for LearningUnit< state, action, environment >:
Inheritance graph
[legend]
Collaboration diagram for LearningUnit< state, action, environment >:
Collaboration graph
[legend]

Public Member Functions

 LearningUnit (state &s, state &target, LearningAlgorithm< state, action, environment > *alg)
 
virtual ~LearningUnit ()
 
virtual const char * GetName ()
 
bool Done ()
 
void StartNewTrial (StatCollection *s)
 
virtual bool MakeMove (environment *, OccupancyInterface< state, action > *, SimulationInfo< state, action, environment > *, action &a)
 
virtual void OpenGLDraw (const environment *e, const SimulationInfo< state, action, environment > *) const
 
virtual void UpdateLocation (environment *, state &s, bool success, SimulationInfo< state, action, environment > *)
 
void GetGoal (state &s)
 
void GetLocation (state &s)
 
virtual void LogFinalStats (StatCollection *s)
 log any final one-time stats before a simulation is ended More...
 
- Public Member Functions inherited from Unit< state, action, environment >
 Unit ()
 
virtual ~Unit ()
 
virtual double GetSpeed ()
 
void SetSpeed (double s)
 
virtual void LogStats (StatCollection *)
 log an stats that may have been computed during the last run More...
 
virtual void SetColor (GLfloat _r, GLfloat _g, GLfloat _b)
 
virtual void GetColor (GLfloat &_r, GLfloat &_g, GLfloat &_b) const
 
UnitGroup< state, action, environment > * GetUnitGroup ()
 
void SetUnitGroup (UnitGroup< state, action, environment > *_group)
 
virtual unsigned int GetNum ()
 
virtual void SetNum (unsigned int num)
 
virtual int GetPriority ()
 
virtual void SetPriority (int val)
 

Protected Attributes

long nodesExpanded
 
long nodesTouched
 
LearningAlgorithm< state, action, environment > * algorithm
 
double totalLearned
 
std::vector< state > path
 
state currentLoc
 
state goalLoc
 

Detailed Description

template<class state, class action, class environment>
class LearningUnit< state, action, environment >

Definition at line 18 of file LearningUnit.h.

Constructor & Destructor Documentation

◆ LearningUnit()

template<class state , class action , class environment >
LearningUnit< state, action, environment >::LearningUnit ( state &  s,
state &  target,
LearningAlgorithm< state, action, environment > *  alg 
)
inline

◆ ~LearningUnit()

template<class state , class action , class environment >
virtual LearningUnit< state, action, environment >::~LearningUnit ( )
inlinevirtual

Member Function Documentation

◆ Done()

template<class state , class action , class environment >
bool LearningUnit< state, action, environment >::Done ( )
inlinevirtual

◆ GetGoal()

template<class state , class action , class environment >
void LearningUnit< state, action, environment >::GetGoal ( state &  s)
inlinevirtual

◆ GetLocation()

template<class state , class action , class environment >
void LearningUnit< state, action, environment >::GetLocation ( state &  s)
inlinevirtual

◆ GetName()

template<class state , class action , class environment >
virtual const char* LearningUnit< state, action, environment >::GetName ( )
inlinevirtual

◆ LogFinalStats()

template<class state , class action , class environment >
virtual void LearningUnit< state, action, environment >::LogFinalStats ( StatCollection )
inlinevirtual

◆ MakeMove()

template<class state , class action , class environment >
bool LearningUnit< state, action, environment >::MakeMove ( environment *  e,
OccupancyInterface< state, action > *  ,
SimulationInfo< state, action, environment > *  ,
action &  a 
)
virtual

Implements Unit< state, action, environment >.

Definition at line 79 of file LearningUnit.h.

◆ OpenGLDraw()

template<class state , class action , class environment >
void LearningUnit< state, action, environment >::OpenGLDraw ( const environment *  e,
const SimulationInfo< state, action, environment > *  si 
) const
virtual

◆ StartNewTrial()

template<class state , class action , class environment >
void LearningUnit< state, action, environment >::StartNewTrial ( StatCollection s)
inlinevirtual

◆ UpdateLocation()

template<class state , class action , class environment >
virtual void LearningUnit< state, action, environment >::UpdateLocation ( environment *  ,
state &  s,
bool  success,
SimulationInfo< state, action, environment > *   
)
inlinevirtual

Member Data Documentation

◆ algorithm

template<class state , class action , class environment >
LearningAlgorithm<state, action, environment>* LearningUnit< state, action, environment >::algorithm
protected

◆ currentLoc

template<class state , class action , class environment >
state LearningUnit< state, action, environment >::currentLoc
protected

◆ goalLoc

template<class state , class action , class environment >
state LearningUnit< state, action, environment >::goalLoc
protected

◆ nodesExpanded

template<class state , class action , class environment >
long LearningUnit< state, action, environment >::nodesExpanded
protected

◆ nodesTouched

template<class state , class action , class environment >
long LearningUnit< state, action, environment >::nodesTouched
protected

◆ path

template<class state , class action , class environment >
std::vector<state> LearningUnit< state, action, environment >::path
protected

Definition at line 73 of file LearningUnit.h.

◆ totalLearned

template<class state , class action , class environment >
double LearningUnit< state, action, environment >::totalLearned
protected

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