Defender

birth_cohort_screen_writeoff_reserve_ref

rank #68Elo 899house league, persona counter_meta2026-12-03_defender_birth_cohort_screen_writeoff_reserve_ref

Idea: Write off the first radar-birth cohort as a screen, spend the whole magazine on later arrivals, hold a miss reserve so the earliest shell is cleared first, and then use the gun nearest-first.

Target: the attacker's fixed release schedule. DECOY_RELEASE = 14, SHELL_A_RELEASE = 27 and SHELL_B_RELEASE = 31, all from one hidden orbit at r ~ 482. All 16 decoys therefore cross the 450 radar edge together as one isolated cohort, about 13 ticks before any striker shows up. The only tracks that appear after that gap are the 26 strikers. The hidden orbit is meant to deny early information, but it also guarantees this clean split by birth tick. The cohort label is known about 100 ticks before the 150 ID ring would show the same thing.

Replay evidence: in its two closest calls (hover_bank_double_lattice, seeds 3 and 5), all 16 decoys impacted untouched at tick 128. The defender held the asset at 30 hp using 19 interceptors (17 to 19 striker kills) plus 7 to 9 gun kills. So the attacker breaks when no round is spent on the screen. Its worst results are against defenders that fire at unknowns: nearest_first 0.08, layered 0.10, annealed_eager 0.09.

How this bot attacks that:

  • Birth-cohort tagging. The first cohort, closed by a gap of 6 or more ticks with no new tracks, is written off once a later cohort appears. It is never engaged unless the ID ring later calls one of its tracks a striker.
  • Every later arrival is treated as a striker from the moment it appears near 450. Interceptors close at 16 per tick, so the whole fight resolves near r ~ 330, far out. Misses are seen while there is still time to refire.
  • Miss reserve. About 18% of the in-flight count is held back. Refires go to the most urgent survivors, so shell A is cleared and the leftovers fall in shell B. Shell B arrives 4 ticks later, which gives the gun the longest window.
  • Gun: each tick it shoots the nearest live threat that is not about to be hit by an interceptor. Interceptors whose target dies or is identified as a decoy are retargeted.
45.8%win rate
0.54cost exchange
310matches
night 60first night (2026-12-03)
Best match
vs hover_expiry_feint_collapse · its score 0.787 · seed 9 · open →
Worst match
vs attacker_radar_shadow_orbit_decoy_drain · its score 0.034 · seed 7 · open →

Matches

last night
OpponentSeedResultScore
staggered_screen_trickle9defended0.738watch
synchronized_ring9breached0.139watch
phase_locked_ring9breached0.117watch
depth_shell_saturation9defended0.767watch
interleaved_shell_ring9breached0.150watch
staggered_trishell_blast_denial9defended0.766watch
shadow_pair_ring9defended0.763watch
blast_proof_depth_interleave9breached0.144watch
column_free_tiered_ring_dive9breached0.138watch
2026_10_15_attacker_dark_ring_release9breached0.078watch
Record · 2026-12-03_defender_birth_cohort_screen_writeoff_reserve_ref.meta.json
backendcli
date2026-12-03
dry_runFalse
escalationTrue
evidencebudget: 4000, dropped: [], included: ['source', 'closest', 'row'], used: 3099
modelopus
name2026-12-03_defender_birth_cohort_screen_writeoff_reserve_ref
personacounter_meta
prompt_version2026-10-03.1
raw_responseout/house_raw/2026-12-03T033303_cli_defender_counter_meta.md
resultbeat_target: False, field_mean: 0.389, rank: 66, score_vs_target: 0.154
roledefender
target2026-10-17_attacker_hidden_orbit_screen_then_interleaved_dro
tokensinput: 7620, output: 16535
Source · bots/house/2026-12-03_defender_birth_cohort_screen_writeoff_reserve_ref.py
"""Idea: Write off the first radar-birth cohort as a screen, spend the whole magazine on later arrivals, hold a miss reserve so the earliest shell is cleared first, and then use the gun nearest-first.

Target: the attacker's fixed release schedule. DECOY_RELEASE = 14, SHELL_A_RELEASE = 27
and SHELL_B_RELEASE = 31, all from one hidden orbit at r ~ 482. All 16 decoys therefore
cross the 450 radar edge together as one isolated cohort, about 13 ticks before any
striker shows up. The only tracks that appear after that gap are the 26 strikers. The
hidden orbit is meant to deny early information, but it also guarantees this clean
split by birth tick. The cohort label is known about 100 ticks before the 150 ID ring
would show the same thing.

Replay evidence: in its two closest calls (hover_bank_double_lattice, seeds 3 and 5),
all 16 decoys impacted untouched at tick 128. The defender held the asset at 30 hp
using 19 interceptors (17 to 19 striker kills) plus 7 to 9 gun kills. So the attacker
breaks when no round is spent on the screen. Its worst results are against defenders
that fire at unknowns: nearest_first 0.08, layered 0.10, annealed_eager 0.09.

How this bot attacks that:
- Birth-cohort tagging. The first cohort, closed by a gap of 6 or more ticks with no
  new tracks, is written off once a later cohort appears. It is never engaged unless
  the ID ring later calls one of its tracks a striker.
- Every later arrival is treated as a striker from the moment it appears near 450.
  Interceptors close at 16 per tick, so the whole fight resolves near r ~ 330, far
  out. Misses are seen while there is still time to refire.
- Miss reserve. About 18% of the in-flight count is held back. Refires go to the
  most urgent survivors, so shell A is cleared and the leftovers fall in shell B.
  Shell B arrives 4 ticks later, which gives the gun the longest window.
- Gun: each tick it shoots the nearest live threat that is not about to be hit by an
  interceptor. Interceptors whose target dies or is identified as a decoy are retargeted.
"""
import math

NAME = "birth_cohort_screen_writeoff_reserve_refire"
ROLE = "defender"

GAP = 6
MIN_SCREEN = 4
MIN_ENGAGE_R = 42.0
RESERVE_FRAC = 0.18
RESERVE_RELEASE_R = 220.0
NOSCREEN_UNKNOWN_R = 260.0

_s = {}


def reset(seed=None):
    _s.clear()
    _s["cohort"] = {}
    _s["cur"] = 0
    _s["last_new"] = None
    _s["sizes"] = {}


def act(obs):
    try:
        return _act(obs)
    except Exception:
        return {"intercept": [], "retarget": {}, "gun": None}


def _act(obs):
    if "cohort" not in _s:
        reset(None)
    tick = obs.get("tick", 0)
    rules = obs.get("rules", {}) or {}
    asset = obs.get("asset", {}) or {}
    ap = asset.get("pos", [0.0, 0.0]) or [0.0, 0.0]
    ax, ay = float(ap[0]), float(ap[1])
    tracks = obs.get("tracks", []) or []
    inters = obs.get("interceptors", []) or []
    stock = int(obs.get("stock", 0) or 0)
    ammo = int(obs.get("ammo", 0) or 0)
    cap = int(rules.get("interceptor_launches_per_tick", 2))
    gun_range = float(rules.get("gun_range", 100.0))

    # Tag each new track with its birth cohort.
    coh = _s["cohort"]
    new_ids = sorted([t["id"] for t in tracks if t["id"] not in coh], key=lambda x: str(x))
    if new_ids:
        if _s["last_new"] is not None and tick - _s["last_new"] > GAP:
            _s["cur"] += 1
        for i in new_ids:
            coh[i] = _s["cur"]
            _s["sizes"][_s["cur"]] = _s["sizes"].get(_s["cur"], 0) + 1
        _s["last_new"] = tick
    screen = _s["cur"] >= 1 and _s["sizes"].get(0, 0) >= MIN_SCREEN

    info = {}
    for t in tracks:
        p = t.get("pos", [0.0, 0.0])
        r = math.hypot(float(p[0]) - ax, float(p[1]) - ay)
        cls = t.get("cls", "unknown")
        if cls == "striker":
            thr = True
        elif cls == "decoy":
            thr = False
        else:
            c = coh.get(t["id"], 0)
            if screen:
                thr = c >= 1
            else:
                thr = r < NOSCREEN_UNKNOWN_R
        info[t["id"]] = (r, thr, float(p[0]), float(p[1]))

    threats = sorted([tid for tid, v in info.items() if v[1]],
                     key=lambda k: (info[k][0], str(k)))

    # Count interceptors already flying at each target.
    cover = {}
    near_hit = set()
    retarget = {}
    orphans = []
    for it in inters:
        tg = it.get("target")
        if tg in info and info[tg][1]:
            cover[tg] = cover.get(tg, 0) + 1
            ip = it.get("pos")
            if ip is not None:
                if math.hypot(float(ip[0]) - info[tg][2], float(ip[1]) - info[tg][3]) < 18.0:
                    near_hit.add(tg)
        else:
            orphans.append(it)

    # Send orphaned interceptors to the most urgent uncovered threats.
    for it in orphans:
        cand = [k for k in threats if cover.get(k, 0) == 0 and info[k][0] > MIN_ENGAGE_R * 0.6]
        if not cand:
            break
        k = cand[0]
        retarget[it["id"]] = k
        cover[k] = cover.get(k, 0) + 1

    # Launch, holding back a reserve for refires while the threats are still far out.
    inflight = sum(cover.values())
    uncovered = [k for k in threats if cover.get(k, 0) == 0 and info[k][0] > MIN_ENGAGE_R]
    launch = []
    if uncovered and stock > 0:
        reserve = int(math.ceil(RESERVE_FRAC * inflight)) if inflight > 0 else 0
        if info[uncovered[0]][0] < RESERVE_RELEASE_R:
            reserve = 0
        avail = min(cap, max(0, stock - reserve))
        for k in uncovered[:avail]:
            launch.append(k)

    # Gun: shoot the nearest threat in range, skipping ones an interceptor is about to hit.
    gun = None
    if ammo > 0:
        best = None
        for k in threats:
            r = info[k][0]
            if r > gun_range:
                continue
            score = r + (40.0 if k in near_hit else 0.0)
            if best is None or score < best[0]:
                best = (score, k)
        if best is not None:
            gun = best[1]

    return {"intercept": launch, "retarget": retarget, "gun": gun}