CONTROLLER
Claude Haiku 4.5.
Anthropic · thinking max · written with Claude Code · iterative. One file, one tick export, no imports.
Result in the published standings
RANK 06 OF 11| Field | Value |
|---|---|
| Bradley–Terry strength | 87.8 |
| 95% CI | 68.4 – 109.9 |
| Matches | 200 |
| W / D / L | 93 / 16 / 91 |
| Score % | 50.5% |
| Flip differential | +14 |
| Ring-outs inflicted / taken | 20 / 12 |
| Mean energy | 38.7 |
| Mean first contact | 2.2 s |
| Violations per match | 0.00 |
| Timeouts | 0 |
Play style
ENERGY BURN| Axis | Value |
|---|---|
| Aggression | 42% |
| Pressure | 73% |
| Wedge control | 78% |
| Mobility | 1.12 m/s |
| Edge play | 6% |
| Energy burn | 13.7/s |
Source metrics
PARSED, NEVER EXECUTED| Field | Value |
|---|---|
| Language | JavaScript |
| Total lines | 65 |
| Code lines | 54 |
| Comment lines | 0 |
| Functions | 1 |
| Statements | 57 |
| Cyclomatic complexity | 26 |
| Max nesting | 5 |
| Size | 1.9 kB |
| SHA-256 | 1125007f1a4992b64b061c1a1b05f7ac734d275d72aef86e739bad9a71599871 |
Source
/home/runner/work/llms-robot-arena/llms-robot-arena/packages/bots/haiku-4-5-max.jsexport function tick(s, m) {
const dx = s.opponent.x - s.self.x;
const dy = s.opponent.y - s.self.y;
const distance = Math.hypot(dx, dy);
const bearing = Math.atan2(dy, dx);
let err = bearing - s.self.heading;
while (err > Math.PI) err -= 2 * Math.PI;
while (err < -Math.PI) err += 2 * Math.PI;
const energy = s.self.energy;
const halfExt = s.arena.halfExtent;
let closestRecharge = null;
let minRechargeDistance = Infinity;
for (const cell of s.arena.cells) {
if (cell.type === 'recharge' && cell.state === 'ready') {
const cdx = cell.x - s.self.x;
const cdy = cell.y - s.self.y;
const cdist = Math.hypot(cdx, cdy);
if (cdist < minRechargeDistance) {
minRechargeDistance = cdist;
closestRecharge = { x: cell.x, y: cell.y };
}
}
}
let shouldRecharge = (energy < 100 && closestRecharge && minRechargeDistance < 6) ||
(energy < 30 && closestRecharge);
let targetBearing = bearing;
if (shouldRecharge && closestRecharge) {
targetBearing = Math.atan2(closestRecharge.y - s.self.y, closestRecharge.x - s.self.x);
}
let targetErr = targetBearing - s.self.heading;
while (targetErr > Math.PI) targetErr -= 2 * Math.PI;
while (targetErr < -Math.PI) targetErr += 2 * Math.PI;
let thrust = 0;
if (s.self.status === 'active') {
const absErr = Math.abs(targetErr);
if (shouldRecharge && closestRecharge) {
if (absErr < 0.5) thrust = 0.9;
else if (absErr < 1.0) thrust = 0.5;
else thrust = 0.2;
} else {
if (absErr < 0.3) thrust = energy > 150 ? 1.0 : (energy > 80 ? 0.8 : 0.5);
else if (absErr < 0.6) thrust = 0.5;
else thrust = 0.2;
}
if (Math.abs(s.self.x) > halfExt - 1.5 || Math.abs(s.self.y) > halfExt - 1.5) {
thrust *= 0.5;
}
}
let turn = Math.max(-1, Math.min(1, targetErr * 1.5));
return {
actions: { thrust, turn },
memory: null,
};
}
Load this controller in the arena, or read the rules it plays under in the spec.