Getting Started

NOTE: If you'd like to know more about the competition itself, visit the Participate Page to read why and how you should enter. Deadline is on February 11th.

1. Learn the Game

Our Capture The Flag game is a hybrid between the tactical and deterministic combat of FROZEN SYNAPSE, along with the fast objective-based gameplay of franchises like KILLZONE. This provides the best combination of highly predictable skill-based control which is essential for E-Sports (or this competition) along with the complexity of modern levels and gameplay rules.

To get started, we recommend the following:

As you take part in the competition, you'll quickly develop a deeper feeling for the game by watching games on your own computer.



2. Understand the Competition

This AI Sandbox Competition was designed not only to provide a fun, entertaining and challenging problem to work on, but also to further the state of Game/AI technology in games. As such, here's some advice on how to approach writing your commander:

  • Make It Robust — A key requirement for any AI system in commercial games is to handle all the special cases it can come up against. In this CTF competition, your commander will have to deal with many levels of different types, sizes and bot numbers, each with individual quirks exposing the subtleties of the game design. To win, you'll have to perform well in all these cases, and not just write a specialist AI.
  • Don't Micro-Manage — Your role is to build the strategic AI for the commander, and develop that alongside the individual AI as it evolves. Large codebases like KILLZONE's are often layered like this, and it's bad practice for the top-level to "spam" individual orders. The competition discourages micro-managing, so you can focus on making intelligent high-level decisions.
  • Think Adaptive — The mechanics of the game and the behavior of the individual bots (among other things) will be incrementally changing during the competition — as you'd expect if you were working on AI at Guerrilla Games for example. Indeed, throughout the production cycle game design and code is always in flux. If you can write an AI that will deal with these changes, you'll be a step ahead!
  • Heavy Analysis — To perform well in these difficult conditions, you'll need to get your hands on as much data as possible. Either by running offline simulations on your own machines and using the results, leveraging the data from the online ladders, or running a pre-process on the map dynamically when the game starts. The competition framework will help as much as possible with all of these things... You'll probably need a combination to win!

By mastering these topics during the competition, you'll be in a great position to apply for that AI Programmer position at Guerrilla Games!

3. Download a Starter Kit

To get the Capture The Flag simulation up and running on your computer, you'll need *two* (2) files from this download page:

  1. The AI Sandbox — This is the platform that will run the simulation and competitions.
  2. CTF Starter Kit — You'll need a copy of the game binaries as well as the language pack.

Currently, Windows is supported as the official platform, in particular version 7 — though Vista and 8 both work fine. Linux is also supported, in particular Ubuntu 12.04 as the recommended platform. You can find the archives on the Linux download page.

4. Develop Your AI

Locate the directory where you installed the Capture the flag SDK. We have provided several examples of commanders in examples.py that you can use to base your own commander upon.

Any commander that you write should derive from api.Commander and contain a tick() function. This function will be called each frame for your AI to give orders to each bots. Your commander code has access to the functions defined in the base class, including the GameInfo implemented in api.gameinfo and exposed through as the member variable self.game.

The orders that can be issued to bots are listed in api.commands. At the moment they include Defend, Attack, Move and Charge. Orders are issued using the self.issue method on your commander class. For example:

self.issue(commands.Run, bot, target,
           description = ‘getting flag’)

Each command has different parameters that can customize the individual AI. For instance, while attacking you can specify in which direction you want the bot to focus on by specifying a lookAt parameter. You can find out more about these parameters by reading the api.commands Python module.

5. Run Your Commander

To run your own commanders in interactive mode, simply edit the simulate.py in the SDK directory, changing the COMPETITORS variables to include the pair of commanders you want included in the test. For example:

defaults = ['examples.Defender', 'examples.Greedy']

Then run simulate.bat and you’ll see the Capture The Flag simulation window show up using those commanders! The commanders chosen in a match will be a random pairing of commanders listed in defaults.

If you'd like to run a local competition, you can likewise customize and launch the competition.py script that will use as many threads as you have processors to simulate games as quickly as possible. This can give you results for different opponents on a variety of maps. See the script itself for further details on how to customize this.

6. Debug and Tweak Your Commander

All commands have an optional description parameter that will be displayed on screen next to the particular bot, so that you can provide additional information for debugging visually. This display can be enabled by setting your commander's self.verbose member variable to True.

By default, the Capture The Flag framework will save .log files as text in the #/logs/ directory alongside your commander’s source code. To write to this log file, use the self.log variable:

def tick(self):
  self.log.info("Updating the bots.")

The name of the .log file written to will match the name of your commander’s class.



7. Submit Your Commander

Submit your commander for testing then watch the results page to see how it is doing.

8. Discuss your Success on Chat and in the Forums

Whether you're topping the leaderboard, or just trying to break into the top 1000, the forums discussions have a place for you. Come to the #gameai IRC chat or the AiGameDev forums to talk about how your doing, discuss your brilliant ideas or simply help a fellow competitor get running.