HOG2
|
#include <Unit.h>
Public Member Functions | |
Unit () | |
virtual | ~Unit () |
virtual const char * | GetName ()=0 |
virtual bool | MakeMove (environment *, OccupancyInterface< state, action > *, SimulationInfo< state, action, environment > *, action &a)=0 |
virtual void | UpdateLocation (environment *, state &, bool success, SimulationInfo< state, action, environment > *)=0 |
virtual void | GetLocation (state &)=0 |
virtual void | OpenGLDraw (const environment *, const SimulationInfo< state, action, environment > *) const =0 |
virtual void | GetGoal (state &s) |
virtual bool | Done () |
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 | LogFinalStats (StatCollection *) |
log any final one-time stats before a simulation is ended 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 void | StartNewTrial (StatCollection *) |
virtual int | GetPriority () |
virtual void | SetPriority (int val) |
Private Attributes | |
double | speed |
int | priority |
UnitGroup< state, action, environment > * | group |
GLfloat | r |
GLfloat | g |
GLfloat | b |
unsigned int | unitid |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Implemented in GreedyDMUnit< environment >, MapUnit, GenericSearchUnit< state, action, environment >, LearningUnit< state, action, environment >, GenericPatrolUnit< state, action, environment >, and RandomUnit< state, action, environment >.
Referenced by UnitSimulation< state, action, environment >::AddUnit(), WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::UpdateLocalWeights(), SharedAMapGroup::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::UpdateLocation().
|
pure virtual |
Implemented in AbsMapUnit, BilliardBallUnit, RandomerUnit, GenericSearchUnit< state, action, environment >, TeleportUnit, LearningUnit< state, action, environment >, SearchUnit, praStarUnit, RandomUnit< state, action, environment >, RHRUnit, patrolUnit, RandomUnit< state, action, environment >, GenericPatrolUnit< state, action, environment >, and GreedyDMUnit< environment >.
Referenced by UnitSimulation< state, action, environment >::StepUnitTime().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
Definition at line 47 of file Unit.h.
Referenced by UnitSimulation< state, action, environment >::StepUnitTime().
|
inlinevirtual |
log any final one-time stats before a simulation is ended
Reimplemented in GenericSearchUnit< state, action, environment >, SearchUnit, patrolUnit, GenericPatrolUnit< state, action, environment >, and LearningUnit< state, action, environment >.
|
inlinevirtual |
log an stats that may have been computed during the last run
Reimplemented in GenericSearchUnit< state, action, environment >, SearchUnit, patrolUnit, and GenericPatrolUnit< state, action, environment >.
Definition at line 40 of file Unit.h.
Referenced by UnitSimulation< state, action, environment >::StepUnitTime().
|
pure virtual |
Implemented in BilliardBallUnit, RandomerUnit, TeleportUnit, RHRUnit, GreedyDMUnit< environment >, RandomUnit< state, action, environment >, GenericSearchUnit< state, action, environment >, GenericPatrolUnit< state, action, environment >, and LearningUnit< state, action, environment >.
Referenced by UnitGroup< xyLoc, tDirection, MapEnvironment >::MakeMove(), and WeightedUnitGroup< state, action, environment >::MakeMove().
|
pure virtual |
|
inlinevirtual |
Definition at line 44 of file Unit.h.
Referenced by GenericPatrolUnit< state, action, environment >::GenericPatrolUnit(), and Unit< xyLoc, tDirection, MapEnvironment >::Unit().
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
Definition at line 48 of file Unit.h.
Referenced by UnitGroup< xyLoc, tDirection, MapEnvironment >::AddUnit(), UnitGroup< xyLoc, tDirection, MapEnvironment >::RemoveUnit(), and Unit< xyLoc, tDirection, MapEnvironment >::~Unit().
|
inlinevirtual |
Reimplemented in LearningUnit< state, action, environment >.
|
pure virtual |
Implemented in MapUnit, BilliardBallUnit, RHRUnit, GenericSearchUnit< state, action, environment >, GreedyDMUnit< environment >, LearningUnit< state, action, environment >, RandomUnit< state, action, environment >, and GenericPatrolUnit< state, action, environment >.
Referenced by SharedAMapGroup::UpdateLocation(), UnitGroup< xyLoc, tDirection, MapEnvironment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::UpdateLocation().
|
private |
Definition at line 86 of file Unit.h.
Referenced by GenericPatrolUnit< state, action, environment >::GenericPatrolUnit(), Unit< xyLoc, tDirection, MapEnvironment >::GetColor(), patrolUnit::OpenGLDraw(), and Unit< xyLoc, tDirection, MapEnvironment >::SetColor().
|
private |
Definition at line 86 of file Unit.h.
Referenced by GenericPatrolUnit< state, action, environment >::GenericPatrolUnit(), Unit< xyLoc, tDirection, MapEnvironment >::GetColor(), patrolUnit::OpenGLDraw(), and Unit< xyLoc, tDirection, MapEnvironment >::SetColor().
|
private |
Definition at line 85 of file Unit.h.
Referenced by Unit< xyLoc, tDirection, MapEnvironment >::GetUnitGroup(), and Unit< xyLoc, tDirection, MapEnvironment >::SetUnitGroup().
|
private |
Definition at line 84 of file Unit.h.
Referenced by Unit< xyLoc, tDirection, MapEnvironment >::GetPriority(), Unit< xyLoc, tDirection, MapEnvironment >::SetPriority(), and Unit< xyLoc, tDirection, MapEnvironment >::Unit().
|
private |
Definition at line 86 of file Unit.h.
Referenced by GenericPatrolUnit< state, action, environment >::GenericPatrolUnit(), Unit< xyLoc, tDirection, MapEnvironment >::GetColor(), patrolUnit::OpenGLDraw(), and Unit< xyLoc, tDirection, MapEnvironment >::SetColor().
|
private |
Definition at line 83 of file Unit.h.
Referenced by Unit< xyLoc, tDirection, MapEnvironment >::GetSpeed(), and Unit< xyLoc, tDirection, MapEnvironment >::SetSpeed().
|
private |
Definition at line 87 of file Unit.h.
Referenced by Unit< xyLoc, tDirection, MapEnvironment >::GetNum(), and Unit< xyLoc, tDirection, MapEnvironment >::SetNum().