Go to the documentation of this file.
15 template <
class state,
class action,
class environment>
21 virtual const char *
GetName() {
return "Random Unit"; }
24 std::vector<action> acts;
25 theEnv->GetActions(
loc, acts);
26 a = acts[random()%acts.size()];
40 printf(
"(%f-%f)/(%f-%f)\n",
virtual void GetGoal(state &s)
virtual bool MakeMove(environment *theEnv, OccupancyInterface< state, action > *, SimulationInfo< state, action, environment > *, action &a)
A unit that moves in random directions changing direction randomly.
virtual double GetSimulationTime() const =0
virtual void UpdateLocation(environment *, state &newloc, bool success, SimulationInfo< state, action, environment > *)
virtual void GetLocation(state &l)
RandomUnit(state startLoc)
virtual const char * GetName()
virtual void GetPublicUnitInfo(unsigned int unitnum, PublicUnitInfo< state, action, environment > &) const =0
virtual unsigned int GetCurrentUnit() const =0
virtual void OpenGLDraw(const environment *theEnv, const SimulationInfo< state, action, environment > *si) const