HOG2
|
#include <EpisodicSimulation.h>
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 () |
StatCollection * | GetStats () |
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 |
Definition at line 29 of file EpisodicSimulation.h.
|
inline |
Definition at line 31 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::allRacesDone, EpisodicSimulation< state, action, environment >::currRound, EpisodicSimulation< state, action, environment >::disjunctiveTrialEnd, EpisodicSimulation< state, action, environment >::stopOnConvergence, EpisodicSimulation< state, action, environment >::targetTolerance, EpisodicSimulation< state, action, environment >::useMaxRounds, EpisodicSimulation< state, action, environment >::useTravelLimit, and EpisodicSimulation< state, action, environment >::verbose.
|
inlinevirtual |
Definition at line 44 of file EpisodicSimulation.h.
|
inline |
Definition at line 54 of file EpisodicSimulation.h.
References UnitSimulation< state, action, environment >::AddUnit(), EpisodicSimulation< state, action, environment >::allRacesDone, and EpisodicSimulation< state, action, environment >::racingInfo.
|
inlinevirtual |
timeOffset | is 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.
|
inlinevirtual |
Reimplemented from UnitSimulation< state, action, environment >.
Definition at line 75 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::allRacesDone, UnitSimulation< state, action, environment >::ClearAllUnits(), and EpisodicSimulation< state, action, environment >::currRound.
|
inline |
Definition at line 74 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::useTravelLimit.
|
inlinevirtual |
Definition at line 65 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::allRacesDone.
|
inlineprotectedvirtual |
Reimplemented from UnitSimulation< state, action, environment >.
Definition at line 79 of file EpisodicSimulation.h.
References StatCollection::AddStat(), EpisodicSimulation< state, action, environment >::allRacesDone, EpisodicSimulation< state, action, environment >::currRound, UnitSimulation< state, action, environment >::currTime, EpisodicSimulation< state, action, environment >::disjunctiveTrialEnd, UnitSimulation< state, action, environment >::env, EpisodicSimulation< state, action, environment >::EpisodeDone(), EpisodicSimulation< state, action, environment >::IsUnitRacing(), kReachedTarget, EpisodicSimulation< state, action, environment >::maxRounds, UnitSimulation< state, action, environment >::stats, EpisodicSimulation< state, action, environment >::stopOnConvergence, UnitSimulation< state, action, environment >::unitGroups, EpisodicSimulation< state, action, environment >::UnitOnTarget(), EpisodicSimulation< state, action, environment >::UnitOnTargetStatus(), UnitSimulation< state, action, environment >::units, EpisodicSimulation< state, action, environment >::useMaxRounds, and EpisodicSimulation< state, action, environment >::verbose.
|
inlineprotectedvirtual |
Reimplemented from UnitSimulation< state, action, environment >.
Definition at line 237 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::allRacesDone, and UnitSimulation< state, action, environment >::DoTimestepCalc().
|
inlineprotectedvirtual |
Definition at line 243 of file EpisodicSimulation.h.
References UnitSimulation< state, action, environment >::units.
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc().
|
inline |
Definition at line 71 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::currRound.
|
inline |
Definition at line 68 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::targetTolerance.
|
inlineprotected |
Definition at line 288 of file EpisodicSimulation.h.
References UnitInfo< state, action, environment >::agent, and EpisodicSimulation< state, action, environment >::racingInfo.
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc().
|
inline |
Definition at line 69 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::disjunctiveTrialEnd.
|
inline |
Definition at line 66 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::stopOnConvergence.
|
inline |
Definition at line 67 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::targetTolerance.
|
inline |
Definition at line 72 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::travelLimit, and EpisodicSimulation< state, action, environment >::useTravelLimit.
|
inline |
Definition at line 73 of file EpisodicSimulation.h.
References EpisodicSimulation< state, action, environment >::maxRounds, and EpisodicSimulation< state, action, environment >::useMaxRounds.
|
inlineprotected |
Definition at line 278 of file EpisodicSimulation.h.
References kNoTarget, kNotOnTarget, kOutOfTravel, kReachedTarget, and EpisodicSimulation< state, action, environment >::UnitOnTargetStatus().
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc().
|
inlineprotected |
Definition at line 259 of file EpisodicSimulation.h.
References UnitInfo< state, action, environment >::agent, kNotOnTarget, kOutOfTravel, kReachedTarget, UnitInfo< state, action, environment >::totalDistance, EpisodicSimulation< state, action, environment >::travelLimit, and EpisodicSimulation< state, action, environment >::useTravelLimit.
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc(), and EpisodicSimulation< state, action, environment >::UnitOnTarget().
|
protected |
Definition at line 296 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::AddNonRacingUnit(), EpisodicSimulation< state, action, environment >::ClearAllUnits(), EpisodicSimulation< state, action, environment >::Done(), EpisodicSimulation< state, action, environment >::DoPreTimestepCalc(), EpisodicSimulation< state, action, environment >::DoTimestepCalc(), and EpisodicSimulation< state, action, environment >::EpisodicSimulation().
|
protected |
Definition at line 297 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::ClearAllUnits(), EpisodicSimulation< state, action, environment >::DoPreTimestepCalc(), EpisodicSimulation< state, action, environment >::EpisodicSimulation(), and EpisodicSimulation< state, action, environment >::GetCurrRound().
|
protected |
|
protected |
Definition at line 301 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc(), and EpisodicSimulation< state, action, environment >::SetTrialLimit().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 298 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::SetTravelLimit(), and EpisodicSimulation< state, action, environment >::UnitOnTargetStatus().
|
protected |
|
protected |
Definition at line 299 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::DisableTravelLimit(), EpisodicSimulation< state, action, environment >::EpisodicSimulation(), EpisodicSimulation< state, action, environment >::SetTravelLimit(), and EpisodicSimulation< state, action, environment >::UnitOnTargetStatus().
|
protected |
Definition at line 305 of file EpisodicSimulation.h.
Referenced by EpisodicSimulation< state, action, environment >::DoPreTimestepCalc(), and EpisodicSimulation< state, action, environment >::EpisodicSimulation().