Capture The Flag AI Competition!
In each game, two teams of between 4 and 15 bots will compete against each other to score the most points. Points are scored whenever a team returns an enemy flag to its flag scoring location. See these example videos.
In general, minor details of the bot behavior such as aiming delays, distance or field of view, or state switch cooldown timers are subject to change. However, there are some key ideas that underlie the design that will remain in place:
- One bot defending facing in the right direction will always win against a bot attacking.
- One bot attacking facing in the right direction will always win against a bot charging.
- Two bots attacking one defending bot will win, after having lost a casualty.
- Two bots charging one attacking bot will win, after having lost a casualty.
- One charging bot will win against a bot defending facing the wrong direction.
To help balance these scenarios, the aiming and cooldown timers have been carefully tuned and will be tuned further if necessary.
At the start of the game each commander is given information about the level that the game is being run on and many of the constants described on this page.
Commanders are ticked at regular intervals during the frame. Every time a commander is ticked it is given updated information about the world. Each commander only has partial knowledge about the world.
- Full information about the level map.
- Each Full information about their own bots.
- Partial information about enemy bots. Information is only known for bots that are currently visible or that are involved in some game event this frame, such as killing a bot or picking up the flag. Full information is known about bots that are carrying flags.
- Full information about all of the flags
The commander can issue high-level orders to each of its bots. These orders include requests for a bot to
- defend the current location by standing still and waiting for enemy bots (one defending bot will win against one moving or attacking enemy bot)
- move to a location (running), without shooting at enemy bots if seen by our bot
- attack a location by walking to it, attacks an enemy bot as soon as it is seen and within firing range (however, while attacking our bot will not walk into the firing arc of an enemy bot in order to avoid getting shot by the enemy)
- charge a location, which is faster than attacking (while charging our bot will also run into an enemy bot's firing arc)
A bot will automatically pick up the flag when it passes over it. There are no restrictions on bot movement or firing while carrying the flag.
If a bot carrying a flag is killed the flag is dropped at that location. After a certain amount of time the flag will be reset back to its spawning location. A team cannot pick up its own flag.
Each bot can see within a visibility arc in front of itself up to a maximum range. Blocks may obscure a bots vision as line of sight tests are used. The visibility arc is not shown in the game visualizations. It has the same arc angle as the firing arc described below, but a significantly longer range.
Combat is handled automatically by the bots. Except if in moving state, in which a bot will ignore enemies within firing range (as described above), a bot will automatically target any enemy that comes into its firing arc. The arc shown in the visualization is the firing arc of the bots.
When a bot targets another bot it will automatically stop and shoot after a firing delay. This firing delay is calculated based on the sum of the following factors:
- firing delay from walking or running (running is significantly higher)
- firing delay for turning to face the target
- a constant firing delay
There are no hitpoints in this game. One shot is sufficient to kill another bot. It is possible for two bots to simultaneously kill each other.
Dead bots are respawned at regular intervals (eg every 30 seconds) in the appropriate team's spawning area.