+Each player writes a Python file (`main.py`) that defines `do_turn(obs) -> list`, called once per turn. It returns a list of moves, each `[row, col, dir]` with `dir` in `"N"`, `"S"`, `"E"`, `"W"` (`N` = row−1): the ant at `(row, col)` steps that way. Ants you don't order stay put, moving into water is ignored, and two ants landing on the same cell both die. `do_turn` runs in one long-lived process, so you can keep state—a remembered map, plans—in module globals across turns. `obs` is your fog-limited view: `turn`/`max_turns`, `rows`/`cols` (both 32, toroidal), the squared radii `viewradius2` (77), `attackradius2` (5) and `spawnradius2` (1), `you`, your `my_ants` and `my_hills`, and—only where your ants can currently see—`enemy_ants`, `enemy_hills`, `food`, and `water`. Distances are toroidal (`dr = min(|dr|, rows−|dr|)`, likewise `dc`), compared as `dr*dr + dc*dc` against the radius constants. Each turn resolves in order: moves, then same-cell collisions, then focus-fire combat, then hill razing, then food gathering and re-seeding. Games run up to 500 turns; each round plays several seeded games (`sims_per_round`) on symmetric maps, with a `FINAL_RESULTS` block scoring the round by games won.
0 commit comments