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

Maps walktile positions to feature positions for a given bounding box. More...

#include <features.h>

Public Member Functions

 FeaturePositionMapper (Rect const &boundingBox, Rect const &mapRect)
 
Position operator() (Position const &pos) const
 

Public Attributes

int irx1
 
int irx2
 
int iry1
 
int iry2
 
int offx
 
int offy
 

Detailed Description

Maps walktile positions to feature positions for a given bounding box.

This is mostly useful for actual featurizer implementations. Use (x, y) to map a position. For invalid positions (outside of the intersection of bounding box and map rectangle), (-1, -1) is returned.

Constructor & Destructor Documentation

cherrypi::FeaturePositionMapper::FeaturePositionMapper ( Rect const &  boundingBox,
Rect const &  mapRect 
)
inline

Member Function Documentation

Position cherrypi::FeaturePositionMapper::operator() ( Position const &  pos) const
inline

Member Data Documentation

int cherrypi::FeaturePositionMapper::irx1
int cherrypi::FeaturePositionMapper::irx2
int cherrypi::FeaturePositionMapper::iry1
int cherrypi::FeaturePositionMapper::iry2
int cherrypi::FeaturePositionMapper::offx
int cherrypi::FeaturePositionMapper::offy

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