Skip to main content
The cambc CLI is your main tool for local development, testing, and interacting with the platform. Install it with pip install cambc.

Project setup

cambc starter

Scaffold a new Cambridge Battlecode project. Run this first after installing.
Creates the following project structure:
The starter bot demonstrates core gameplay: the core spawns builder bots, builders explore by laying roads, and when they find ore they build harvesters on it.

cambc.toml

The config file created by cambc starter. All fields have defaults and all CLI options override config values.
Bot paths in cambc run are resolved by first checking the raw path, then checking inside bots_dir. So cambc run starter opponent resolves to bots/starter and bots/opponent.

Local development

cambc run

Run a local match between two bots. No time limits are enforced locally.
Arguments: Options:

cambc watch

View a replay in the browser-based visualiser.
Local replay: Serves the visualiser on localhost and opens your browser. Press Ctrl+C to stop the server.
Platform match: Opens the platform visualiser in your browser for a specific match.

cambc map-editor

Open the map editor to create custom .map26 files.

Platform commands

These commands interact with the online platform at game.battlecode.cam. Most require authentication via cambc login.

cambc login

Authenticate with the platform. Opens a browser window for OAuth login and stores your session locally.
The session persists across CLI invocations until it expires or you run cambc logout.

cambc logout

Clear stored credentials.

cambc submit

Upload a bot to compete on the ladder.
The path can be a directory containing main.py, a single .py file, or a .zip. Directories are auto-zipped before upload. See submission requirements for constraints.

cambc status

Show your current team, rating, rank, and member list.
Displays your username, team name, category, Glicko-2 rating with uncertainty, matches played, and team members with roles.

cambc unrated

Challenge another team to an unrated match using both teams’ latest submissions.
Unrated matches run on the same AWS infrastructure as ladder matches with full time limit enforcement but do not affect ratings. They are prioritised over ladder matches for faster results.
Rate limits apply: max 10 test/unrated matches per 5 minutes, plus a 5-minute cooldown per matchup.

cambc test-run

Upload two local bots and run a remote match with full time limit enforcement on AWS Graviton3 hardware.
Both bots are packaged and uploaded to the server. Unlike cambc run, this enforces the 2ms CPU time limit per round — use this to check your bot’s performance before submitting.

cambc matches

View recent match history.

cambc match

View details of a specific match including per-game results.
Shows match status, teams, score, rating delta, timestamps, and a table of individual games with map, winner, win condition, and turns played.

cambc test-matches

View your remote test run history.

cambc teams

Search for teams or view team details.