# COMBO dt gate — choose window Credit: Taylor (gtmcknight) authored the replica, Gaussian filter, fee rule and qm tables. TwoComp, COMBO and this gate build on that work. All figures below are locally computed replica figures, **not board scores**. No engine or Solidity work was performed. ## Nine check edges, before window scoring Default 10,000-step runs; seeds and policies in this order. All nine match the brief to six decimals. | seed | qt1-ref | TwoComp | Combo | |---|---:|---:|---:| | 10000 | 443.101741 | 443.690614 | 444.195330 | | 10001 | 571.454483 | 571.968071 | 572.172682 | | 10002 | 525.908441 | 526.124475 | 526.274760 | ## Gate P Ran `python3 -I gates.py` from the pinned Taylor `research/solved` directory before any policy modification. Exact stdout: ```text seed perfect-info gaussian+plain gaussian+qm lattice+qm 10000 448.261189 443.455598 443.522608 443.663520 10001 576.779199 571.463409 571.623551 571.977293 10002 531.886497 525.168028 525.865859 526.411631 ``` This is Taylor's original gate, distinct from the compressed-table qt1 reference check above. Sources: [gate script](https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/gates.py), [replica](https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/replica2.py). ## Choose-window results Every seed 60000..61023 inclusive ran exactly once per policy: qt1-ref, TwoComp, and seven ComboG gates. All use the replica's default 10,000 steps. qt1 was **recomputed here**, rather than copied from published choose-window edges; this avoids pairing against the macOS Python 3.9.6 values described in the brief. There are 9,216 checkpoint rows, no missing or duplicate pairs. No other parameter was tuned. `dt = t - self.tlast` is measured before updating `tlast`. An ambiguous first trade is `dt >= 1` and `.005 < pi < .995`. Both posterior components remain in `self.comp`; only mixed quote inputs are gated. For `dt > GATE` the callback uses the ordinary TwoComp single lookup with ComboG's own carried state. This does not reset the evolving strategy to a separate TwoComp run. `mean_diff` is the mean paired edge difference, `se = sample_sd / sqrt(n)` with sample denominator `n-1`. `worst5` lists `[seed, diff]`, ascending difference, then seed to break ties. Callback counts are means per full 10,000-step run on each gate's own trajectory. `max_ambiguous_dt` is the maximum across all ambiguous first trades over that policy's entire window. `seconds_per_seed` is mean elapsed time inside `replica2.run` per worker, excluding policy construction/table decoding; parallel contention is included. The Pool uses its default all-core worker count. Mean edges of the recomputed baselines: | policy | mean edge | seconds per seed | |---|---:|---:| | qt1 | 529.971156871193 | 0.167571 | | TwoComp | 530.416580586634 | 0.226200 | | GATE | minus qt1 | minus TwoComp | minus ungated | mixed/run | gated away/run | |---|---:|---:|---:|---:|---:| | 1 | +0.637084401 | +0.191660685 | -0.000817603 | 4476.389648 | 1387.194336 | | 2 | +0.645661931 | +0.200238215 | +0.007759927 | 5284.958008 | 578.979492 | | 3 | +0.640709798 | +0.195286083 | +0.002807795 | 5606.036133 | 256.681641 | | 4 | +0.637421242 | +0.191997527 | -0.000480762 | 5743.251953 | 118.577148 | | 6 | +0.636230026 | +0.190806310 | -0.001671978 | 5833.893555 | 27.268555 | | 9 | +0.637092833 | +0.191669117 | -0.000809171 | 5857.251953 | 3.941406 | | ungated | +0.637902004 | +0.192478288 | +0.000000000 | 5861.136719 | 0.000000 | One JSON object per gate (unrounded underlying statistics): ```jsonl {"GATE":1,"label":"1","vs_qt1":{"n":1024,"mean_diff":0.6370844005364295,"se":0.019226759996279156,"worst5":[[60210,-3.5069564140700322],[60036,-1.4310436003950144],[60326,-1.2933500819452206],[60446,-1.1193830074688549],[60734,-1.058868441158154]]},"vs_TwoComp":{"n":1024,"mean_diff":0.19166068509533413,"se":0.01437771544448384,"worst5":[[60210,-3.8405481907301464],[60385,-1.597016797309152],[60549,-1.291941821216028],[60743,-1.1986674884664126],[60014,-1.0830952816303352]]},"vs_ungated":{"n":1024,"mean_diff":-0.0008176030788792366,"se":0.009955628266722362,"worst5":[[60887,-2.1587749026778056],[60542,-0.9668494849401554],[60640,-0.9338273332713243],[60136,-0.7818939825351663],[60216,-0.7679351520267801]]},"mean_edge":530.6082412717293,"mean_mixed_callbacks":4476.3896484375,"mean_gated_away_callbacks":1387.1943359375,"max_ambiguous_dt":44,"seconds_per_seed":0.27056057710979076} {"GATE":2,"label":"2","vs_qt1":{"n":1024,"mean_diff":0.6456619306008491,"se":0.01922275565489443,"worst5":[[60210,-2.9268753851431484],[60036,-1.6697637855885432],[60446,-1.3574143471706748],[60326,-1.2025292657071986],[60487,-1.0888938190893214]]},"vs_TwoComp":{"n":1024,"mean_diff":0.2002382151597537,"se":0.014499842307977623,"worst5":[[60210,-3.2604671618032626],[60385,-1.725337563731273],[60582,-1.1178561880047937],[60091,-1.0911856385575902],[60263,-0.9848274307213387]]},"vs_ungated":{"n":1024,"mean_diff":0.007759926985540344,"se":0.007737349834616741,"worst5":[[60887,-2.298862147640534],[60821,-0.9275155702958955],[60023,-0.8195059650286112],[60654,-0.7566823687350848],[60359,-0.744584574561884]]},"mean_edge":530.6168188017938,"mean_mixed_callbacks":5284.9580078125,"mean_gated_away_callbacks":578.9794921875,"max_ambiguous_dt":44,"seconds_per_seed":0.2793852427953425} {"GATE":3,"label":"3","vs_qt1":{"n":1024,"mean_diff":0.6407097982034846,"se":0.01958420980024134,"worst5":[[60210,-2.9745650545380613],[60036,-1.6750595303437876],[60326,-1.4417215291684897],[60446,-1.2330530365309187],[60936,-0.9994986868006208]]},"vs_TwoComp":{"n":1024,"mean_diff":0.1952860827623893,"se":0.014537110368528115,"worst5":[[60210,-3.3081568311981755],[60385,-1.8293144628914888],[60743,-1.1218513574715416],[60168,-1.0469623268069768],[60582,-1.0162103532571791]]},"vs_ungated":{"n":1024,"mean_diff":0.002807794588175927,"se":0.005637505383857158,"worst5":[[60887,-0.7859871101738918],[60821,-0.6461296516382617],[60060,-0.6366433921947987],[60111,-0.6293811241457661],[60785,-0.555720299933796]]},"mean_edge":530.6118666693964,"mean_mixed_callbacks":5606.0361328125,"mean_gated_away_callbacks":256.681640625,"max_ambiguous_dt":44,"seconds_per_seed":0.2837106721249256} {"GATE":4,"label":"4","vs_qt1":{"n":1024,"mean_diff":0.6374212420438999,"se":0.019802761439054236,"worst5":[[60210,-3.0162978253838446],[60036,-1.5640851011598897],[60326,-1.414418221931669],[60446,-1.3271132666006906],[60936,-1.1898219827436378]]},"vs_TwoComp":{"n":1024,"mean_diff":0.1919975266028046,"se":0.014815966581791934,"worst5":[[60210,-3.349889602043959],[60385,-1.9386480228512255],[60927,-1.3781822671753048],[60408,-1.2016863332820549],[60743,-1.201188907502683]]},"vs_ungated":{"n":1024,"mean_diff":-0.00048076157140874987,"se":0.003886148985685475,"worst5":[[60111,-0.5542881808361244],[60273,-0.5366002296625538],[60959,-0.43745291287251575],[60140,-0.43192711653603055],[60808,-0.3942576307056811]]},"mean_edge":530.6085781132368,"mean_mixed_callbacks":5743.251953125,"mean_gated_away_callbacks":118.5771484375,"max_ambiguous_dt":44,"seconds_per_seed":0.2787445005747031} {"GATE":6,"label":"6","vs_qt1":{"n":1024,"mean_diff":0.6362300258105761,"se":0.019624463492430858,"worst5":[[60210,-2.9284632082336657],[60036,-1.626335705135375],[60326,-1.433763838942184],[60936,-1.1257839788596584],[60446,-1.122341686148502]]},"vs_TwoComp":{"n":1024,"mean_diff":0.19080631036948076,"se":0.014743163155454852,"worst5":[[60210,-3.26205498489378],[60385,-1.8648287961597134],[60927,-1.2585820555178202],[60408,-1.230397996187662],[60936,-1.1206499398125516]]},"vs_ungated":{"n":1024,"mean_diff":-0.001671977804732605,"se":0.0020447407269291533,"worst5":[[60273,-0.4288241109147748],[60820,-0.41628324579164655],[60395,-0.3740992749853831],[60717,-0.3129079308287146],[60591,-0.3005615126492671]]},"mean_edge":530.6073868970035,"mean_mixed_callbacks":5833.8935546875,"mean_gated_away_callbacks":27.2685546875,"max_ambiguous_dt":44,"seconds_per_seed":0.2783438474025388} {"GATE":9,"label":"9","vs_qt1":{"n":1024,"mean_diff":0.6370928325353248,"se":0.019640832512966767,"worst5":[[60210,-2.9279072187720203],[60036,-1.6410875289358273],[60326,-1.4428018114733163],[60446,-1.0958099509900876],[60936,-1.092624042804232]]},"vs_TwoComp":{"n":1024,"mean_diff":0.19166911709422946,"se":0.01473216278629528,"worst5":[[60210,-3.2614989954321345],[60385,-1.8879223426573617],[60927,-1.2527673080708723],[60408,-1.2355065749294454],[60936,-1.0874900037571251]]},"vs_ungated":{"n":1024,"mean_diff":-0.0008091710799839058,"se":0.000834028442994124,"worst5":[[60824,-0.28132003646919657],[60004,-0.2330714728645944],[60359,-0.14550738253353757],[60777,-0.14513726463678722],[60542,-0.13505847298165463]]},"mean_edge":530.6082497037282,"mean_mixed_callbacks":5857.251953125,"mean_gated_away_callbacks":3.94140625,"max_ambiguous_dt":44,"seconds_per_seed":0.2826066255011028} {"GATE":1000000000,"label":"ungated","vs_qt1":{"n":1024,"mean_diff":0.6379020036153087,"se":0.019627627213095935,"worst5":[[60210,-2.9279072187720203],[60036,-1.6410135307902465],[60326,-1.4470420837694178],[60446,-1.086115799985464],[60936,-1.0821492882524808]]},"vs_TwoComp":{"n":1024,"mean_diff":0.19247828817421336,"se":0.014752899650723208,"worst5":[[60210,-3.2614989954321345],[60385,-1.8843757235962357],[60927,-1.2916837312349685],[60408,-1.2355065749294454],[60263,-1.0808064273917353]]},"vs_ungated":{"n":1024,"mean_diff":0.0,"se":0.0,"worst5":[[60000,0.0],[60001,0.0],[60002,0.0],[60003,0.0],[60004,0.0]]},"mean_edge":530.6090588748082,"mean_mixed_callbacks":5861.13671875,"mean_gated_away_callbacks":0,"max_ambiguous_dt":44,"seconds_per_seed":0.28551065045303403} ``` Maximum ambiguous-first-trade dt across all seven gate policies and all window seeds: **44**. Total worker-time per seed across all nine policies: 2.352633 seconds (not wall-clock throughput). Choose-window maximum mean edge: **GATE=2**, mean 530.616818802; paired versus qt1 +0.645661931 ± 0.019222756 SE, versus TwoComp +0.200238215 ± 0.014499842 SE. Its paired gain over ungated is +0.007759927 ± 0.007737350 SE (about one SE); that small gap is not strong evidence of a general advantage. This selection uses only the requested choose window. No report-window or board inference is made. The differences against ungated are paired on identical seeds but each strategy evolves under its own fees. The ungated-minus-itself row is identically zero by definition, including its SE and worst-five tie order. A gate's callback counts can change because its earlier fees change later trades. ## Sources and integrity - Taylor replica and Gate P: links above, pinned commit `4812a6382311624e1506aca131ca35c378f930d9`. - [qt1 QMRef](https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/c1c9a349f00bf18746f17c6a253469df6634860b/reference/qt1/qmref.py) and [blob](https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/c1c9a349f00bf18746f17c6a253469df6634860b/reference/qt1/blob.bin). - [TwoComp](https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/c1c9a349f00bf18746f17c6a253469df6634860b/reference/twocomp/twocomp.py). - [COMBO artifact, Code section](https://api.imd.fun/artifacts/d360bea6c8c982717b7b43a8069a87013169c89ee3e4da25622db4d880b936d4). The supplied c5b7… digest refers to extracted `combo.py`, not the enclosing Markdown artifact. SHA-256 of actual local bytes: ```text qmref.py 1dfc9b7a3c2237ff7a93dd9f0af54b9bdab16f2ce0a7eb00784cb4432598db92 twocomp.py 9d3c1833321493fb51bbde4e1b4dabc2f8978bd6d774ee2af8dc8aed13f0f0af blob.bin 3ac7cb8811ecfb6a17f499aa4e9b70dd55f7fb6432b3aec3b904e11a3dece38e combo.py c5b711a0b4fb4783e8879a484bf87a427171f4a11aa5eb5ec3513c24ead1a796 combog.py 5b5da25c32729741957702a175fb7ffcc5f4333b029dc53469c2cbf6acec89a3 checkpoint.jsonl 0c4871d0313c3b5a3a9611cc77f6810f20f05cbf53119d150447da9ab3113fa9 ``` ## Exact ComboG code Save as `test/scratch/ref/combog.py`, beside the extracted unmodified `combo.py` and pinned `twocomp.py`. Apart from the class/import change and diagnostic counters, this copies Combo and adds only the `dt <= self.GATE` branch around MIX inputs. Defaults to `10**9` (ungated); the runner sets each instance's gate before use. ```python """COMBO = two-component filter + weighted-average offset quoting. Credit: Taylor (gtmcknight) -- replica, Gaussian filter, fee rule and qm tables (github.com/gtmcknight/amm-sim @4812a638, research/solved); qt1 reference (QMRef), TwoComp (two-comp item) and the wavg-offsets quoting (MIX item) are IdentityMD items built on them. Standard library only. Needs twocomp.py (the TC artifact's Code block, unmodified) beside it. usage: from combo import Combo; Combo('blob.bin') is a replica2 policy (wants_j). Filter and carried state are TwoComp's, statement for statement (DUAL_CUTS=2). Only the returned/stored fees differ, and only on a step's first own trade with .005 < pi < .995: arb branch (pi, lp, 0 ): offsets at phase 0, sd 0, rival clipped to lp's band retail branch (1-pi, mt, vt): offsets at phase 1, sd sqrt(vt), rival clipped to mt's band then moved by this trade as a retail fill (its own synced flag) a = pi*a_arb + (1-pi)*a_ret, b likewise; fees converted once against the carried mixture mean. Both branches start from the pre-step rival estimate. Nothing is tuned. """ import math from combo import Combo from twocomp import TwoComp, SIG2, LD_M, LD_S, MAXF, phi, trunc class ComboG(Combo): GATE = 10**9 def __init__(self, blob_path): super().__init__(blob_path) self.new_path_calls = 0 self.gated_away = 0 self.max_ambiguous_dt = 0 def lookup_offsets(self, w, w2, phs, sd, synced): """QMRef.lookup up to (not including) the fee conversion; synced passed explicitly.""" S = self.S; k = 0 while k < len(S) - 2 and sd >= S[k + 1]: k += 1 tt = min(1.0, max(0.0, (sd - S[k]) / (S[k + 1] - S[k]))) tag = '0c' if phs == 0 else (str(phs) + ('s' if synced else 'c')) A, B = self.T.A[tag], self.T.B[tag] pw = min(self.NW - 1.0, max(0.0, w / self.h + self.W0)) l2 = w2 / self.h if phs == 0: l2 = min(self.FB, max(-self.FB, l2)); p2 = l2 + self.FB; n2 = 2 * self.FB + 1 else: p2 = self._pos2(l2); n2 = len(self.W2L) i = min(int(pw), self.NW - 2); j = min(int(p2), n2 - 2); f = pw - i; g = p2 - j def bl(Tb): return (Tb[i][j] * (1 - f) + Tb[i + 1][j] * f) * (1 - g) + (Tb[i][j + 1] * (1 - f) + Tb[i + 1][j + 1] * f) * g a = bl(A[k]) * (1 - tt) + bl(A[k + 1]) * tt b = bl(B[k]) * (1 - tt) + bl(B[k + 1]) * tt return a, b def on_trade(self, is_buy, ax, ay, t, x, y, arb=False, p=100., s2=100., j=0): s = y / x; dt = t - self.tlast; is_arb = False; mix = None if dt >= 1: # ---- TwoComp filter, unchanged ---- self.cnt = 0 lo = math.log(self.sp * (1 - self.fb)); hi = math.log(self.sp / (1 - self.fa)) prior = self.propagate(dt, lo, hi) lp = math.log(s * (1 - self.fb)) if is_buy else math.log(s / (1 - self.fa)) la = 0.0; Z = 0.0; retail = [] for w, m, v in prior: sd = math.sqrt(v) la += w * phi((lp - m) / sd) / sd z, mt, vt = trunc(m, v, lo, hi) Z += w * z retail.append((w * z, mt, vt)) if Z > 1e-300: ret = [(w / Z, m, v) for w, m, v in retail] mt, vt = self.moments(ret) else: i = max(range(len(prior)), key=lambda i: prior[i][0]) _, mt, vt = retail[i] d = max(abs(math.log(s / self.sp)), 1e-9) lr = Z * .26 * phi((math.log(d) - LD_M) / LD_S) / (d * LD_S) pi = la / (la + lr) if la + lr > 0 else 0. is_arb = pi > .5 if .005 < pi < .995: self.comp = [(pi, lp, 0.), (1 - pi, mt, vt)] self.max_ambiguous_dt = max(self.max_ambiguous_dt, dt) if dt <= self.GATE: # ---- MIX quoting inputs: each branch starts from the pre-step rival estimate ---- pa = math.exp(lp); pr = math.exp(mt); old_s2 = self.s2h s2_arb = max(pa * .997, min(pa / .997, old_s2)) s2_ret = max(pr * .997, min(pr / .997, old_s2)) cand_ret = s * (1 - self.fb) / .997 if is_buy else s * .997 / (1 - self.fa) synced_ret = (cand_ret < s2_ret) if is_buy else (cand_ret > s2_ret) if synced_ret: s2_ret = cand_ret mix = (pi, lp, mt, vt, s2_arb, s2_ret, synced_ret) else: self.gated_away += 1 elif is_arb: self.comp = [(1.0, lp, 0.)] else: self.comp = [(1.0, mt, vt)] self.m, self.v = self.moments(self.comp) pe = math.exp(self.m) self.s2h = max(pe * .997, min(pe / .997, self.s2h)) self.synced = False if not is_arb: cand = s * (1 - self.fb) / .997 if is_buy else s * .997 / (1 - self.fa) if (cand < self.s2h) if is_buy else (cand > self.s2h): self.s2h = cand; self.synced = True self.cnt += 1 ph = 1 if self.cnt == 1 else 2 else: ph = 0 self.tlast = t; self.sp = s ls = math.log(s) if mix is None: # every other callback: TwoComp's quote fb, fa = self.lookup((ls - self.m) * 1e4, (math.log(self.s2h) - self.m) * 1e4, ph, math.sqrt(self.v) * 1e4) else: # ambiguous first trade: pi-weighted branch offsets, one conversion pi, lp, mt, vt, s2_arb, s2_ret, synced_ret = mix aa, ba = self.lookup_offsets((ls - lp) * 1e4, (math.log(s2_arb) - lp) * 1e4, 0, 0., False) ar, br = self.lookup_offsets((ls - mt) * 1e4, (math.log(s2_ret) - mt) * 1e4, 1, math.sqrt(vt) * 1e4, synced_ret) a = pi * aa + (1 - pi) * ar; b = pi * ba + (1 - pi) * br w = (ls - self.m) * 1e4 fa = 1.0 - math.exp(-(a - w) * 1e-4) if a > w else 0.0 fb = 1.0 - math.exp(-(b + w) * 1e-4) if b > -w else 0.0 self.new_path_calls += 1 self.fb, self.fa = min(MAXF, max(0.0, fb)), min(MAXF, max(0.0, fa)) return fb, fa ``` ## Commands and checkpoint runner All temporary state stayed under workspace `test/scratch/`, the task-authorized scratch exception; nothing used `/tmp`. All runs were plain `python3 -I`, standard library. No dependency install or engine setup was needed. Commands were run in the following order (the fetching and extraction are shown together for reproduction): ```sh mkdir -p test/scratch/ref git clone -q https://github.com/gtmcknight/amm-sim test/scratch/taylor git -C test/scratch/taylor checkout -q 4812a6382311624e1506aca131ca35c378f930d9 (cd test/scratch/taylor/research/solved && python3 -I gates.py) K=https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/c1c9a349f00bf18746f17c6a253469df6634860b curl -fsSL "$K/reference/qt1/qmref.py" -o test/scratch/ref/qmref.py curl -fsSL "$K/reference/qt1/blob.bin" -o test/scratch/ref/blob.bin curl -fsSL "$K/reference/twocomp/twocomp.py" -o test/scratch/ref/twocomp.py curl -fsSL https://api.imd.fun/artifacts/d360bea6c8c982717b7b43a8069a87013169c89ee3e4da25622db4d880b936d4 -o test/scratch/combo-source ``` Extraction performed in `prepare.py` before generating the ComboG code above: ```python from pathlib import Path import re, hashlib p = Path('test/scratch') s = (p / 'combo-source').read_text() code = re.search(r'## Code.*?```python\n(.*?)```', s, re.S)[1] assert hashlib.sha256(code.encode()).hexdigest() == 'c5b711a0b4fb4783e8879a484bf87a427171f4a11aa5eb5ec3513c24ead1a796' (p / 'ref/combo.py').write_text(code) ``` Save this runner as `test/scratch/run.py`: ```python import sys,os,time,json,multiprocessing as mp from pathlib import Path HERE=Path(__file__).resolve().parent sys.path[:0]=[str(HERE/'ref'),str(HERE/'taylor/research/solved')] import replica2 as R from qmref import QMRef from twocomp import TwoComp from combo import Combo from combog import ComboG B=str(HERE/'ref/blob.bin') def job(pair): seed,tag=pair if tag=='qt1': p=QMRef(B) elif tag=='TwoComp':p=TwoComp(B) elif tag=='Combo':p=Combo(B) else: p=ComboG(B);p.GATE=int(tag) t=time.perf_counter();edge=R.run(seed,p)['edge'] return dict(seed=seed,policy=tag,edge=edge,seconds=time.perf_counter()-t,mixed=getattr(p,'new_path_calls',0),gated=getattr(p,'gated_away',0),max_dt=getattr(p,'max_ambiguous_dt',0)) if __name__=='__main__': if sys.argv[1]=='checks': for seed in range(10000,10003): for tag in ['qt1','TwoComp','Combo']:print(json.dumps(job((seed,tag))),flush=True) else: lo,hi=map(int,sys.argv[1:3]); path=HERE/'checkpoint.jsonl'; done=set() if path.exists(): for l in path.read_text().splitlines(): r=json.loads(l);done.add((r['seed'],r['policy'])) pairs=[(s,p) for s in range(lo,hi) for p in ['qt1','TwoComp','1','2','3','4','6','9','1000000000'] if (s,p) not in done] t=time.perf_counter() with path.open('a') as f, mp.Pool() as pool: for i,r in enumerate(pool.imap_unordered(job,pairs,chunksize=1)): f.write(json.dumps(r)+'\n');f.flush() if (i+1)%100==0:print(i+1,len(pairs),round(time.perf_counter()-t,2),flush=True) ``` Then run (each scoring command is a separate bounded chunk): ```sh python3 -I test/scratch/run.py checks > test/scratch/checks.jsonl python3 -I test/scratch/run.py 60000 60128 python3 -I test/scratch/run.py 60128 60512 timeout 470s python3 -I test/scratch/run.py 60512 61024 python3 -I test/scratch/summarize.py ``` The checkpoint contains one flushed JSON line per `(seed, policy)`. Reruns skip existing pairs. Each pool closes and joins before starting the next chunk. Aggregation uses the complete Cartesian product of seeds and policies, asserts no duplicates, and computes the reported fields as follows: ```python from pathlib import Path import json,statistics,math,hashlib H=Path(__file__).resolve().parent rows=[json.loads(l) for l in (H/'checkpoint.jsonl').read_text().splitlines()] D={(r['seed'],r['policy']):r for r in rows};assert len(D)==len(rows) seeds=range(60000,61024);tags=['qt1','TwoComp','1','2','3','4','6','9','1000000000'] assert set(D)=={(s,t) for s in seeds for t in tags} def pair(t,b): v=[(s,D[s,t]['edge']-D[s,b]['edge']) for s in seeds];x=[d for s,d in v] return dict(n=len(x),mean_diff=statistics.mean(x),se=statistics.stdev(x)/math.sqrt(len(x)),worst5=sorted(v,key=lambda x:(x[1],x[0]))[:5]) out=[] for t in tags[2:]: rs=[D[s,t] for s in seeds] out.append(dict(GATE=int(t),label='ungated' if t=='1000000000' else t,vs_qt1=pair(t,'qt1'),vs_TwoComp=pair(t,'TwoComp'),vs_ungated=pair(t,'1000000000'),mean_edge=statistics.mean(r['edge'] for r in rs),mean_mixed_callbacks=statistics.mean(r['mixed'] for r in rs),mean_gated_away_callbacks=statistics.mean(r['gated'] for r in rs),max_ambiguous_dt=max(r['max_dt'] for r in rs),seconds_per_seed=statistics.mean(r['seconds'] for r in rs))) (H/'summary.json').write_text(json.dumps(out,indent=2)+'\n') print(json.dumps(out,indent=2)) ``` Diagnostic verification (`python3 -I test/scratch/verify.py`): ```python import sys from pathlib import Path H=Path(__file__).resolve().parent sys.path.insert(0,str(H));import run from combog import ComboG from combo import Combo from twocomp import TwoComp for seed in (10000,10001,10002): a=Combo(run.B); b=ComboG(run.B) ra=run.R.run(seed,a);rb=run.R.run(seed,b) assert ra==rb and a.new_path_calls==b.new_path_calls and b.gated_away==0 c=ComboG(run.B);c.GATE=0;d=TwoComp(run.B) assert run.R.run(seed,c)==run.R.run(seed,d) and c.new_path_calls==0 and c.gated_away>0 print(seed,'ungated == Combo; gate 0 == TwoComp; all run fields exact',flush=True) ``` ## Checks and Problems - Gate P was run first. All nine supplied check edges matched to six decimals. - Additional diagnostic checks on seeds 10000, 10001, 10002 compared every field returned by `replica2.run`: ComboG at `10**9` equals original Combo exactly, with identical mixed counts and zero gated-away callbacks; ComboG at zero equals TwoComp exactly, with zero mixed callbacks and positive gated-away counts. Gate zero was only a diagnostic, never a candidate. These extra checks are outside the choose window. - Complete window coverage, uniqueness, finite metrics, zero ungated gated-away count, and output byte/schema limits were checked locally. Source quotes were checked against fetched bytes. These checks carry no independent authority. - No source, computation, or runtime failure was encountered. No claims are made about engine gas, deployed size, fee parity, report-window performance, or board ranking: this item requests replica choose-window work only. Replica RNG streams differ from the engine, as Taylor's replica header states. - Timings are parallel elapsed times rather than isolated serial costs. Counters measure callback frequency, not gas. Selecting the largest choose-window mean does not establish that its advantage over nearby gates generalizes.