Skip to content

Repository files navigation

PurpleWave

A tournament-winning AI player of StarCraft: Brood War

About

PurpleWave is a StarCraft: Brood War AI written in Scala. It can play all three races and a large variety of professional-style strategies.

BASIL as Protoss

BASIL offracing as Terran

BASIL offracing as Zerg

PurpleWave has won:

PurpleWave has also ranked #1 on the BASIL, SSCAIT, and SAIL ladders.

Credits

Thanks to:

  • Nathan Roth (Antiga/Iruian) for strategy advice and consulting -- so much of the polish in PurpleWave's strategies comes from his wisdom and replay analysis
  • @JasperGeurtz @Bytekeeper and @N00byEdge for JBWAPI
  • @vjurenka for BWMirror
  • @Cmccrave for Horizon and BWEB
  • @MrTate for JBWEB
  • @lowerlogic for BWTA
  • Igor Dimitrijevic for BWEM
  • @JasperGeurtz for the Java port of BWEM
  • @kovarex and @heinermann for BWAPI
  • @michalsustr and @certicky for SC-Docker and @Bytekeeper for its BASIL port for powering PotatoPeeler
  • @jabbo16 for configuring PurpleWave's Maven build
  • @davechurchill @certicky @krasi0 @Bytekeeper @bgweber @SonkoMagnus Nathan Roth and the Cognition & Intelligence Lab at Sejong University for hosting Brood War competitions and environments that have given PurpleWave visibility and purpose
  • @chriscoxe for diagnosing and solving technical issues in tournament environments that have affected PurpleWave's ability to compete
  • @jaj22/JohnJ and Ankmairdor for lots of advice navigating Brood War mechanics
  • @IMP42 @AdakiteSystems and @tscmoo for helping me get BWAPI up and running when I was getting started
  • @tscmoo for OpenBW
  • NepetaNigra, ChoboSwaggins, @Nitekat, and CH Miner for sharing PurpleWave's games with the world and helping tell our story

The community around BWAPI and StarCraft AI is amazing and PurpleWave could not exist without building on the decade of work these folks have done.

How to build PurpleWave

PurpleWave requires a 32-bit JDK 8 at runtime because it connects to 32-bit BWAPI. Maven is the source of truth for source directories, dependencies, Scala 2.12.18, compiler options, and build order.

  • Clone the repository and run git submodule sync; git submodule update --init --recursive.
  • From a command prompt, run mvn clean package. The runnable fat JAR is target/PurpleWave-1.0.jar.
  • In IntelliJ IDEA, install the Scala plugin and open the repository as a Maven project. Select the 32-bit JDK 8 as the Project SDK and reload the Maven project. Do not add modules, source folders, dependencies, or a Scala SDK by hand.

How to run PurpleWave

  • From IntelliJ IDEA: use the shared PurpleWave Run/Debug configuration. It runs Maven's compile phase and then launches Lifecycle.Main with the Maven main module. Its working directory is the sibling ../bw directory; change that field if your StarCraft directory is elsewhere.
  • As a JAR:
    • cd to the StarCraft directory
    • mkdir -p bwapi-data/AI; mkdir -p bwapi-data/read; mkdir -p bwapi-data/write to create the standard directories for BWAPI bot data
    • Run java.exe -Xms1024m -Xmx1024m -Dpurpledebug=true -jar C:\path\to\PurpleWave\target\PurpleWave-1.0.jar

Questions and feedback

Say hi! Post an issue here on Github or email dsgant at gmail

License

PurpleWave is published under the MIT License. I encourage you to use PurpleWave as a starting point for your own creation!

About

StarCraft: Brood War AI in Scala

Topics

Resources

Stars

108 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages