cybw 0.7.1 beta
For BWAPI 4.1.2 r4708
CyBW is a Python language wrapper for BWAPI implemented in Cython.
Most of the BWAPI functions use the exact same interface,
so read the BWAPI documentation.
BWAPI, an interface for building AI in Starcraft:
Cython, interface between C/C++ and Python.
For more information on Starcraft AI, visit:
IRC: ratiotile on
== Changes ==
- Unit.getTrainingQueue() works again
- Return None instead of raising NullPointerException on null Units
- Now works with official Python 3.5 distribution, with custom built bwapi
static libraries using v140
- implemented Races.allRaces(), WeaponTypes, UnitSizeTypes, DamageTypes,
- fixed bug in Races
- Region: is now hashable, equality operator
- Game.drawLineMap now takes overloaded parameters
- Fixed allTypes() for Tech, Upgrades, UnitTypes
- Added missing
- implemented UnitType.upgradesWhat, .researchesWhat.
- cleaned up implementation of SetContainer
- Fixed error on division in Position, TilePosition, and WalkPosition.
- updated to target BWAPI 4.1.2
- BulletSet reimplemented
- UnitType has better repr output
- reimplemented setTextSize
- implemented more functions in Unit
- implemented most functions in Player
- implemented str for TilePosition and WalkPosition
- fixed a bug that broke Unit.getDistance to other Units
- attempted to increase threaded performace by declaring nogil on some functions
- throws NullPointerException instead of crashing Starcraft on null Units, Players, Bullets, and Regions.
- Players are now comparable.
- BWAPI v4.1.2 installed
- Python 3.5 32-bit standard distribution
- Python 3.4.3 (vs2013, x86) in the downloads section.
Setup - Python 3.5 (windows)
- download the binary cybw wheel
- pip install cybw-version.whl
Setup - Python 3.4
Extract Python34vs2013 to C:\python34vs2013 for example.
make cybw directory below BWAPI_4.1.2
make venv directory inside cybw
start cmd shell and navigate into
create the virtualenv:
virtualenv cybw --system-site-packages --always-copy -p C:\python34vs2013\python.exe
this adds all the system packages, so run virtualenv again to remove them:
virtualenv cybw --always-copy -p C:\python34vs2013\python.exe
activate the virtualenv - you should see (cybw) in your shell
go back to top level cybw folder. Install the cybw package from wheel.
pip install cybw_for_BWAPI_4.1.0-0.4-cp33-none-win32.whl
go into venv\cybw\ and move the example_ai directory up into the main -
the python wheel install puts it here for some reason.
cybw\venv\cybw\example_ai -> cybw\example_ai
In case of a DistributionNotFound error launching the virtualenv, it can be resolved by reinstalling pip via get-pip.py, then reinstalling all the required packages.
- Set BWAPI to client mode - make sure
ai=line in bwapi.ini is commented out
run example client with:
assuming that you are cybw and setup as so:
start Starcraft using ChaosLauncher injecting BWAPI release mode.
- Cython 0.23.4+
- BWAPI libraries compiled with v140 (MSVC 2015)
- python setup.py build_ext
- python setup.py bdist_wheel (to build release)
- Check out the .pyx files to see what functions of BWAPI have been implemented. There is still a lot missing, but the basic functionality is there.
- install all of requirements.txt in venv folder. ipdb and ipython are tools to aid in debugging. Wheel and setuptools are for distribution and packaging.