TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Abstract base class for Trackers. More...
#include <tracker.h>
Inherited by cherrypi::AttackTracker, cherrypi::BuildTracker, cherrypi::MovementTracker, cherrypi::ResearchTracker, and cherrypi::UpgradeTracker.
Public Member Functions | |
Tracker (int timeout) | |
virtual | ~Tracker () |
TrackerStatus | status () const |
void | cancel () |
bool | failed () const |
bool | succeeded () const |
virtual bool | update (State *s) |
Updates the tracker. More... | |
Protected Member Functions | |
virtual bool | updateNotTracking (State *s)=0 |
Updates the tracker if its status is NotTracking. More... | |
virtual bool | updatePending (State *s)=0 |
Updates the tracker if its status is Pending. More... | |
virtual bool | updateOngoing (State *s)=0 |
Updates the tracker if its status is Ongoing. More... | |
Protected Attributes | |
TrackerStatus | status_ = TrackerStatus::NotTracking |
int | time_ = 0 |
int | timeout_ |
Abstract base class for Trackers.
A tracker monitors the execution of a given target. For example, this could be the command issued in the game (via CommandTracker) or the implementation of an UPCSTuple (via TaskTracker). At any given time, the tracker will provide a status assumption regarding the target. It will end up in either Timeout
, Success
or Failure
. See TrackerStatus for a description of the individual modes.
Tracker implementations provide update functions for the NotTracking, Pending and Ongoing status. Timeouts are handled by the base class.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Updates the tracker.
Returns true if status has changed
|
protectedpure virtual |
Updates the tracker if its status is NotTracking.
Returns true if status has changed
Implemented in cherrypi::AttackTracker, cherrypi::ResearchTracker, cherrypi::UpgradeTracker, cherrypi::BuildTracker, and cherrypi::MovementTracker.
|
protectedpure virtual |
Updates the tracker if its status is Ongoing.
Returns true if status has changed
Implemented in cherrypi::AttackTracker, cherrypi::ResearchTracker, cherrypi::UpgradeTracker, cherrypi::BuildTracker, and cherrypi::MovementTracker.
|
protectedpure virtual |
Updates the tracker if its status is Pending.
Returns true if status has changed
Implemented in cherrypi::AttackTracker, cherrypi::ResearchTracker, cherrypi::UpgradeTracker, cherrypi::BuildTracker, and cherrypi::MovementTracker.
|
protected |
|
protected |
|
protected |