Primal builds on top of the JNIBWAPI project created by Ben Weber (Expressive Intelligence Studio, University of California Santa Cruz) which provides a Java Native Interface to the original Brood Wars API (BWAPI) system developed to allow developers to inject their AI commands into the StarCraft : Brood Wars game.

When we began working with JNIBWAPI, it became apparent that although it was a great system, it required a lot of low-level manipulation of game objects and some very specific knowledge of the StarCraft game. As such it wasn’t as intuitive as it could have otherwise been. As the TADI project began at SAIG, it became clear that in order to rapidly prototype different AI systems within the StarCraft environment, we needed to create a framework that sat on top of JNIBWAPI – much as we had done with the SPREE system. Primal is this framework.

As an example of the power of Primal, consider a situation where you require a new worker unit. Using plain JNIBWAPI you can track down your base in the list of units, and issue an order to train the worker. There are a range of reasons it might fail, primarily that you have insufficient resources to build it, or you do not have space in your population to accomodate more units. In either case, you now need to ensure that you write systems to address these situations, and a later point still manage to build the worker unit you want once the preconditions are met. Primal simplifies this process – if you want a new worker unit, you simply issue a request for one to the Primal system, which takes care of scheduling, ensuring the resources are available, expanding the population cap if required and so forth. What previously involved a significant amount of low-level reasoning and logic is abstracted to be a single call to Primal, freeing the AI developer to focus on the big picture.


Primal documentation is available here

Source code will be made available shortly through this Google Code project.