TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Input: More...
#include <movefilters.h>
Inherits cherrypi::movefilters::PositionFilter.
Public Member Functions | |
FuncPositionFilter (std::function< Container const &&(Unit *)> getter, std::function< bool(Unit *, Position const &, T)> valid, std::function< float(Unit *, Position const &, T)> scoreFunc, PositionFilterPolicy policy=PositionFilterPolicy::ACCEPT_IF_ALL, bool blocking=false) | |
bool | isValid (Unit *agent, Position const &pos) override |
float | score (Unit *agent, Position const &pos) override |
bool | blocking () override |
Public Member Functions inherited from cherrypi::movefilters::PositionFilter | |
virtual | ~PositionFilter ()=default |
Protected Attributes | |
std::function< Container const &&(Unit *)> | getter_ |
std::function< bool(Unit *, Position const &, T)> | valid_ |
std::function< float(Unit *, Position const &, T)> | score_ |
PositionFilterPolicy | policy_ |
bool | blocking_ |
Input:
The filter will decide if a position is valid by combining the valid func and score function according to the PositionFilterPolicy.
|
inline |
|
inlineoverridevirtual |
Implements cherrypi::movefilters::PositionFilter.
|
inlineoverridevirtual |
Implements cherrypi::movefilters::PositionFilter.
|
inlineoverridevirtual |
Implements cherrypi::movefilters::PositionFilter.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |