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

#include <EpisodicSimulation.h>

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

Public Member Functions

 EpisodicSimulation (environment *e)
 
virtual ~EpisodicSimulation ()
 
int AddUnit (Unit< state, action, environment > *u, double timeOffset=0.)
 
int AddNonRacingUnit (Unit< state, action, environment > *u, double timeOffset=0.)
 
virtual bool Done ()
 
void SetStopOnConvergence (bool stop)
 
void SetTargetTolerance (double x)
 
double GetTargetTolerance ()
 
void SetDisjunctiveTrialEnd (bool value)
 
int GetCurrRound ()
 
void SetTravelLimit (double lim)
 
void SetTrialLimit (long maxTrials)
 
void DisableTravelLimit ()
 
virtual void ClearAllUnits ()
 
- Public Member Functions inherited from UnitSimulation< state, action, environment >
 UnitSimulation (environment *se)
 
virtual ~UnitSimulation ()
 
unsigned int GetNumUnits () const
 
Unit< state, action, environment > * GetUnit (unsigned int which)
 
unsigned int GetNumUnitGroups () const
 
int AddUnitGroup (UnitGroup< state, action, environment > *ug)
 
UnitGroup< state, action, environment > * GetUnitGroup (unsigned int which)
 
virtual void GetPublicUnitInfo (unsigned int which, PublicUnitInfo< state, action, environment > &info) const
 
environment * GetEnvironment ()
 
void StepTime (double)
 
double GetSimulationTime () const
 
double GetTimeToNextStep () const
 
void SetStepType (tTimestep step)
 
tTimestep GetStepType () const
 
void SetPaused (bool val)
 
bool GetPaused ()
 
bool Done ()
 
void SetThinkingPenalty (double pen)
 setPenalty for thinking. More...
 
double GetThinkingPenalty ()
 getPenalty for thinking. More...
 
virtual void OpenGLDraw () const
 
virtual void OpenGLDraw (unsigned int whichUnit) const
 
void SetLogStats (bool val)
 
bool GetLogStats ()
 
StatCollectionGetStats ()
 
virtual SimulationInfo< state, action, environment > * GetSimulationInfo ()
 
virtual unsigned int GetCurrentUnit () const
 
- Public Member Functions inherited from SimulationInfo< state, action, environment >
virtual ~SimulationInfo ()
 

Protected Member Functions

virtual void DoPreTimestepCalc ()
 
virtual void DoTimestepCalc (double amount)
 
virtual bool EpisodeDone ()
 
tUnitOnTargetStatus UnitOnTargetStatus (UnitInfo< state, action, environment > *u)
 
bool UnitOnTarget (UnitInfo< state, action, environment > *u)
 
bool IsUnitRacing (UnitInfo< state, action, environment > *u)
 
- Protected Member Functions inherited from UnitSimulation< state, action, environment >
void StepUnitTime (UnitInfo< state, action, environment > *ui, double timeStep)
 step time for a single unit. More...
 
bool MakeUnitMove (UnitInfo< state, action, environment > *theUnit, action where, double &moveCost)
 
virtual void DoPostTimestepCalc ()
 

Protected Attributes

bool allRacesDone
 
int currRound
 
double travelLimit
 
bool useTravelLimit
 
bool stopOnConvergence
 
long maxRounds
 
bool useMaxRounds
 
double targetTolerance
 
bool disjunctiveTrialEnd
 
bool verbose
 
std::vector< bool > racingInfo
 
- Protected Attributes inherited from UnitSimulation< state, action, environment >
double penalty
 
bool paused
 
bool logStats
 
std::vector< UnitInfo< state, action, environment > * > units
 
std::vector< UnitGroup< state, action, environment > * > unitGroups
 
environment * env
 
double currTime
 
tTimestep stepType
 
StatCollection stats
 
unsigned int currentActor
 

Detailed Description

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

Definition at line 29 of file EpisodicSimulation.h.

Constructor & Destructor Documentation

◆ EpisodicSimulation()

template<class state , class action , class environment >
EpisodicSimulation< state, action, environment >::EpisodicSimulation ( environment *  e)
inline

◆ ~EpisodicSimulation()

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

Definition at line 44 of file EpisodicSimulation.h.

Member Function Documentation

◆ AddNonRacingUnit()

template<class state , class action , class environment >
int EpisodicSimulation< state, action, environment >::AddNonRacingUnit ( Unit< state, action, environment > *  u,
double  timeOffset = 0. 
)
inline

◆ AddUnit()

template<class state , class action , class environment >
int EpisodicSimulation< state, action, environment >::AddUnit ( Unit< state, action, environment > *  u,
double  timeOffset = 0. 
)
inlinevirtual
Parameters
timeOffsetis a setting to let the unit start a little bit later

Reimplemented from UnitSimulation< state, action, environment >.

Definition at line 45 of file EpisodicSimulation.h.

References UnitSimulation< state, action, environment >::AddUnit(), and EpisodicSimulation< state, action, environment >::racingInfo.

◆ ClearAllUnits()

template<class state , class action , class environment >
virtual void EpisodicSimulation< state, action, environment >::ClearAllUnits ( )
inlinevirtual

◆ DisableTravelLimit()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::DisableTravelLimit ( )
inline

◆ Done()

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

◆ DoPreTimestepCalc()

template<class state , class action , class environment >
virtual void EpisodicSimulation< state, action, environment >::DoPreTimestepCalc ( )
inlineprotectedvirtual

◆ DoTimestepCalc()

template<class state , class action , class environment >
virtual void EpisodicSimulation< state, action, environment >::DoTimestepCalc ( double  amount)
inlineprotectedvirtual

◆ EpisodeDone()

template<class state , class action , class environment >
virtual bool EpisodicSimulation< state, action, environment >::EpisodeDone ( )
inlineprotectedvirtual

◆ GetCurrRound()

template<class state , class action , class environment >
int EpisodicSimulation< state, action, environment >::GetCurrRound ( )
inline

◆ GetTargetTolerance()

template<class state , class action , class environment >
double EpisodicSimulation< state, action, environment >::GetTargetTolerance ( )
inline

◆ IsUnitRacing()

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::IsUnitRacing ( UnitInfo< state, action, environment > *  u)
inlineprotected

◆ SetDisjunctiveTrialEnd()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::SetDisjunctiveTrialEnd ( bool  value)
inline

◆ SetStopOnConvergence()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::SetStopOnConvergence ( bool  stop)
inline

◆ SetTargetTolerance()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::SetTargetTolerance ( double  x)
inline

◆ SetTravelLimit()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::SetTravelLimit ( double  lim)
inline

◆ SetTrialLimit()

template<class state , class action , class environment >
void EpisodicSimulation< state, action, environment >::SetTrialLimit ( long  maxTrials)
inline

◆ UnitOnTarget()

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::UnitOnTarget ( UnitInfo< state, action, environment > *  u)
inlineprotected

◆ UnitOnTargetStatus()

template<class state , class action , class environment >
tUnitOnTargetStatus EpisodicSimulation< state, action, environment >::UnitOnTargetStatus ( UnitInfo< state, action, environment > *  u)
inlineprotected

Member Data Documentation

◆ allRacesDone

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::allRacesDone
protected

◆ currRound

template<class state , class action , class environment >
int EpisodicSimulation< state, action, environment >::currRound
protected

◆ disjunctiveTrialEnd

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::disjunctiveTrialEnd
protected

◆ maxRounds

template<class state , class action , class environment >
long EpisodicSimulation< state, action, environment >::maxRounds
protected

◆ racingInfo

template<class state , class action , class environment >
std::vector<bool> EpisodicSimulation< state, action, environment >::racingInfo
protected

◆ stopOnConvergence

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::stopOnConvergence
protected

◆ targetTolerance

template<class state , class action , class environment >
double EpisodicSimulation< state, action, environment >::targetTolerance
protected

◆ travelLimit

template<class state , class action , class environment >
double EpisodicSimulation< state, action, environment >::travelLimit
protected

◆ useMaxRounds

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::useMaxRounds
protected

◆ useTravelLimit

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::useTravelLimit
protected

◆ verbose

template<class state , class action , class environment >
bool EpisodicSimulation< state, action, environment >::verbose
protected

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