Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.battlecode.cam/llms.txt

Use this file to discover all available pages before exploring further.

Match format

Every match consists of 5 games. Each game is played on a different map with a different random seed. The team that wins more games wins the match.

Win conditions per game

A game ends when:
ConditionDescription
Core destroyedOne team’s core reaches 0 HP
ResignedA team called resign() — their core is destroyed and they lose
Axionite collectedTiebreaker 1: most total refined axionite delivered to the core
Titanium collectedTiebreaker 2: most total titanium delivered to the core
HarvestersTiebreaker 3: most harvesters currently alive
Axionite storedTiebreaker 4: most axionite currently stored
Titanium storedTiebreaker 5: most titanium currently stored
CoinflipTiebreaker 6: random coinflip if all above are tied
If both cores survive 2000 rounds, the tiebreaker sequence is evaluated in order. The match result shows exactly which condition decided the game.

Ladder

The ladder ranks all teams by Elo rating. New teams start unrated and are seeded to 1500 when they upload their first ready submission.

Scheduling

Every 10 minutes, the scheduler:
  1. Pairs each team with one similarly-rated opponent (greedy nearest-rating matching with small random jitter to avoid repetitive matchups)
  2. Avoids rematches from the last hour
  3. Submits matches to the runner infrastructure
With N teams, each cycle creates floor(N/2) matches — one match per team.

Rating updates

Ratings are updated using Elo immediately after each match completes. Match outcomes use fractional scoring based on the game score (e.g., a 5-0 win counts more than a 3-2 win). Each team has a single Elo rating that moves up or down after each match.

Unrated matches

You can challenge any team to an unrated match that doesn’t affect ratings:
cambc match unrated <opponent_team_id>
cambc match unrated <opponent_team_id> --map arena --map galaxy   # specific maps
Unrated matches use the same infrastructure and time limits as ladder matches but are prioritised for faster execution. You can optionally specify up to 5 maps — if omitted, 5 random maps are used.

Test runs

Test runs let you upload two local bots and run them against each other on the same hardware as ladder matches:
cambc match test my_bot opponent
This is the best way to verify your bot works within the 2ms CPU time limit before submitting to the ladder.
Rate limits: max 10 test/unrated matches per 10 minutes.