jack@duowang:~/projects/battlecode-bot$ cat README.md

# battlecode-bot

A C++ game-AI bot for Cambridge Battlecode 2026, built by a team of four over the autumn. Bots play each other on a ranked Elo ladder, then in tournaments on maps nobody has seen before.

final rank
#77 / 831 teams
in the UK
#17
tier
Diamond · 2,111
peak
#28 · 2,151 Elo
team
WYYL · 4 people
stack
C++ · Python
Rating over the season: from about 1,500 on 13 October, a dip to about 1,400 in late October, then a steady climb to 2,111 by 14 November.
// rating over the season, 13 Oct → 14 Nov: from ~1,500 to Diamond. Peak rank #28 came early in the season.

## the problem

Each side's champions farm gems, fight, and bank gems at altars; first to 1,000 banked gems wins. The ladder runs on nine known maps, but tournaments use maps nobody has seen. Our early bot knew each ladder map by heart, which meant that on tournament day almost none of that work would run.

## what we built

## what I figured out

I studied the #1 team's replays to work out why they beat us. The biggest gap was banking. We banked at a fixed 40 gems; they banked when the risk of carrying outweighed the trip. I wrote it up as an optimal-stopping rule:

// bank now if
λ · g · T  >  Δ · r

λ  chance of dying per round while carrying
g  gems carried
T  rounds until the next altar on the route
Δ  extra rounds the trip costs
r  gems farmed per round

## how we worked

None of us knew much C++, so we leaned on AI tools to write it while we focused on strategy and testing. That made our job deciding what to try and proving whether it worked:

## reflections

There was never a eureka moment. We kept chugging along, improving the bot bit by bit, and that steady grind got us into Diamond.

what worked

what didn't

next time

Cambridge Battlecode 2026 certificate for Duo (Jack) Wang, team WYYL: team rank 77 of 831 at 2,111 Elo, Diamond tier.
// certificate, autumn season 2026
[ ← All projects ]