Open Coverage
Rushing Flag at Map Center

Capture The Flag AI Competition: Results and Source Release

Alex J. Champandard on April 30, 2013

During three months, starting mid-November 2012 and ending mid-February 2013, AiGameDev.com ran an AI Competition called Capture The Flag (CTF). We had rather ambitious goals for CTF, designing it to be more practical than academic competitions and more relevant than hobbyist contests. In the end, after many long hours of work by the many competitors and the organization team, it not only fulfilled our expectations but easily drove forward the current state-of-the-art in the field.

Over the course of the competition, almost 1,000 AI Commanders were submitted by a horde of almost fanatical hobbyists, students, enthusiasts, and professionals. In total, over 100,000 games were run online among the submissions in the continuous ladder as well as the tournaments for each phase. The winners were awarded with a signed copy of KILLZONE 3, courtesy of Guerrilla Games (who are hiring), AiGameDev.com PREMIUM memberships, and free tickets to this year's Game/AI conference in Vienna.

Here's an example of a match between the top two Commanders, to give you an idea of the game's mechanics as well as the quality of the final results!

Kefir vs. Terminator

Challenges

There are various interesting things to note from this game (other maps have similar challenges):

  1. Adaptive Defense — There are many well protected locations to defend the flag, and the Blue commander exploits those based on how successful they have been so far.
  2. Tactical Movement — The shortest and most naive path choice between the flag and the return location goes through enemy controlled territory, and requires tactical pathfinding.
  3. Reactive Strategy — Strategies for both rushing the flag quickly (Red, 0:12) and approaching it methodically (Blue, 0:25) are both viable at most stages of the game.
  4. Terrain Reasoning — Tactical reasoning has a big impact on most maps, including carefully approaching enemies, picking off flanks, and intercepting the flag carrier.

Game Mechanics

As for the low-level mechanics of the game, the individual bots have four high-level states (enabled by sending orders) that serve specific purposes and complement each other. The specific details of the states, such as cool-down timers, field of view, and aiming delays were tuned over the course of the competition to maintain balance as the commander AI submissions improved. However, the underlying principles remained unchanged:

  • Defend — Places the bot in a focused crouching position, precisely aiming at a specific direction. Aiming is very quick and deadly, but the field of view is lower and it takes more time to get into position.
  • Attack — More careful attacking behavior that will avoid trouble where possible, and not venture into the line-of-fire of known enemies. Speed is relatively slow.
  • Charge — A much faster attack behavior that can be used by multiple bots to overwhelm static positions. Movement is much faster, too. Ideal for rushing to the flag.
  • Sprint — This behavior avoids attacking altogether and simply moves very quickly towards the specified target. Often, sprinting bots can 'dodge' into cover before the enemy can take a single shot!

It took quite a bit of tweaking of the parameters of each state over the course of the competition, but overall the behaviors remain simple. The Commander AI is responsible for making the most of these behaviors.

Ladder & Tournament

The following table shows winners and their bot performances in the CTF competition.

Rank Commander Wins Draws Losses
1 Alexander Shafranov #35 72.4%9.6%18.0%
2 Terminator #17 69.7%11.9%18.4%
3 Chris St. John #53 60.0%16.2%23.8%
4 Traffic Jam #44 60.0%15.8%24.2%

Congratulations from the whole AiGameDev.com team!

Example Game Recordings

Chris St. John vs. T-Dup

Traffic Jam vs. Locutus

Commander AI

During the course of the CTF competition we were not only interested in the final results and who leads the ladder. We also encouraged participants to share insights on their solutions and how they approached to solve the challenging task of developing a good and robust AI commander. That includes AI techniques such as reasoning, planning and of course path finding.

Many of these discussions took place in our official CTF competition forums. There, competitors talked about technical questions and issues, details of how to solve a particular problem, as well as general ideas and thoughts related to the design and development of their and other AI commanders.

We asked the competition finalists to share some details on their approaches and solutions. They kindly answered all our questions and we have created a dedicated posting with their answers for you. Thanks to the finalists for sharing your ideas!

What Player's Thought

"The CTF competition allowed me to prototype Python HTN planner and use it for actually relevant task, without spending ages, thanks to the easy programming environment. Many thanks to AiGamedev.com guys!"
-- Alexander Shafranov aka shafranov

"The Capture the Flag contest achieves a great balance between simplicity for newcomers and flexibility for experienced hackers. I had great fun learning and applying new AI programming techniques like behaviour trees. Thanks, CTF team!"
-- Chris St. John aka CSJ

"I had a great time developping a bot for the CTF competition: good organization, challenging and friendly competitors, good game with a lot of possibilities, C# support. Thanks a lot to admins and contestants for making a success out of this experience!"
-- Thomas Dupuis aka tdup

"I never thought I'd wake up early in the morning to check logs, make sure blues win against reds and go straight back to bed with a glad heart. Thanks for this exciting game!"
-- Xavier aka Traffic Jam

Get Involved!

The CTF competition is over but we at AiGameDev.com are already thinking about the future of the AI Sandbox, possible enhancements and new features, as well as ideas for other competitions. We are already working hard on the next major update of the AI Sandbox software, and we want to share the results of our efforts with you.

The next iteration of our AI Sandbox application is available and ready to download from the main AI Sandbox web site. Will you test it and provide feedback to us? We are eager to hear what you like about the software, what you think could be improved, and what features you would like to see in in future versions.

Thank you!

Source Release

We provide full sources to the Capture The Flag software for ULTIMATE members of AiGameDev.com. Please follow this link for more information.

Discussion 1 Comments

wwjdtd on March 3rd, 2014

Is it possible to just buy access to the CTF source code, if I do not see me doing anything else?

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!