Defender

split_leftover_far_engage_gun_deadline

rank #54Elo 939house league, persona counter_meta2026-12-01_defender_split_leftover_far_engage_gun_deadline

Idea: Spend all 20 rounds far out where the ring's jink cannot trigger, keep the leftover strikers split evenly across its two release groups so the gun gets the full stagger window, and send orphaned rounds to unserved tracks instead of wasting them.

Target: the release and jink logic in veiled_full_ring_blastproof_split.

That bot puts all 30 strikers in a ring at radius ~475. It releases them in two half-rings 3 ticks apart, so every striker arrives within about a 4-tick window. Its jink only fires when an interceptor is within 50 of a striker AND a neighbour is within 18. Neighbouring strikers sit at 12 degrees with a 12-unit radial offset, so that neighbour test can only pass inside radius ~64. Above that the strikers fly straight radial lines and are easy kills.

What the replays show:

  • Both close calls were held with zero impacts. The two defenders used all 20 rounds (17 and 19 kills) and the gun added 11 and 13 kills from only 25 shots.
  • So the outcome depends on two things. Every round must connect with a fresh target, and the gun must spend every tick it has on the strikers that are left.
  • The gun fires once per tick. If the leftovers all belong to one release group, they arrive together and the gun has only ~19 ticks. If the leftovers are split across the two groups, the 3-tick stagger adds gun ticks.

How this bot plays it:

  1. Engage every track as soon as it crosses the radar edge (r~450). Interceptions then happen near r~330, far outside the jink zone, so the evasion never activates.
  2. Use one round per track and no cluster rule. This bot never assumes a blast kills two strikers, so it never marks a striker as collateral-covered and then leaves it unserved.
  3. Pick targets by radial band so the unserved strikers are split between the leading and trailing half-rings. This stretches the gun window.
  4. Retarget any interceptor whose target has disappeared, or turned out to be a decoy, to the nearest unserved track. Rounds are not lost to targets that already died.
  5. Gun: shoot the nearest in-range track by deadline. Skip any track that an interceptor is about to hit, so no gun tick is wasted on a striker that is already being killed.
54.8%win rate
0.54cost exchange
310matches
night 58first night (2026-12-01)
Best match
vs rush · its score 0.771 · seed 9 · open →
Worst match
vs bait_count_then_clear_sky_wave · its score 0.036 · seed 0 · open →

Matches

last night
OpponentSeedResultScore
staggered_screen_trickle9defended0.742watch
synchronized_ring9breached0.140watch
phase_locked_ring9breached0.150watch
depth_shell_saturation9defended0.771watch
interleaved_shell_ring9defended0.767watch
staggered_trishell_blast_denial9breached0.141watch
shadow_pair_ring9defended0.762watch
blast_proof_depth_interleave9defended0.769watch
column_free_tiered_ring_dive9defended0.763watch
2026_10_15_attacker_dark_ring_release9breached0.072watch
Record · 2026-12-01_defender_split_leftover_far_engage_gun_deadline.meta.json
backendcli
date2026-12-01
dry_runFalse
escalationFalse
evidencebudget: 4000, dropped: ['row'], included: ['source', 'closest'], used: 2851
modelopus
name2026-12-01_defender_split_leftover_far_engage_gun_deadline
personacounter_meta
prompt_version2026-10-03.1
raw_responseout/house_raw/2026-12-01T033316_cli_defender_counter_meta.md
resultbeat_target: False, field_mean: 0.433, rank: 52, score_vs_target: 0.141
roledefender
target2026-11-12_attacker_veiled_full_ring_blastproof_split
tokensinput: 6456, output: 11951
Source · bots/house/2026-12-01_defender_split_leftover_far_engage_gun_deadline.py
"""Idea: Spend all 20 rounds far out where the ring's jink cannot trigger, keep the leftover strikers split evenly across its two release groups so the gun gets the full stagger window, and send orphaned rounds to unserved tracks instead of wasting them.

Target: the release and jink logic in veiled_full_ring_blastproof_split.

That bot puts all 30 strikers in a ring at radius ~475. It releases them in two half-rings
3 ticks apart, so every striker arrives within about a 4-tick window. Its jink only fires when
an interceptor is within 50 of a striker AND a neighbour is within 18. Neighbouring strikers
sit at 12 degrees with a 12-unit radial offset, so that neighbour test can only pass inside
radius ~64. Above that the strikers fly straight radial lines and are easy kills.

What the replays show:
- Both close calls were held with zero impacts. The two defenders used all 20 rounds
  (17 and 19 kills) and the gun added 11 and 13 kills from only 25 shots.
- So the outcome depends on two things. Every round must connect with a fresh target, and
  the gun must spend every tick it has on the strikers that are left.
- The gun fires once per tick. If the leftovers all belong to one release group, they arrive
  together and the gun has only ~19 ticks. If the leftovers are split across the two groups,
  the 3-tick stagger adds gun ticks.

How this bot plays it:
1. Engage every track as soon as it crosses the radar edge (r~450). Interceptions then happen
   near r~330, far outside the jink zone, so the evasion never activates.
2. Use one round per track and no cluster rule. This bot never assumes a blast kills two
   strikers, so it never marks a striker as collateral-covered and then leaves it unserved.
3. Pick targets by radial band so the unserved strikers are split between the leading and
   trailing half-rings. This stretches the gun window.
4. Retarget any interceptor whose target has disappeared, or turned out to be a decoy, to the
   nearest unserved track. Rounds are not lost to targets that already died.
5. Gun: shoot the nearest in-range track by deadline. Skip any track that an interceptor is
   about to hit, so no gun tick is wasted on a striker that is already being killed.
"""

import math

NAME = "split_leftover_far_engage_gun_deadline"
ROLE = "defender"

_S = {}


def reset(seed=None):
    _S.clear()


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


def _xy(p):
    try:
        return float(p[0]), float(p[1])
    except Exception:
        return 0.0, 0.0


def _act(obs):
    rules = obs.get("rules", {}) or {}
    asset = obs.get("asset", {}) or {}
    ax, ay = _xy(asset.get("pos") or [0.0, 0.0])
    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))
    i_speed = float(rules.get("interceptor_speed", 12.0))

    tmap = {}
    for t in tracks:
        tid = t.get("id")
        if tid is None:
            continue
        x, y = _xy(t.get("pos") or [0.0, 0.0])
        r = t.get("range")
        try:
            r = float(r)
        except Exception:
            r = math.hypot(x - ax, y - ay)
        tmap[tid] = (x, y, r, t.get("cls", "unknown"))

    def hostile(tid):
        return tmap[tid][3] != "decoy"

    served = {}
    imminent = set()
    retarget = {}
    orphans = []
    for it in inters:
        iid = it.get("id")
        tgt = it.get("target")
        ix, iy = _xy(it.get("pos") or [ax, ay])
        if tgt in tmap and hostile(tgt):
            served[tgt] = served.get(tgt, 0) + 1
            tx, ty = tmap[tgt][0], tmap[tgt][1]
            if math.hypot(tx - ix, ty - iy) < 2.0 * i_speed:
                imminent.add(tgt)
        else:
            orphans.append((iid, ix, iy))

    # Retarget orphaned interceptors to nearest unserved hostile tracks.
    for iid, ix, iy in orphans:
        best, bd = None, None
        for tid, (x, y, r, c) in tmap.items():
            if c == "decoy" or served.get(tid, 0) > 0:
                continue
            d = math.hypot(x - ix, y - iy)
            if bd is None or d < bd:
                best, bd = tid, d
        if best is not None and iid is not None:
            retarget[iid] = best
            served[best] = served.get(best, 0) + 1

    # Launch: balance leftovers across radial bands (release groups).
    intercept = []
    n_launch = max(0, min(cap, stock))
    if n_launch > 0:
        cands = [tid for tid in tmap if hostile(tid) and served.get(tid, 0) == 0
                 and tmap[tid][2] > 30.0]
        band_w = 6.0
        for _ in range(n_launch):
            if not cands:
                break
            bands = {}
            for tid in cands:
                b = int(tmap[tid][2] // band_w)
                bands.setdefault(b, []).append(tid)
            # Merge adjacent-band noise: count per band including neighbours lightly.
            best_b, best_key = None, None
            for b, lst in bands.items():
                cnt = len(lst) + 0.5 * (len(bands.get(b - 1, [])) + len(bands.get(b + 1, [])))
                key = (cnt, -b)
                if best_key is None or key > best_key:
                    best_b, best_key = b, key
            lst = sorted(bands[best_b], key=lambda k: (tmap[k][3] != "striker", tmap[k][2], str(k)))
            pick = lst[0]
            intercept.append(pick)
            served[pick] = 1
            cands.remove(pick)

    # Gun: earliest deadline, skip tracks about to be hit by an interceptor.
    gun = None
    if ammo > 0:
        inr = [tid for tid in tmap if hostile(tid) and tmap[tid][2] <= gun_range]
        if inr:
            pref = [tid for tid in inr if tid not in imminent]
            pool = pref if pref else inr
            pool.sort(key=lambda k: (tmap[k][2], str(k)))
            gun = pool[0]

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