TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
A Behavior is a self-contained situational micro rule. More...
#include <behavior.h>
Inherited by cherrypi::BehaviorSeries.
Public Member Functions | |
void | perform (Agent &agent) |
Checks if a unit still needs a micro decision. If so, invokes onPerform() More... | |
virtual | ~Behavior ()=default |
Protected Member Functions | |
MicroAction | doAction (std::shared_ptr< UPCTuple > upc) const |
Convenience method: Form a MicroAction reflecting a decision to issue a UPC for this unit. More... | |
virtual MicroAction | onPerform (Agent &)=0 |
Decide what to do with a unit that has not yet been controlled by a Behavior. More... | |
Protected Attributes | |
const MicroAction | pass = MicroAction() |
Convenience: A MicroAction reflecting a decision to ignore this unit and let another Behavior control it. More... | |
const MicroAction | doNothing = doAction(nullptr) |
Convenience: A MicroAction reflecting a decision to do nothing with this unit and let no other Behavior control it. More... | |
A Behavior is a self-contained situational micro rule.
|
virtualdefault |
|
inlineprotected |
Convenience method: Form a MicroAction reflecting a decision to issue a UPC for this unit.
|
protectedpure virtual |
Decide what to do with a unit that has not yet been controlled by a Behavior.
Implemented in cherrypi::BehaviorSeries.
void cherrypi::Behavior::perform | ( | Agent & | agent | ) |
Checks if a unit still needs a micro decision. If so, invokes onPerform()
|
protected |
Convenience: A MicroAction reflecting a decision to do nothing with this unit and let no other Behavior control it.
|
protected |
Convenience: A MicroAction reflecting a decision to ignore this unit and let another Behavior control it.