Git Product home page Git Product logo

bwapi's Introduction

The Brood War API {#BWAPI}

Build status

[TOC]

Project Information {#project}

Overview {#overview}

The Brood War Application Programming Interface (BWAPI) is a free and open source C++ framework that is used to interact with the popular Real Time Strategy (RTS) game Starcraft: Broodwar. Using BWAPI, students, researchers, and hobbyists can create Artificial Intelligence (AI) agents that play the game.

BWAPI only reveals the visible parts of the game state to AI modules by default. Information on units that have gone back into the fog of war is denied to the AI. This enables programmers to write competitive non-cheating AIs that must plan and operate under partial information conditions. BWAPI also denies user input by default, ensuring the user cannot take control of game units while the AI is playing. These defaults can be changed for flexibility, unless enforced by a Tournament Module (game referee for AI tournaments). Changed defaults will be advertised when the match begins.

Capabilities {#capability}

  • Write competitive AIs for Starcraft: Broodwar by controlling individual units.
  • Read all relevant aspects of the game state.
  • Analyze replays frame-by-frame, and extract trends, build orders, and common strategies.
  • Get comprehensive information on the unit types, upgrades, technologies, weapons, and more.
  • Study and research real-time AI algorithms in a robust commercial RTS environment.

Getting Started {#getting-started}

Quick Start {#quick-start}

  1. Installation
    1. Install Visual Studio 2017
    2. Install StarCraft: Brood War
    3. Update StarCraft: Brood War to 1.16.1
    4. Install BWAPI
  2. Compile
    1. Open ExampleProjects.sln in the BWAPI install directory
    2. Build the ExampleAIModule project in RELEASE mode
    3. Copy ExampleAIModule.dll to bwapi-data/AI inside the StarCraft install folder
  3. Run StarCraft through Chaoslauncher
    1. Run Chaoslauncher.exe as administrator
      • Chaoslauncher is found in Chaoslauncher directory of BWAPI install directory
    2. Check the BWAPI Injector x.x.x [RELEASE]
    3. Click Start
      • Make sure the version is set to Starcraft 1.16.1, not ICCup 1.16.1
  4. Run a game against Blizzard's AI
    1. Go to Single Player -> Expansion
    2. Select any user and click OK
    3. Click Play Custom, select a map, and start a game
  5. Run a game against yourself
    1. Run Chaoslauncher - MultiInstance.exe as administrator
    2. Start
      1. Go to Multiplayer -> Expansion -> Local PC
      2. Select any user and click OK
      3. Click Create Game, select a map, and click OK
    3. Start -- Uncheck BWAPI Injector x.x.x [RELEASE] to let a human play, leave alone to make AI play itself
      1. Go to Multiplayer -> Expansion -> Local PC
      2. Select any user and click OK
      3. Join the existing game created by the other client

Important Links & Contact Information {#contact}

Competitions {#competition}

Various venues host remote competitive AI competitions that allow developers from around the world to participate. These venues are often held annually and will sometimes offer prizes to the winners. It is also a great way to test your bot's capabilities.

Issues {#issues}

You may experience issues when working with BWAPI. Here are some steps you may want to follow in order to resolve them.

  1. Check the log files found in Starcraft/Errors/.
  2. Ask in the IRC channel if anyone has experienced your issue before.
  3. Check the Issue Tracker to see if your issue has already been reported.
  4. Submit an issue to the Issue Tracker. Some pieces of information to consider submitting are
  • Log files
  • Screenshots
  • Version or revision number
  • Operating System
  • Steps to reproduce the problem

Go to the Issue tracker

Legal {#legal}

Starcraft and Starcraft: Broodwar are trademarks of Blizzard Entertainment. BWAPI is a third party "hack" that violates the End User License Agreement (EULA). It is strongly recommended to purchase a legitimate copy of Starcraft: Broodwar from Blizzard Entertainment before using BWAPI.

bwapi's People

Contributors

anotak avatar baecm avatar blankname2 avatar blole avatar chriscoxe avatar dansgithubuser avatar dgant avatar ericmartel avatar fbisson avatar giszo avatar heinermann avatar jaj22 avatar kiudee avatar kovarex avatar krasi0 avatar krok55 avatar kvakvs avatar likan999 avatar lowerlogic avatar mhesham avatar n00byedge avatar neivv avatar ogail avatar predelnik avatar radicalzephyr avatar ratiotile avatar thai-ng avatar trenki2 avatar tscmoo avatar zoltan-frimmel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bwapi's Issues

Reserved resources and Income algorithm

From kovarex on June 29, 2008 12:05:09

I'v thinked out the simple algorithm that would handle priorities.

So if for example scv building has higher priority, it will never be
paused, but the reserved resources for the scv will be counted as reserved
income for small period of time before the new scv train order will be
given, so no resources/income will be reserved too early (as it could be
done in simple way, that I would reserve 50 minerals for the next scv right
after the current one is building)

I will just need to load priority number and make getIncomePerSecond or
similar function for gas and minerals to start working on this.

Original issue: http://code.google.com/p/bwapi/issues/detail?id=31

extend temporary solution "reserved minerals for buildings" + priorities

From kovarex on June 20, 2008 02:39:09

Make one class something like reservedResources, it would contain

minerals
gas
supply
(maybe something else, who knows)

Every task will have function get Reserved, that would be called in order
of priorities of task and it would return resources to reserve for that task

If I also made TaskTrain (instead of manual solution of autobuild), I could
prioritize units/buildings/invents/upgrades.

So reserved resources could also be bigger than actual resources, and it is
excepted behaviour.

Original issue: http://code.google.com/p/bwapi/issues/detail?id=27

Basic build order branching

From kovarex on June 20, 2008 02:41:50

Do
a) Choose build order based on race (and random if there are more)
b) Make the "jump" command - prerequisite of branching
c) Make the "choise" command - just random

So we would have first version of branching based on random, it will be
easy to extend it later based on enemy actions.

Original issue: http://code.google.com/p/bwapi/issues/detail?id=28

Prioritize resource gathering

From AHeinerm on October 06, 2008 09:34:27

Needs to prioritize resource gathering; ATM gas gathering has higher
priority than mineral gathering, frequently causes AI to lose matches in
which it narrowly escapes being destroyed or loses many SCVs.

Should subtract planned-to-build units' costs and determine which resource
type is lower, and focus on that.

Original issue: http://code.google.com/p/bwapi/issues/detail?id=44

UnitPrototype correcting

From kovarex on May 20, 2008 06:13:28

When everything but unitID will be removed from BWAPI::UnitPrototype it will

  1. Be moved to BW namespace
  2. Be used insted the u16 for unitID everywhere
  3. So there won't be need for files like
    UnitPrototypeDefinitions.h
    UnitPrototypeDefinitions.cpp
    That practicly doubled the info defined in UnitTypes .
    getPrototype will not be also needed.

I will just do unit->getType() (that returns the u16 now)
unit->getType().methodOfUnitPrototype();

This will make the code much more clearer, smaller and more powerful

Original issue: http://code.google.com/p/bwapi/issues/detail?id=13

Wont load map xml file

From [email protected] on May 21, 2008 16:54:37

Revision: 188

I wanted to test whether the API is able to load the ICCup Python
1.3.scx.xml file, so I started a match on the exact same map.

The following logline appears in the log:
Exception in AI::onStart: Unable to load data file bwapi-data\maps.xml

Possible Explanation: Maybe I have another version of python 1.3, so that
it isnt able to match it to the xml -> can you send me your version of
python if you suspect that that might be the cause?

Original issue: http://code.google.com/p/bwapi/issues/detail?id=15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.