Defender

id_gated_shell_breaker

rank #28Elo 1022house league, persona exploiter2026-11-30_defender_id_gated_shell_breaker

Idea: Ignore everything radar cannot identify, then put exactly one interceptor on each identified striker the moment the shell crosses id range, with neighbour-weighted aim points, miss re-coverage, and a gun that fires only at strikers no interceptor will reach in time.

Weakness exploited ------------------ 2026-11-21_attacker_orbit_hold_picket_drain_ring is built to beat defenders that spend interceptors on unknown tracks or on parked hovers. Its opening "picket" is 16 pure decoys. Its main shell is about 23 strikers mixed with about 12 decoys, released at once from an orbit outside radar. Two things in its own plan work against it:

  1. The picket has no damage at all. A defender that never launches at "unknown" or "decoy" tracks loses nothing to it. The whole drain does not happen.
  2. Because the shell is synchronized, every striker crosses id range (150) in the same few ticks. That leaves about 31 ticks before impact at 4 units/tick. At 2 launches per tick, all 20 interceptors are in the air within 10 ticks. They meet the shell around radius 85-112, well before it is dense enough to saturate anything. Misses (pk 0.85) are seen as surviving uncovered strikers and get re-covered by retargeting. The gun cleans up the rest at short range.

Asset hp is 30 and strikers do 10, so the attacker needs 3 strikers through. The pairing "orbit_hold_picket_drain_ring vs gun_only" (mean score_defender 0.264) shows how thin its margin is. In the seed 0 breach, the gun alone, firing at decoys and strikers indiscriminately, killed 5 strikers and launched no interceptors at all. The same pairing shows that the picket only reached the asset (decoy impacts at ticks 117-119) and did nothing. Every point of damage came from the single tick-203 shell, which is exactly what this bot spends its whole magazine on.

Deterministic, standard library only, constant work per track. Never raises.

61.0%win rate
0.60cost exchange
310matches
night 57first night (2026-11-30)
Best match
vs hover_expiry_feint_collapse · its score 0.776 · seed 5 · open →
Worst match
vs interleaved_shell_ring · its score 0.106 · seed 3 · open →

Matches

last night
OpponentSeedResultScore
staggered_screen_trickle9defended0.730watch
synchronized_ring9breached0.144watch
phase_locked_ring9breached0.127watch
depth_shell_saturation9defended0.769watch
interleaved_shell_ring9breached0.145watch
staggered_trishell_blast_denial9breached0.150watch
shadow_pair_ring9defended0.739watch
blast_proof_depth_interleave9breached0.144watch
column_free_tiered_ring_dive9defended0.767watch
2026_10_15_attacker_dark_ring_release9defended0.738watch
Record · 2026-11-30_defender_id_gated_shell_breaker.meta.json
backendcli
date2026-11-30
dry_runFalse
escalationFalse
evidencebudget: 1500, dropped: [], included: ['lopsided', 'target_doc'], used: 860
modelopus
name2026-11-30_defender_id_gated_shell_breaker
personaexploiter
prompt_version2026-10-03.1
raw_responseout/house_raw/2026-11-30T033311_cli_defender_exploiter.md
resultbeat_target: True, field_mean: 0.477, rank: 22, score_vs_target: 0.77
roledefender
target2026-11-21_attacker_orbit_hold_picket_drain_ring
tokensinput: 3640, output: 8376
Source · bots/house/2026-11-30_defender_id_gated_shell_breaker.py
"""Idea: Ignore everything radar cannot identify, then put exactly one interceptor on each identified striker the moment the shell crosses id range, with neighbour-weighted aim points, miss re-coverage, and a gun that fires only at strikers no interceptor will reach in time.

Weakness exploited
------------------
2026-11-21_attacker_orbit_hold_picket_drain_ring is built to beat defenders
that spend interceptors on unknown tracks or on parked hovers. Its opening
"picket" is 16 pure decoys. Its main shell is about 23 strikers mixed with
about 12 decoys, released at once from an orbit outside radar. Two things in
its own plan work against it:

  1. The picket has no damage at all. A defender that never launches at
     "unknown" or "decoy" tracks loses nothing to it. The whole drain does
     not happen.
  2. Because the shell is synchronized, every striker crosses id range
     (150) in the same few ticks. That leaves about 31 ticks before impact
     at 4 units/tick. At 2 launches per tick, all 20 interceptors are in the
     air within 10 ticks. They meet the shell around radius 85-112, well
     before it is dense enough to saturate anything. Misses (pk 0.85) are
     seen as surviving uncovered strikers and get re-covered by retargeting.
     The gun cleans up the rest at short range.

Asset hp is 30 and strikers do 10, so the attacker needs 3 strikers through.
The pairing "orbit_hold_picket_drain_ring vs gun_only" (mean score_defender
0.264) shows how thin its margin is. In the seed 0 breach, the gun alone,
firing at decoys and strikers indiscriminately, killed 5 strikers and launched
no interceptors at all. The same pairing shows that the picket only reached
the asset (decoy impacts at ticks 117-119) and did nothing. Every point of
damage came from the single tick-203 shell, which is exactly what this bot
spends its whole magazine on.

Deterministic, standard library only, constant work per track. Never raises.
"""

import math

NAME = "id_gated_shell_breaker"
ROLE = "defender"


def reset(seed=None):
    return None


def _empty():
    return {"intercept": [], "retarget": {}, "gun": None}


def _norm(p):
    try:
        return math.hypot(float(p[0]), float(p[1]))
    except Exception:
        return 1e9


def _dist(a, b):
    try:
        return math.hypot(float(a[0]) - float(b[0]), float(a[1]) - float(b[1]))
    except Exception:
        return 1e9


def _sort_key(x):
    try:
        return (0, float(x))
    except Exception:
        return (1, str(x))


def _act(obs):
    rules = obs.get("rules", {}) or {}
    launches_cap = int(rules.get("interceptor_launches_per_tick", 2))
    gun_range = float(rules.get("gun_range", 100.0))
    blast = float(rules.get("blast_radius", 10.0))
    icpt_speed = float(rules.get("interceptor_speed", 12.0))
    drone_speed = float(rules.get("striker_speed", 4.0))
    asset_r = float((obs.get("asset", {}) or {}).get("radius", rules.get("asset_radius", 25.0)))
    lifetime = int(rules.get("interceptor_lifetime", 90))

    stock = int(obs.get("stock", 0) or 0)
    ammo = int(obs.get("ammo", 0) or 0)

    tracks = obs.get("tracks", []) or []
    tby = {}
    for t in tracks:
        try:
            tby[t["id"]] = t
        except Exception:
            pass

    def rng(t):
        r = t.get("range")
        if r is None:
            return _norm(t.get("pos", (0, 0)))
        try:
            return float(r)
        except Exception:
            return _norm(t.get("pos", (0, 0)))

    strikers = [t for t in tracks if t.get("cls") == "striker"]
    unknowns = [t for t in tracks if t.get("cls") == "unknown"]
    strikers.sort(key=lambda t: (rng(t), _sort_key(t.get("id"))))

    # Count striker neighbours to weight aim points that may give a double kill.
    neigh = {}
    for i, a in enumerate(strikers):
        c = 0
        pa = a.get("pos", (0, 0))
        for j, b in enumerate(strikers):
            if i != j and _dist(pa, b.get("pos", (0, 0))) <= 1.6 * blast:
                c += 1
        neigh[a["id"]] = c

    # Coverage from interceptors that are already in the air.
    cover = {}
    cover_dist = {}
    free_icpts = []
    for ic in obs.get("interceptors", []) or []:
        try:
            tid = ic.get("target")
            age = int(ic.get("age", 0) or 0)
            if age >= lifetime - 1:
                continue
            t = tby.get(tid)
            if t is not None and t.get("cls") != "decoy":
                cover[tid] = cover.get(tid, 0) + 1
                d = _dist(ic.get("pos", (0, 0)), t.get("pos", (0, 0)))
                if d < cover_dist.get(tid, 1e9):
                    cover_dist[tid] = d
            else:
                free_icpts.append(ic)
        except Exception:
            pass

    retarget = {}
    # Re-aim interceptors whose target is gone or turned out to be a decoy.
    free_icpts.sort(key=lambda ic: _sort_key(ic.get("id")))
    for ic in free_icpts:
        if not strikers:
            break
        ipos = ic.get("pos", (0, 0))
        age = int(ic.get("age", 0) or 0)
        reach = max(0.0, (lifetime - age) * icpt_speed)
        best = None
        best_s = None
        for t in strikers:
            d = _dist(ipos, t.get("pos", (0, 0)))
            if d > reach + 4 * drone_speed:
                continue
            s = d + 1000.0 * cover.get(t["id"], 0)
            if best_s is None or s < best_s:
                best_s, best = s, t
        if best is not None:
            retarget[ic.get("id")] = best["id"]
            cover[best["id"]] = cover.get(best["id"], 0) + 1
            d = _dist(ipos, best.get("pos", (0, 0)))
            if d < cover_dist.get(best["id"], 1e9):
                cover_dist[best["id"]] = d

    # Launch at uncovered strikers, most urgent first, favouring clustered ones.
    intercept = []
    n_launch = min(launches_cap, stock)
    if n_launch > 0 and strikers:
        cand = [t for t in strikers if cover.get(t["id"], 0) == 0]
        cand.sort(key=lambda t: (rng(t) - 15.0 * neigh.get(t["id"], 0), _sort_key(t["id"])))
        for t in cand:
            if len(intercept) >= n_launch:
                break
            # Skip strikers the gun will almost surely finish before an interceptor arrives.
            if rng(t) < asset_r + 2 * drone_speed:
                continue
            intercept.append(t["id"])
            cover[t["id"]] = 1
            cover_dist[t["id"]] = rng(t)
        # Double cover only when spare stock is clearly larger than any remaining threat.
        spare = stock - len(intercept)
        reserve = int(0.7 * len(unknowns)) + 1
        if len(intercept) < n_launch and spare > reserve:
            cand2 = [t for t in strikers if cover.get(t["id"], 0) == 1]
            cand2.sort(key=lambda t: (rng(t), _sort_key(t["id"])))
            for t in cand2:
                if len(intercept) >= n_launch or stock - len(intercept) <= reserve:
                    break
                intercept.append(t["id"])
                cover[t["id"]] = 2

    # Gun: strikers only, prefer those no interceptor will reach in time.
    gun = None
    if ammo > 0:
        best_s = None
        for t in strikers:
            r = rng(t)
            if r > gun_range:
                continue
            tti = max(0.0, (r - asset_r) / drone_speed)
            s = r
            if cover.get(t["id"], 0) > 0:
                d = cover_dist.get(t["id"], 1e9)
                eta = d / (icpt_speed + drone_speed)
                if eta < tti - 1 and r > asset_r + 3 * drone_speed:
                    s += 200.0
            if best_s is None or s < best_s:
                best_s, gun = s, t["id"]
        if gun is None:
            best_r = None
            for t in unknowns:
                r = rng(t)
                if r <= gun_range and (best_r is None or r < best_r):
                    best_r, gun = r, t["id"]

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


def act(obs):
    try:
        out = _act(obs)
        if not isinstance(out, dict):
            return _empty()
        return out
    except Exception:
        return _empty()