{"approach":"The initial 100-run diagnostic found absence of a meaningful quote to be the largest missed competitor retail-notional category. Preserve small main orders known to precede competitor liquidity at its best price when the initial competitor spread is one tick: retain from 0.02 shares rather than two shares. Other spreads keep the baseline threshold. Discovery and independent seeds 6000-6199 gained total and retail edge before code freeze. A 1000-run diagnostic on seeds 4000-4999, enlarged after freeze, gives no_quote fills 228347 before and 226912 after, with notional 1004472.1418000053 before and 997426.266500003 after. Total competitor retail notional is 1310641.0868999984 before and 1310263.6857999975 after; movement into exhausted size is not all recovered flow. Full four-reason counts, passive-side breakdowns, and definitions are in tried. Arithmetic-preserving scan and tail-sum optimizations passed 40000 action-equivalence steps. The code was frozen before full scoring and unseen outcomes; no seed recognition or added dependencies.","blocked":null,"python_version":"3.12.3","base_mean_edge":108.63974289615767,"base_unseen":{"mean_edge":97.54703502577897,"retail_edge":126.92890288111944,"arb_edge":-29.381867855334075},"score":{"mean_edge":98.12665328690635,"retail_edge":125.19559868719257,"arb_edge":-27.068945400300077,"simulations":4000,"seed_start":4000,"failures":0},"holdout":{"mean_edge":97.55851586857251,"retail_edge":126.94005882577865,"arb_edge":-29.381542957199702,"simulations":4000,"seed_start":50000,"failures":0},"diff":{"mean":0.011480842793549996,"standard_error":0.009533915369918038,"retail":0.011155944659200025,"arb":0.000324898134375022},"seconds":{"base":173.78885432262905,"yours":167.29498300235718},"code":"\"\"\"Retain small known FIFO positions in the narrowest competitor spread.\n\nDerived from the crossing-cover baseline. When the competitor's initial spread\nis one tick, an existing main order known to precede competitor liquidity at\nits best price may retain that price with at least 0.02 shares left, rather\nthan requiring two shares. Other spreads retain the original threshold.\nProbability filtering, sizing, inventory funding, and collateral rules follow\nthe baseline. Repeated order scans and zero probability-tail terms are removed\nwithout changing arithmetic or action semantics.\n\"\"\"\nimport math\nfrom orderbook_pm_challenge.strategy import BaseStrategy\nfrom orderbook_pm_challenge.types import CancelOrder, PlaceOrder, Side\n\nP = dict(lam_r=0.25, m=5.0, sig_n=1.2, lam_j=0.0019, sig_j=0.35, sig=0.02,\n         qmax=3000.0, rmin=2, kA=0.7, kL=0.15, pL=0.05,\n         ammo=1.0, ydem=0.4, W=200.0, fy=0.6, ammo_q=60.0, ammo_pmax=0.05, ammo_maxpay=0.02,\n         fb=0.9, fu=0.7, xu=0.1, sticky=1.0, min_ahead=2.0, keep_hi=1.5, keep_lo=0.7, Hu=300.0, bins=8.0, filt=1.0, uni=0.01, jumpinfo=1.0, dmin=0.0, kLb=0.08, kLf=0.08, pinf=1.0, pre=0.0, H1=100.0,\n         ydf=0.6, Wf=2000.0, g_hi=0.15, g_lo=0.15, qf=400.0, pmaxf=0.05, pre_gap=1.0,\n         ydf1=0.6, g1=5.0, f1=0.6, a1=100.0, nb1=0.0, gs=1.0, p1t=1.0, m1=1.0, zd=1.0, pfl=0.0005)\nSQ2 = math.sqrt(2.0)\nSQ2PI = math.sqrt(2.0 * math.pi)\ndef cdf(x): return 0.5 * (1.0 + math.erf(x / SQ2))\ndef pdf(x): return math.exp(-0.5 * x * x) / SQ2PI\ndef inv(p):\n    p = min(max(p, 1e-9), 1 - 1e-9)\n    t = math.sqrt(-2.0 * math.log(min(p, 1 - p)))\n    x = t - (2.515517 + 0.802853 * t + 0.010328 * t * t) / (1 + 1.432788 * t + 0.189269 * t * t + 0.001308 * t ** 3)\n    x = -x if p < 0.5 else x\n    for _ in range(2):\n        d = pdf(x)\n        if d < 1e-12:\n            break\n        x -= (cdf(x) - p) / d\n    return x\ndef lpm(k):\n    return pdf(k) + k * cdf(k)\ndef fl(q):\n    return math.floor(q * 100 + 1e-9) / 100\n\nNODES = [(-2.2, .06), (-1.3, .17), (-0.6, .27), (0.6, .27), (1.3, .17), (2.2, .06)]\nPROBE = 0.01\n\n\nclass Strategy(BaseStrategy):\n    def __init__(self):\n        self.n = 0\n        self.ahead = set()     # main orders placed strictly ahead of any competitor order at their tick\n        self.res = {}          # order id -> uncovered quantity at placement\n        self.bc = None         # belief: sub-tick grid centres (ticks)\n        self.bw = None         # belief: weights\n        self.st = 0.5          # last one-step sd in ticks\n        self.pcb = self.pca = None\n        self.pb = set()\n        self.pa = set()\n        self.tb = 0\n        self.s = None          # competitor spread parameter\n\n    def _oid(self, tag):\n        self.n += 1\n        return tag + str(self.n)\n\n    def on_step(self, state):\n        H = max(1, state.steps_remaining)\n        cb = state.competitor_best_bid_ticks or 0\n        ca = state.competitor_best_ask_ticks or 100\n        if self.s is None:\n            self.s = max(1, (ca - cb + 1) // 2)\n        lo, hi = cb, ca\n        sb, sa = set(), set()\n        bids, asks = [], []\n        for o in state.own_orders:\n            tiny = o.remaining_quantity <= PROBE + 1e-9\n            if o.side is Side.BUY:\n                lo = max(lo, o.price_ticks)\n                if tiny:\n                    sb.add(o.price_ticks)\n                else:\n                    bids.append(o)\n            else:\n                hi = min(hi, o.price_ticks)\n                if tiny:\n                    sa.add(o.price_ticks)\n                else:\n                    asks.append(o)\n        if P['pinf'] > 0:\n            ea = self.pa - sa\n            eb = self.pb - sb\n            if sa and ea:\n                lo = max(lo, min(max(ea), hi))\n            if eb and (sb or min(eb) <= P['p1t']):\n                hi = min(hi, max(min(eb), lo))\n        if P['jumpinfo'] > 0 and self.pcb is not None:\n            if ca > self.pca + 1:\n                lo = max(lo, ca - 1)\n            if cb < self.pcb - 1:\n                hi = min(hi, cb + 1)\n        self.pcb, self.pca = cb, ca\n        if lo > hi:\n            lo, hi = hi, lo\n        # sub-tick belief over p_(t-1): predict with one-step noise, truncate to [lo, hi]\n        wid = max(hi - lo, 1e-6)\n        nb = max(2, min(48, int(round(wid * P['bins']))))\n        cs = [lo + (i + 0.5) * wid / nb for i in range(nb)]\n        if self.bc is None or P['filt'] <= 0:\n            ws = [1.0 / nb] * nb\n        else:\n            sg = max(self.st, 0.6 * wid / nb)\n            k = -0.5 / (sg * sg)\n            ws = []\n            uni = P['uni'] * sg\n            prior = tuple(zip(self.bc, self.bw))\n            exp = math.exp\n            for c in cs:\n                t = uni\n                for ci, wi in prior:\n                    d = c - ci\n                    d2 = d * d * k\n                    if d2 > -12.5:\n                        t += wi * exp(d2)\n                ws.append(t)\n            tot = sum(ws)\n            ws = [w / tot for w in ws]\n        self.bc, self.bw = cs, ws\n        mean_t = sum(c * w for c, w in zip(cs, ws))\n        var_t = max(sum(c * c * w for c, w in zip(cs, ws)) - mean_t * mean_t, 0.0)\n        phat = min(max(mean_t / 100.0, 0.002), 0.998)\n        var = P['sig'] ** 2 + P['lam_j'] * P['sig_j'] ** 2\n        sd = math.sqrt(H * var)\n        self.tb = self.tb + 1 if hi <= 1 else 0\n        if self.tb > 0 and P['zd'] > 0:\n            # below the last tick there is no probe: the score keeps walking away from it\n            phat = min(phat, max(P['pfl'], cdf(inv(0.01) - P['zd'] * 0.02 * math.sqrt(self.tb) / sd)))\n        z = inv(phat)\n        Z = z * sd\n        sp = pdf(z) / sd * P['sig']\n        self.st = sp * 100.0\n        s = math.sqrt(sp * sp + var_t / 1e4 + 1e-8)\n        sd1 = math.sqrt(max(1.0, H - 1.0) * var)\n        jp = [(cdf((Z + n * P['sig_j']) / sd1), w) for n, w in NODES]\n        lj = P['lam_j']\n\n        def AB(x):\n            k = (x - phat) / s\n            a = s * lpm(k)\n            b = a - (x - phat)\n            ja = sum(w * (x - p) for p, w in jp if x > p)\n            jb = sum(w * (p - x) for p, w in jp if p > x)\n            return (1 - lj) * a + lj * ja, (1 - lj) * b + lj * jb\n\n        if H == 1:\n            def AB(x):\n                return (1 - phat) * x, phat * (1 - x)\n        rho = P['lam_r'] * 0.5\n        mu = math.log(P['m']) - 0.5 * P['sig_n'] ** 2\n        kA = P['kL'] if phat < P['pL'] else P['kA']\n\n        def qsize(loss, gain, px):\n            loss *= kA\n            if gain <= 0:\n                return 0.0\n            tail = loss / (rho * gain)\n            if tail >= 1.0:\n                return 0.0\n            return min(P['qmax'], math.exp(mu + P['sig_n'] * inv(1 - max(tail, 1e-6))) / px)\n\n        ptk = phat * 100\n        def qbid(t):\n            if not 1 <= t <= 99:\n                return 0.0\n            a, b = AB(t / 100.0)\n            if phat * 100 - t < P['dmin']:\n                return 0.0\n            if P['nb1'] > 0 and self.s == 1 and t == 1 and ptk < 1.0:\n                return 0.0\n            if phat < P['pL']:\n                ytg = P['ydem'] * min(H, P['W']) / max(ca - 1, ptk + 1) * 100.0\n                a *= (P['kLb'] if state.yes_inventory < ytg else P['kLf']) / P['kL']\n            return qsize(a, b, max(phat, 0.05))\n\n        def qask(t):\n            if not 1 <= t <= 99:\n                return 0.0\n            a, b = AB(t / 100.0)\n            if t - phat * 100 < P['dmin']:\n                return 0.0\n            return qsize(b, a, t / 100.0)\n\n        sticky = P['sticky'] > 0\n        def top(orders, comp, step):\n            if sticky and sum(o.remaining_quantity for o in orders if o.price_ticks == comp and o.order_id in self.ahead) >= (0.02 if self.s == 1 else P['min_ahead']):\n                return comp\n            return comp + step\n        bid_t = top(bids, cb, 1)\n        ask_t = top(asks, ca, -1)\n        qb = qbid(bid_t)\n        qa = qask(ask_t)\n\n        Y = state.yes_inventory\n        if ask_t == 1 and H > P['H1'] and P['pre'] > 0:\n            qa = qa if Y >= P['a1'] > 0 else 0.0          # let the competitor's 2-tick ask erode instead of fronting it for nothing\n        # ammunition: hold YES so that low asks are covered\n        ptick = phat * 100\n        amt = 0\n        qam = 0.0\n        if P['ammo'] > 0 and ask_t >= 2 and phat < max(P['ammo_pmax'], P['pmaxf']):\n            wealth = state.cash + Y * phat\n            x = max(ask_t, ptick + 1) / 100.0\n            capw = P['fy'] * wealth / max(phat, 0.005)\n            target = min(P['ydem'] * min(H, P['W']) / x, capw)\n            full = min(P['ydf'] * min(H, P['Wf']) / x, capw) if phat < P['pmaxf'] else 0.0\n            t = max(1, min(99, int(math.ceil(ptick + 1e-9))))\n            g = t - ptick\n            if Y < full and g <= P['g_hi'] and bid_t <= t < ask_t:\n                amt, qam = t, min(P['qf'], full - Y)     # a tick p has just crossed: nearly free\n            elif Y < target and phat < P['ammo_pmax'] and bid_t <= t < ask_t and t / 100.0 - phat < P['ammo_maxpay']:\n                amt, qam = t, min(P['ammo_q'], target - Y)\n            elif Y < full and t >= 2 and 1.0 - g <= P['g_lo']:\n                amt, qam = t - 1, min(P['qf'], full - Y)  # rest just under p: filled only on the crossing, or by retail\n\n        if P['pre'] > 0 and ca == 2 and phat < 0.01 and H > P['H1'] and Y < P['pre'] and not qam and 1.0 - ptick < P['pre_gap']:\n            amt, qam = 1, min(P['ammo_q'], P['pre'] - Y)\n        q1 = 0.0\n        if P['ydf1'] > 0 and P['m1'] < ptick < P['g1'] + 1.0 and amt != 1:\n            q1 = max(0.0, P['ydf1'] * min(H, P['Wf']) / (self.s / 100.0) - Y)\n\n        # Bridge expected retail demand until another tick crossing is available.\n        if 0.02 < phat < 0.1:\n            ct = max(2, min(99, int(math.floor(ptick))))\n            wealth = state.cash + Y * phat\n            goal = min(1 * qa, 0.3 * max(wealth, 0.0) / phat)\n            if Y < goal and ct < ask_t:\n                amt, qam = ct, min(3000.0, goal - Y)\n        # order management\n        actions = []\n        free = state.free_cash - 2.0\n        keep_ask = 0.0\n        new_b = []\n        new_a = []\n        def cancel(o):\n            nonlocal free\n            actions.append(CancelOrder(o.order_id))\n            x = o.price_ticks / 100.0\n            if o.side is Side.BUY:\n                free += x * o.remaining_quantity\n            else:\n                free += (1 - x) * min(self.res.get(o.order_id, 0.0), o.remaining_quantity)\n            self.ahead.discard(o.order_id)\n            self.res.pop(o.order_id, None)\n        for o in state.own_orders:\n            if o.remaining_quantity <= PROBE + 1e-9:\n                cancel(o)\n        kept_ids = set()\n        def manage(orders, t, q, comp):\n            kept = 0.0\n            for o in orders:\n                if o.price_ticks == t and q > 0 and kept + o.remaining_quantity <= max(q * P['keep_hi'], 1.0):\n                    kept += o.remaining_quantity\n                    kept_ids.add(o.order_id)\n                else:\n                    cancel(o)\n            return kept\n        kb = manage(bids, bid_t, qb, cb)\n        ka = manage(asks, ask_t, qa, ca)\n        add_b = (qb - kb) if (kb < qb * P['keep_lo'] and bid_t != cb) else 0.0\n        add_a = (qa - ka) if (ka < qa * P['keep_lo'] and ask_t != ca) else 0.0\n\n        budget = P['fb'] * max(free, 0.0)\n        cost = add_b * bid_t / 100.0 + qam * amt / 100.0\n        if cost > budget:\n            f = budget / cost\n            add_b *= f\n            qam *= f\n            cost = budget\n        out = []\n        q1 = min(q1, P['f1'] * max(budget - cost, 0.0) * 100.0)\n        if q1 >= 0.01:\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=1, quantity=fl(q1)))\n            free -= fl(q1) / 100.0 + 1e-6\n        if amt and qam >= 0.01:\n            q = fl(qam)\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=amt, quantity=q))\n            free -= q * amt / 100.0 + 1e-6\n        if bid_t >= 1 and add_b >= 0.01:\n            q = fl(add_b)\n            oid = self._oid('b')\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=bid_t, quantity=q, client_order_id=oid))\n            free -= q * bid_t / 100.0 + 1e-6\n            if bid_t > cb:\n                self.ahead.add(oid)\n        if ask_t <= 99 and add_a >= 0.01:\n            x = ask_t / 100.0\n            covk = sum(o.remaining_quantity - min(self.res.get(o.order_id, 0.0), o.remaining_quantity)\n                       for o in asks if o.order_id in kept_ids)\n            cov = max(0.0, Y - covk - 0.1)\n            unc = max(0.0, add_a - cov)\n            if unc > 0:\n                ub = max(0.0, free - (1 - P['fu']) * max(state.cash, 0.0)) if x >= P['xu'] else 0.0\n                if H < P['Hu'] and phat < 0.05:\n                    ub = max(0.0, free * (1 - H / P['Hu']))\n                unc = min(unc, ub / (1 - x))\n            q = fl(min(add_a, cov + unc))\n            if q >= 0.01:\n                oid = self._oid('a')\n                out.append(PlaceOrder(side=Side.SELL, price_ticks=ask_t, quantity=q, client_order_id=oid))\n                r = max(0.0, q - cov)\n                self.res[oid] = r\n                free -= r * (1 - x) + 1e-6\n                if ask_t < ca:\n                    self.ahead.add(oid)\n\n        # probes: tiny orders that the arbitrageur removes when p crosses them\n        f = int(math.floor(ptick + 1e-9))\n        r = max(int(P['rmin']), int(math.ceil(2.0 * s * 100)))\n        self.pb = set()\n        self.pa = set()\n        if free > 1.0:\n            for t in range(f, f + r + 1):\n                if cb < t < ca and 1 <= t <= 99:\n                    out.append(PlaceOrder(side=Side.BUY, price_ticks=t, quantity=PROBE))\n                    self.pb.add(t)\n            for t in range(f + 1 - r, f + 2):\n                if cb < t < ca and 1 <= t <= 99:\n                    out.append(PlaceOrder(side=Side.SELL, price_ticks=t, quantity=PROBE))\n                    self.pa.add(t)\n        return actions + out\n","code_sha256":"65d8a3994876e19a8846378008dd456cbe1acb10dea90448bba2b1e2b2bc63c6","tried":["Discovery fallback0: Add missing inside-side quote at competitor price behind its queue; subtract $0 assumed queue from marginal optimal size, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":104.848346620469,\"retail_edge\":139.7068387751225,\"arb_edge\":-34.8584921546325,\"diff_mean\":-8.611210539058,\"diff_retail\":1.2072789316519994,\"failures\":0}","Discovery fallback24: Add missing inside-side quote at competitor price behind its queue; subtract $24 assumed queue from marginal optimal size, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.280816251864,\"retail_edge\":138.616552388823,\"arb_edge\":-25.335736136949,\"diff_mean\":-0.17874090766299996,\"diff_retail\":0.11699254535249948,\"failures\":0}","Discovery fallback48: Add missing inside-side quote at competitor price behind its queue; subtract $48 assumed queue from marginal optimal size, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.3774318841115,\"retail_edge\":138.5166432945835,\"arb_edge\":-25.139211410460998,\"diff_mean\":-0.08212527541549877,\"diff_retail\":0.017083451112999276,\"failures\":0}","Discovery fallback72: Add missing inside-side quote at competitor price behind its queue; subtract $72 assumed queue from marginal optimal size, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.36965673446801,\"retail_edge\":138.498942249333,\"arb_edge\":-25.129285514853,\"diff_mean\":-0.0899004250589989,\"diff_retail\":-0.0006175941375002836,\"failures\":0}","Discovery age48floor0: Behind-competitor missing-side fallback, queue estimate max(0,48-0.5*unchanged-best-quote age) dollars, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.2513044630615,\"retail_edge\":138.67448072789801,\"arb_edge\":-25.423176264823,\"diff_mean\":-0.20825269646550004,\"diff_retail\":0.17492088442750064,\"failures\":0}","Discovery age48floor8: Behind-competitor missing-side fallback, queue estimate max(8,48-0.5*unchanged-best-quote age) dollars, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.291211943683,\"retail_edge\":138.6552553935495,\"arb_edge\":-25.364043449852,\"diff_mean\":-0.16834521584400045,\"diff_retail\":0.1556955500789994,\"failures\":0}","Discovery age48floor16: Behind-competitor missing-side fallback, queue estimate max(16,48-0.5*unchanged-best-quote age) dollars, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.32680202252,\"retail_edge\":138.637789039442,\"arb_edge\":-25.3109870169115,\"diff_mean\":-0.13275513700699945,\"diff_retail\":0.1382291959714991,\"failures\":0}","Discovery age72floor8: Behind-competitor missing-side fallback, queue estimate max(8,72-0.5*unchanged-best-quote age) dollars, cap 3000 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.344094122587,\"retail_edge\":138.5186828822895,\"arb_edge\":-25.174588759691503,\"diff_mean\":-0.11546303693999983,\"diff_retail\":0.019123038818999877,\"failures\":0}","Discovery age48small: Behind-competitor missing-side fallback, queue estimate max(8,48-0.5*unchanged-best-quote age) dollars, cap 25 shares; seed_start=4000; simulations=200; {\"mean_edge\":113.396788657697,\"retail_edge\":138.517634607908,\"arb_edge\":-25.120845950196998,\"diff_mean\":-0.0627685018299987,\"diff_retail\":0.01807476443750035,\"failures\":0}","Discovery fallback0small: Behind-competitor missing-side fallback with zero assumed queue and five-share cap; seed_start=4000; simulations=200; {\"mean_edge\":110.943046356824,\"retail_edge\":138.6781932965555,\"arb_edge\":-27.735146939708997,\"diff_mean\":-2.5165108027029985,\"diff_retail\":0.17863345308499884,\"failures\":0}","Discovery sticky002: Retain known main-order FIFO priority at competitor price with 0.02 shares, all initial spread regimes; seed_start=4000; simulations=200; {\"mean_edge\":113.4565373756575,\"retail_edge\":138.4005740975805,\"arb_edge\":-24.94403672192,\"diff_mean\":-0.0030197838694995148,\"diff_retail\":-0.09898574588999969,\"failures\":0}","Discovery sticky01: Retain known main-order FIFO priority at competitor price with 0.1 shares, all initial spread regimes; seed_start=4000; simulations=200; {\"mean_edge\":113.457514948235,\"retail_edge\":138.392956158571,\"arb_edge\":-24.9354412103315,\"diff_mean\":-0.002042211291999538,\"diff_retail\":-0.10660368489949984,\"failures\":0}","Discovery sticky05: Retain known main-order FIFO priority at competitor price with 0.5 shares, all initial spread regimes; seed_start=4000; simulations=200; {\"mean_edge\":113.4388064459045,\"retail_edge\":138.4075724080145,\"arb_edge\":-24.968765962103497,\"diff_mean\":-0.020750713622499,\"diff_retail\":-0.09198743545599916,\"failures\":0}","Discovery sticky1: Retain known main-order FIFO priority at competitor price with 1.0 shares, all initial spread regimes; seed_start=4000; simulations=200; {\"mean_edge\":113.4884308351845,\"retail_edge\":138.491010117201,\"arb_edge\":-25.002579282011503,\"diff_mean\":0.028873675657500167,\"diff_retail\":-0.008549726269499368,\"failures\":0}","Discovery high97q0: Missing-side fallback only for estimated probability >0.97, $0 assumed competitor queue, cap 3000 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.5773263460504,\"retail_edge\":132.2667830796984,\"arb_edge\":-20.689456733692,\"diff_mean\":-0.018096487319199977,\"diff_retail\":0.0022255937087999407,\"failures\":0}","Discovery high98q0: Missing-side fallback only for estimated probability >0.98, $0 assumed competitor queue, cap 3000 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.586133543676,\"retail_edge\":132.2660440732704,\"arb_edge\":-20.679910529638402,\"diff_mean\":-0.009289289693599809,\"diff_retail\":0.001486587280799946,\"failures\":0}","Discovery high98q12: Missing-side fallback only for estimated probability >0.98, $12 assumed competitor queue, cap 3000 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.59665924883761,\"retail_edge\":132.2664010798608,\"arb_edge\":-20.6697418310744,\"diff_mean\":0.0012364154680001638,\"diff_retail\":0.001843593871199962,\"failures\":0}","Discovery high98q24: Missing-side fallback only for estimated probability >0.98, $24 assumed competitor queue, cap 3000 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.59665902314639,\"retail_edge\":132.2659599103576,\"arb_edge\":-20.669300887262402,\"diff_mean\":0.0012361897767999954,\"diff_retail\":0.0014024243680000126,\"failures\":0}","Discovery high98q48: Missing-side fallback only for estimated probability >0.98, $48 assumed competitor queue, cap 3000 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.59672341618,\"retail_edge\":132.26585932677838,\"arb_edge\":-20.6691359106504,\"diff_mean\":0.0013005828103999767,\"diff_retail\":0.001301840788800014,\"failures\":0}","Discovery high98small: Missing-side fallback only for estimated probability >0.98, $0 assumed competitor queue, cap 5 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.5954842602088,\"retail_edge\":132.2695698319784,\"arb_edge\":-20.674085571815997,\"diff_mean\":6.142683920023778e-05,\"diff_retail\":0.005012345988799973,\"failures\":0}","Discovery flow1: Boost only otherwise-zero inside sizes using surviving-order partial-fill notional; EWMA decay 0.995, prior 100 eligible side-steps at 0.625 notional/step, multiplier 1, effective side arrival rate floored at baseline and capped 0.25; eligible posted notional >=20; seed_start=4000; simulations=150; {\"mean_edge\":118.47985714905,\"retail_edge\":141.620077684858,\"arb_edge\":-23.140220535840665,\"diff_mean\":-0.014625395938666496,\"diff_retail\":0.0032955301013328333,\"failures\":0}","Discovery flow12: Boost only otherwise-zero inside sizes using surviving-order partial-fill notional; EWMA decay 0.995, prior 100 eligible side-steps at 0.625 notional/step, multiplier 1.2, effective side arrival rate floored at baseline and capped 0.25; eligible posted notional >=20; seed_start=4000; simulations=150; {\"mean_edge\":118.46357831219133,\"retail_edge\":141.67532006805666,\"arb_edge\":-23.211741755902,\"diff_mean\":-0.03090423279733156,\"diff_retail\":0.05853791330000024,\"failures\":0}","Discovery flowfast: Boost only otherwise-zero inside sizes using surviving-order partial-fill notional; EWMA decay 0.98, prior 30 eligible side-steps at 0.625 notional/step, multiplier 1, effective side arrival rate floored at baseline and capped 0.25; eligible posted notional >=20; seed_start=4000; simulations=150; {\"mean_edge\":118.44424794546666,\"retail_edge\":141.64648600563334,\"arb_edge\":-23.202238060208668,\"diff_mean\":-0.0502345995219981,\"diff_retail\":0.029703850876665737,\"failures\":0}","Discovery flowlong: Boost only otherwise-zero inside sizes using surviving-order partial-fill notional; EWMA decay 0.999, prior 300 eligible side-steps at 0.625 notional/step, multiplier 1.2, effective side arrival rate floored at baseline and capped 0.25; eligible posted notional >=20; seed_start=4000; simulations=150; {\"mean_edge\":118.466189164104,\"retail_edge\":141.71933998737398,\"arb_edge\":-23.253150823304,\"diff_mean\":-0.028293380884667093,\"diff_retail\":0.10255783261733298,\"failures\":0}","Discovery zero110: Fixed 1.1x retail-arrival-rate multiplier only when baseline inside size is below 0.01 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.57790464582561,\"retail_edge\":132.310783571652,\"arb_edge\":-20.7328789258896,\"diff_mean\":-0.017518187543999676,\"diff_retail\":0.04622608566240042,\"failures\":0}","Discovery zero120: Fixed 1.2x retail-arrival-rate multiplier only when baseline inside size is below 0.01 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.5151589778504,\"retail_edge\":132.399164841244,\"arb_edge\":-20.884005863450398,\"diff_mean\":-0.08026385551919898,\"diff_retail\":0.1346073552543982,\"failures\":0}","Discovery zero140: Fixed 1.4x retail-arrival-rate multiplier only when baseline inside size is below 0.01 shares; seed_start=4000; simulations=125; {\"mean_edge\":111.3004947258736,\"retail_edge\":132.6241954295424,\"arb_edge\":-21.3237007037296,\"diff_mean\":-0.29492810749599924,\"diff_retail\":0.3596379435528011,\"failures\":0}","Discovery zero170: Fixed 1.7x retail-arrival-rate multiplier only when baseline inside size is below 0.01 shares; seed_start=4000; simulations=125; {\"mean_edge\":110.7421008009216,\"retail_edge\":133.098834417668,\"arb_edge\":-22.3567336167984,\"diff_mean\":-0.8533220324479994,\"diff_retail\":0.8342769316783991,\"failures\":0}","Discovery gatedAll: Retain 0.02-share known FIFO position at competitor price only when the ordinary inside quote is absent, all spread regimes; seed_start=4000; simulations=125; {\"mean_edge\":111.62538653649679,\"retail_edge\":132.347728344704,\"arb_edge\":-20.7223418082608,\"diff_mean\":0.02996370312720042,\"diff_retail\":0.08317085871440057,\"failures\":0}","Discovery gatedS1: Retain 0.02-share known FIFO position only when ordinary inside quote is absent, initial spread one only; seed_start=4000; simulations=125; {\"mean_edge\":111.6185265088344,\"retail_edge\":132.339577883792,\"arb_edge\":-20.7210513750096,\"diff_mean\":0.023103675464800133,\"diff_retail\":0.07502039780239998,\"failures\":0}","Discovery gated1: Retain one-share known FIFO position only when ordinary inside quote is absent, all spread regimes; seed_start=4000; simulations=125; {\"mean_edge\":111.6098178837824,\"retail_edge\":132.28053667908722,\"arb_edge\":-20.670718795364,\"diff_mean\":0.01439505041280049,\"diff_retail\":0.015979193097601204,\"failures\":0}","Independent validation stickyS1; seed_start=6000; simulations=200; diffs={\"total_edge\":0.021513777293000226,\"retail_edge\":0.014840324700499945,\"arb_edge\":0.006673452592999955}","Independent validation gatedAll; seed_start=7000; simulations=175; diffs={\"total_edge\":0.02135097795028542,\"retail_edge\":-0.02072162394971426,\"arb_edge\":0.042072601900571785}","Competitor retail-fill diagnostic before; seed_start=4000; simulations=1000; {\"no_quote\":{\"fills\":228347,\"notional\":1004472.1418000053,\"quantity\":2999800.580000004,\"edge\":36274.89584431319},\"price_behind\":{\"fills\":6961,\"notional\":16399.974600000016,\"quantity\":585147.3399999978,\"edge\":3700.430095559672},\"size_ran_out\":{\"fills\":44775,\"notional\":271772.45179999794,\"quantity\":1295564.7800000021,\"edge\":25119.037589266965},\"no_stock\":{\"fills\":2449,\"notional\":17996.518700000022,\"quantity\":135064.2200000001,\"edge\":3048.814153266864},\"ALL\":{\"fills\":282532,\"notional\":1310641.0868999984,\"quantity\":5015576.920000021,\"edge\":68143.17768240793}}","Competitor retail-fill diagnostic after; seed_start=4000; simulations=1000; {\"no_quote\":{\"fills\":226912,\"notional\":997426.266500003,\"quantity\":2987280.440000003,\"edge\":36140.278594558375},\"price_behind\":{\"fills\":6957,\"notional\":16407.20550000001,\"quantity\":584978.7899999977,\"edge\":3699.4819963763553},\"size_ran_out\":{\"fills\":45710,\"notional\":276215.9767999988,\"quantity\":1304527.8699999999,\"edge\":25215.11372879027},\"no_stock\":{\"fills\":2879,\"notional\":20214.23700000005,\"quantity\":139410.93000000002,\"edge\":3095.944919593906},\"ALL\":{\"fills\":282458,\"notional\":1310263.6857999975,\"quantity\":5016198.030000019,\"edge\":68150.81923932013}}","Diagnostic passive-side breakdown before; {\"no_quote:BUY\":{\"fills\":111023,\"notional\":478188.9438999983},\"no_quote:SELL\":{\"fills\":117324,\"notional\":526283.1978999971},\"price_behind:BUY\":{\"fills\":6961,\"notional\":16399.974600000016},\"price_behind:SELL\":{\"fills\":0,\"notional\":0},\"size_ran_out:BUY\":{\"fills\":24407,\"notional\":143827.16170000096},\"size_ran_out:SELL\":{\"fills\":20368,\"notional\":127945.29010000033},\"no_stock:BUY\":{\"fills\":0,\"notional\":0},\"no_stock:SELL\":{\"fills\":2449,\"notional\":17996.518700000022}}","Diagnostic passive-side breakdown after; {\"no_quote:BUY\":{\"fills\":110256,\"notional\":474722.12539999955},\"no_quote:SELL\":{\"fills\":116656,\"notional\":522704.1410999964},\"price_behind:BUY\":{\"fills\":6957,\"notional\":16407.20550000001},\"price_behind:SELL\":{\"fills\":0,\"notional\":0},\"size_ran_out:BUY\":{\"fills\":25174,\"notional\":147201.8518000012},\"size_ran_out:SELL\":{\"fills\":20536,\"notional\":129014.12500000032},\"no_stock:BUY\":{\"fills\":0,\"notional\":0},\"no_stock:SELL\":{\"fills\":2879,\"notional\":20214.23700000005}}","Exploratory sweeps with fewer than 200 simulations were stopped at their last complete 25-seed checkpoint after the candidate was selected; only completed simulations are reported. The selected strategy completed independent validation and both full 4000-run comparisons.","Diagnostics exclude probe-sized participant orders (quantity <= 0.010000001). Classify stock-limited desired asks first; then quotes present ahead of the competitor after actions as size_ran_out; otherwise absent side as no_quote; remaining fills as price_behind. Stock-limited means desired ask exceeds posted quantity by >0.11 shares, inventory is below desired ask, and the desired ask price can serve this fill. BUY/SELL labels are passive sides, so SELL denotes retail buying. Counts are competitor order fills, not retail arrival counts; no_quote includes deliberately zero desired sizes. A retained small quote can move missed notional from no_quote to size_ran_out, so total competitor notional is also reported.","Timing: single process; paired identical configs; alternating execution order; sum perf_counter for each run; no other timing overhead included; elapsed seconds={\"base\":173.78885432262905,\"yours\":167.29498300235718}; CPU seconds={\"base\":173.7478274240003,\"yours\":167.24577581499994}","Paired unseen runs: {\"wins\":715,\"ties\":3105,\"losses\":180,\"changed_retail_runs\":873}","Scorer check: 600 simulations, seed_start=1000; {\"mean_edge\":108.63974289615767,\"retail_edge\":136.2713209771645,\"arb_edge\":-27.63157808101933,\"simulations\":600,\"seed_start\":1000,\"failures\":0}","Frozen code SHA256 65d8a3994876e19a8846378008dd456cbe1acb10dea90448bba2b1e2b2bc63c6; selection/validation metadata={\"name\":\"stickyS1\",\"code_sha256\":\"65d8a3994876e19a8846378008dd456cbe1acb10dea90448bba2b1e2b2bc63c6\",\"frozen_utc\":\"2026-11-06T06:55:35.913038+00:00\",\"discovery_seed_start\":4000,\"discovery_simulations_at_freeze\":175,\"discovery_conditional_diffs\":{\"total_edge\":0.03658645886171388,\"retail_edge\":0.02796716348857139,\"arb_edge\":0.008619295370857311},\"validation_seed_start\":6000,\"validation_simulations\":200,\"validation_diffs\":{\"total_edge\":0.021513777293000226,\"retail_edge\":0.014840324700499945,\"arb_edge\":0.006673452592999955},\"diagnostic_file\":\"diag_final1000.json\",\"benchmark_file\":\"benchmark_stickyS1.json\",\"approach\":\"The initial 100-run diagnostic found absence of a meaningful quote to be the largest missed competitor retail-notional category. Preserve small main orders known to precede competitor liquidity at its best price when the initial competitor spread is one tick: retain from 0.02 shares rather than two shares. Other spreads keep the baseline threshold. Discovery and independent seeds 6000-6199 gained total and retail edge before code freeze. A 1000-run diagnostic on seeds 4000-4999, enlarged after freeze, gives no_quote fills 228347 before and 226912 after, with notional 1004472.1418000053 before and 997426.266500003 after. Total competitor retail notional is 1310641.0868999984 before and 1310263.6857999975 after; movement into exhausted size is not all recovered flow. Full four-reason counts, passive-side breakdowns, and definitions are in tried. Arithmetic-preserving scan and tail-sum optimizations passed 40000 action-equivalence steps. The code was frozen before full scoring and unseen outcomes; no seed recognition or added dependencies.\",\"next\":\"The unseen point gain is 0.011480842793549996 with standard error 0.009533915369918038; validate on a new untouched seed block before combining it with other changes. Investigate stock/reservoir orders that become first at a price after competitor depletion but whose priority is not tracked. Test preserving them only when the ordinary quote would be absent, with the same retail and runtime gates. Broad behind-competitor fallbacks mostly exchange small retail gains for larger arbitrage losses.\",\"action_equivalence\":{\"steps\":40000,\"simulations\":20,\"seed_start\":4400,\"failures\":0,\"comparison\":\"frozen final code versus original arithmetic with the same stickyS1 quoting rule\"},\"base_diagnostic_file\":\"diag_base1000.json\",\"diagnostic_seed_start\":4000,\"diagnostic_simulations\":1000}","Selected stickyS1; full tuning base={\"mean_edge\":98.0996956804193,\"retail_edge\":125.17961744069841,\"arb_edge\":-27.079921760293374,\"simulations\":4000,\"seed_start\":4000,\"failures\":0}; candidate={\"mean_edge\":98.12665328690635,\"retail_edge\":125.19559868719257,\"arb_edge\":-27.068945400300077,\"simulations\":4000,\"seed_start\":4000,\"failures\":0}; paired unseen diff={\"mean\":0.011480842793549996,\"standard_error\":0.009533915369918038,\"retail\":0.011155944659200025,\"arb\":0.000324898134375022}"],"next":"The unseen point gain is 0.011480842793549996 with standard error 0.009533915369918038; validate on a new untouched seed block before combining it with other changes. Investigate stock/reservoir orders that become first at a price after competitor depletion but whose priority is not tracked. Test preserving them only when the ordinary quote would be absent, with the same retail and runtime gates. Broad behind-competitor fallbacks mostly exchange small retail gains for larger arbitrage losses."}