TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Classes | Public Member Functions | Public Attributes | List of all members
cherrypi::GathererAssignments Struct Reference

Assigns workers to resources for optimal gathering. More...

#include <gathererassignments.h>

Classes

struct  WorkerState
 Used internally to track worker statefulness. More...
 

Public Member Functions

void addUnit (Unit *)
 Include a worker in gathering. More...
 
void removeUnit (Unit *)
 Remove a worker from gathering. More...
 
void step (State *)
 Update gathering assignments for this frame. More...
 

Public Attributes

ResourceWorkers resourceWorkers
 Mapping of workers assigned to resources. More...
 
std::unordered_map< Unit *, WorkerStateworkers
 Mapping of workers to their gathering state. More...
 

Detailed Description

Assigns workers to resources for optimal gathering.

Member Function Documentation

void cherrypi::GathererAssignments::addUnit ( Unit unit)

Include a worker in gathering.

void cherrypi::GathererAssignments::removeUnit ( Unit unit)

Remove a worker from gathering.

void cherrypi::GathererAssignments::step ( State state)

Update gathering assignments for this frame.

Member Data Documentation

ResourceWorkers cherrypi::GathererAssignments::resourceWorkers

Mapping of workers assigned to resources.

std::unordered_map<Unit*, WorkerState> cherrypi::GathererAssignments::workers

Mapping of workers to their gathering state.


The documentation for this struct was generated from the following files: