{
 "notes": "EP3: woke on requester note 2, minutes after EP2; round 1 (ib-long, fa-long, scale, kit-ib) had not started. Handed: three results the cancelled r1 batches finished. No weights have moved yet.\n\nLEARNED from the three results (all blocked at the 300 markets/s gate, none trained):\n- ib-r1/f-s22-p16 (IB's port): gate A 6.6e-5 bps, gate B replica +0.586 against real +0.592, both pass; speed 129..147 markets/s on a seat with 2 CPUs. SETUP, fetching, sha256 checks and unpacking worked.\n- kitb-r1/wide16: KIT-B's `speed` command gave 220 markets/s for 19-16-2 on 8 processes; gated8 (two 19-8-2 nets) 120. That command times 512 markets in 1.5 to 4 seconds INCLUDING pool start, so it understates the steady state a search runs at. Gates A, B and C_start passed, kit tests 15/15.\n- A blocked result is still 'accepted': a canary does not catch a brief whose items all block. Seats differ widely (2 to 22 CPUs) and I cannot choose them.\n- A handed result is served at https://api.imd.fun/artifacts/<sha256 of its bytes> (checked for 46026ae3... and 4d616a18...): that id is a relay's next START.\n\nIC = the requester's second start, cc45e1a7 continue-h, a97fa964e707df8aff4feb6a2dd8532d33189b88fe3c217749968d5216efd139 (plain fields read, both hashes checked): IA's design, NOT IB's: IA's 19 inputs (raw_size, IA's scaling), IA's port b29cd2a0..., 178 weights in `params` W1,b1,W2,b2. Real +0.378 se 0.024 over IA on 7236864..7237375; replica holdout 40000000..+8191: +0.749 over HA where IB has +0.652, so about +0.10 over IB, never yet paired with IB on the real engine. afterSwap peak 235,582. Trained 507 generations in 54 minutes (population 32, 128 markets a generation), step still large at the end; its port ran 810 markets/s on 8 processes. IA = df0ddfdf122c88641513dd179980fce475f42a912a184f812d213f27db7c14df (`params`; real +0.335 over HA). Because IC is IA's design, KIT-B loads it as it is (kit weights.json = feature_ids 0..18, IC's multipliers and offsets, one net W1,b1,W2,b2) and its diet (IAD, peak 132k) applies: the kit can widen IC, not only IA. In IC's port the T path is TH[LAMBDA_COEF], TH[FLOW_SIZE_COEF], flow_size = lam*size; the anchor's k are `params.toxicity_anchor` linear_k_wad and quadratic_k_wad.\n\nDECIDED (10 items; 40 of 200 used).\nic-long (5): note 2c, IC continued as IB is: the EP2 TEMPLATE leg with START = IC, mended as below. Keys ic-sNN-hMM-pKK (sigma0 0.0NN, cap halving every MM minutes, population KK): s30-h40-p16, s30-h40-p32, s50-h30-p16, s20-h60-p16, s50-h30-p32.\nslope (3): note 2a, from IC (the best start by the requester's figures): a 20th input lambdaHat x sizeHat (scaled by IC's new_input_scaling rule, weights 0) and LAMBDA_COEF, FLOW_SIZE_COEF, the anchor's linear and quadratic k each as value x exp(z), searched jointly (190 variables), identity to IC proven first, gas probed before training. Keys slope-c05-p16, slope-c15-p16, slope-c10-p32 (cNN = initial sd of z 0.NN). A result carries the changed port and Solidity, so a later leg can start from it. Its holdout is frozen against IC only: add IC-minus-IB from any ic-long holdout (same seeds) to get frozen_vs_IB. It has no speed fallback (no room in 3,000 characters).\nconfirm-ic (2): IC against IB on the real engine, 1,024 fresh seeds each (ic-block-a, ic-block-b), gate C, quartiles, IC's code in plain. Promote IC at pooled mean_diff > 2 se (pool with sum and sumsq).\nPaused scale: its 3 held items wait. Its 5 released run the EP2 brief, which uses the kit's `speed` command, so most will block or step their width down.\nRound 1 searches all share replica holdout 41010000..41018191.\n\nMENDS now in the template (keep them in every later brief):\n1. Speed: \"steady-state replica markets/s of START's port on the search's own persistent pool (a process per CPU, 2,048+ markets x 10,000 steps, pool start and compile excluded)\".\n2. A speed-blocked item still earns its seat: \"Speed under 300: the same and no search, but still run step 6 for IB and START\" (512 more real seeds of START against IB).\n3. Note 2b, in every real result: \"by_quartile: the seeds in quartiles of IB's retail volume (q1 quietest), each n, mean_diff, se\".\n4. IC's real gain was measured over IA, not HA, so its gate B is: \"the replica gain of START over IA on seeds 7236864..7237375 within 0.15 of the real +0.378\". For a child of IC: seeds = the child's real block, reference = its real paired_vs_start (replica child minus IC), or chain +0.378.\n5. FILES for IC's line: START (code_zb64, port_zb64, params; its `notes` say how the port's W is built); START's own `hashes.artifacts` name by id IA (`params`), `replica` (`replica_source`) and `RS2_port` (`differential_test_source`); IB's code, port and params come from the goal's IB file. A child of IC must keep `hashes.artifacts` (the brief says 'START's keys').\nFilled briefs: ic-long 2,820, slope 2,946, confirm-ic 1,582 characters. Measure every one; stay under 2,950.\n\nLEDGER, never reuse. Real engine, 1,024-seed blocks (a search uses 512, +512..+527 gas probes): burned 8000000..8008191; ib-long 8008192+1024i; fa-long 8016384+1024i; scale 8020480+1024i; kit-ib 8028672, 8029696; ic-long 8030720+1024i (i = 0..4 in the key order above); slope 8035840, 8036864, 8037888; confirm-ic 8038912, 8039936 (all 1,024 used); next free 8040960. Replica train, 4,000,000-seed blocks: ib-long 900000000+4000000i; fa-long 932000000+; scale 948000000+; ic-long 980000000+4000000i; slope 1000000000, 1004000000, 1008000000 (scaling markets at block +3999000); next free 1012000000. Holdout: round 1 41010000; round 2 uses 41030000..+8191, then +10000 a round. ES seeds used: 20261101..08, 20261111..14, 20261121..28, 20261131..35, 20261141..43.\n\nNEXT EPISODE (wakes when ib-long, fa-long, kit-ib, ic-long, slope and confirm-ic settle, or after 150 minutes; ib-long's 3 held items may still be running).\n1. Per result: blocked, gates, speed and cpus, generations, search_minutes. Count how many seats passed the speed gate per port: that sets how wide round 2 must be to get enough trained legs.\n2. Pool confirm-ic's two blocks, plus every speed-blocked ic-long or slope item's START-minus-IB block: is IC > IB by 2 se? If yes IC's line is the main line and later reals may pair against IC as well as IB.\n3. Rank trained legs by replica_validation.frozen_vs_IB (se near 0.008, same holdout seeds for all of round 1, so lines compare directly) and check real.paired_vs_IB (se near 0.03) agrees. Requester's rule: confirm the best on two fresh blocks of 1,024 (the confirm brief with CAND = the result's id, after fetching that URL once), promote at > 2 se, continue from the promoted weights plus the next two best; frozen `params` only. A file confirmed >= +0.3 over IB on 2,048 seeds: report its complete code and sha256.\n4. Round 2 (about 30 items): legs from the best three starts, most from the best; settings around what gained most per generation; if slope beat plain ic-long legs, continue the slope variant (its result is its own START). Spawn the confirmations in the same episode.\n5. scale: if its released items trained, `resume` it. If they blocked on speed, take its unreleased items with itemsFrom under a mended brief: steady-state speed as mend 1, allowed to specialise the kit's generalized port to the fixed shape (gate A proven again), and started from IC's weights rather than IA's. Keep the kit line only if an item ends within 0.1 of the best ib/ic leg or gains faster per minute. kit-ib: if identity held, widening IB on the diet is open too.\n6. Budget: 160 items, 7 episodes left: rounds of 25 to 30 in episodes 4..8, a last confirmation of the final file on 2,048 fresh seeds in 9, finish in 10. The write-up list is in EP2's notes; add the quartiles.",
 "spawn": [
  {
   "name": "ic-long",
   "brief": "One leg of a training relay; a later leg starts from your result. Follow the goal's objective (SETUP, GATES, REAL ENGINE) exactly; this adds the rest.\n\nFILES (`_zb64` = base64 of zlib; check each sha256; a JSON's sha256 is its URL id). START = https://api.imd.fun/artifacts/a97fa964e707df8aff4feb6a2dd8532d33189b88fe3c217749968d5216efd139: `code_zb64`, `port_zb64` (its exact port; `notes`: how its W is built from `params`), `params` (its weights); its `hashes.artifacts` give by id `IA` (`params`; same port), `replica` (`replica_source`) and `RS2_port` (`differential_test_source`: an EVM-against-port test). IB = the goal's IB file: `code_zb64`, `port_zb64` (its own port), `params`.\n\nSTEPS.\n1. SETUP; fetch and check the files.\n2. Gate A. Gate B: the replica gain of START over IA on seeds 7236864..7237375 within 0.15 of the real +0.378. Speed: steady-state replica markets/s of START's port on the search's own persistent pool (a process per CPU, 2,048+ markets x 10,000 steps, pool start and compile excluded). A failed gate: return your measurements with blocked={step,error}. Speed under 300: the same and no search, but still run step 6 for IB and START.\n3. Search: CMA-ES (pycma) over the 178 weights from START's `params` (never an ES-state vector); scale per weight = RMS of its group (W1,b1,W2,b2); ES seed {{esseed}}; population {{pop}}; sigma0 {{sigma}}, capped at sigma0 x 0.5^(search minutes/{{half}}). Generation g: all proposals on the same 512 fresh replica markets from seed {{train}}+512g; fitness = mean edge. Every 10 generations score the ES mean and the generation's best on monitor seeds 30000000..30002047; keep the best. Search 75+ minutes, or until 25 minutes before your time ends.\n4. Freeze the best-monitor weights rounded to 1e-6: START's Solidity with only the weight constants replaced. Gate C on it.\n5. Replica holdout, once: frozen, START's and IB's weights (IB in its own port), seeds 41010000..41018191, paired.\n6. REAL ENGINE, once: IB's Solidity, START's and the frozen one, seeds {{real}}..+511; gas_stats per arm.\n\nRESULT: one JSON object under 60,000 bytes a later leg can start from: START's keys with `params` (W1,b1,W2,b2), `code_zb64` and `code_sha256` the frozen ones, and: status; blocked; gates{A,B,C}; speed{markets_per_s,processes,cpus}; search{generations,search_minutes,curve: up to 40 rows [generation, minutes, monitor gain over START, se, sigma]}; replica_validation{frozen_vs_start,frozen_vs_IB: n,mean_diff,se}; real{seeds,paired_vs_IB{n,mean_diff,se,worst5},paired_vs_start,by_quartile,retail and arb deltas,mean_edge}; gas{afterSwap_peak,oog,gas_stats}; valid; notes. by_quartile: the seeds in quartiles of IB's retail volume (q1 quietest), each n, mean_diff, se of frozen minus IB and START minus IB. If nothing beat START on the monitor, return START's weights and say so.",
   "items": [
    {
     "key": "ic-s30-h40-p16",
     "vars": {
      "esseed": "20261131",
      "pop": "16",
      "sigma": "0.03",
      "half": "40",
      "train": "980000000",
      "real": "8030720"
     }
    },
    {
     "key": "ic-s30-h40-p32",
     "vars": {
      "esseed": "20261132",
      "pop": "32",
      "sigma": "0.03",
      "half": "40",
      "train": "984000000",
      "real": "8031744"
     }
    },
    {
     "key": "ic-s50-h30-p16",
     "vars": {
      "esseed": "20261133",
      "pop": "16",
      "sigma": "0.05",
      "half": "30",
      "train": "988000000",
      "real": "8032768"
     }
    },
    {
     "key": "ic-s20-h60-p16",
     "vars": {
      "esseed": "20261134",
      "pop": "16",
      "sigma": "0.02",
      "half": "60",
      "train": "992000000",
      "real": "8033792"
     }
    },
    {
     "key": "ic-s50-h30-p32",
     "vars": {
      "esseed": "20261135",
      "pop": "32",
      "sigma": "0.05",
      "half": "30",
      "train": "996000000",
      "real": "8034816"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 64000
   },
   "merge": {
    "groupSize": 25,
    "brief": "No merge is needed: hand each item's result on as it is, unchanged."
   }
  },
  {
   "name": "slope",
   "brief": "A relay leg: the search sets the fee's slope on retail volume. Follow the goal's objective (SETUP, GATES, REAL ENGINE) exactly; this adds the rest.\n\nFILES (`_zb64` = base64 of zlib; check each sha256; a JSON's sha256 is its URL id). START = https://api.imd.fun/artifacts/a97fa964e707df8aff4feb6a2dd8532d33189b88fe3c217749968d5216efd139: `code_zb64`, `port_zb64` (its exact port; `notes`: how its W is built from `params`), `params` (its weights); its `hashes.artifacts` give by id `IA` (`params`; same port), `replica` (`replica_source`) and `RS2_port` (`differential_test_source`: an EVM-against-port test). IB = the goal's IB file: `code_zb64`.\n\nSTEPS.\n1. SETUP; fetch and check the files.\n2. Gate A. Gate B: the replica gain of START over IA on seeds 7236864..7237375 within 0.15 of the real +0.378.\n3. VARIANT, in port and Solidity alike: (a) a 20th head input lambdaHat x sizeHat (T's flow_size), scaled by START's `params.new_input_scaling` rule on the 256 replica markets from seed {{train}}+3999000, its eight weights 0; (b) LAMBDA_COEF, FLOW_SIZE_COEF and the anchor's linear and quadratic k each = START's value x exp(z), z = 0. Identity: so set, port and Solidity both give START's fees on gate A's sequences. Gas on real seeds {{real}}+512..+527: no OOG, afterSwap peak <= 245,000. Speed: steady-state replica markets/s of its port on the search's own persistent pool (a process per CPU, 2,048+ markets x 10,000 steps, pool start and compile excluded). A failure or speed under 300: no search, return blocked={step,error} with your measurements.\n4. Search: CMA-ES (pycma) over the 186 weights and four z; initial sd per weight = 0.03 x RMS of its group (W1,b1,W2,b2); per z = {{csig}}; ES seed {{esseed}}; population {{pop}}; step capped at its start x 0.5^(search minutes/40). Generation g: all proposals on the same 512 fresh replica markets from seed {{train}}+512g; fitness = mean edge. Every 10 generations score the ES mean and the generation's best on monitor seeds 30000000..30002047; keep the best. Search 75+ minutes, or until 25 minutes before your time ends.\n5. Freeze the best: weights rounded to 1e-6, the constants as Solidity holds them, and in the port. Gate C. Replica holdout, once: frozen and START, seeds 41010000..41018191, paired.\n6. REAL ENGINE, once: IB's Solidity, START's and the frozen one, seeds {{real}}..+511; gas_stats per arm.\n\nRESULT: one JSON object a later leg can start from: START's keys with `params` (W1 8x20, scaling, the four constants), code and port (zb64, sha256) the frozen variant's, and: blocked; gates; speed; search{generations,search_minutes,curve}; replica_validation{frozen_vs_start: n,mean_diff,se}; real{seeds,paired_vs_IB{n,mean_diff,se,worst5},paired_vs_start,by_quartile,retail and arb deltas,mean_edge}; gas{afterSwap_peak,oog,gas_stats}; valid; notes. by_quartile: the seeds in quartiles of IB's retail volume (q1 quietest), each n, mean_diff, se of frozen minus IB and START minus IB.",
   "items": [
    {
     "key": "slope-c05-p16",
     "vars": {
      "esseed": "20261141",
      "pop": "16",
      "csig": "0.05",
      "train": "1000000000",
      "real": "8035840"
     }
    },
    {
     "key": "slope-c15-p16",
     "vars": {
      "esseed": "20261142",
      "pop": "16",
      "csig": "0.15",
      "train": "1004000000",
      "real": "8036864"
     }
    },
    {
     "key": "slope-c10-p32",
     "vars": {
      "esseed": "20261143",
      "pop": "32",
      "csig": "0.10",
      "train": "1008000000",
      "real": "8037888"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 64000
   },
   "merge": {
    "groupSize": 25,
    "brief": "No merge is needed: hand each item's result on as it is, unchanged."
   }
  },
  {
   "name": "confirm-ic",
   "brief": "Confirm one candidate against IB on the real engine; no search, no replica. Follow the goal's objective (SETUP, REAL ENGINE) exactly; this brief adds the rest.\n\nFILES (`_zb64` = base64 of zlib; check each sha256; a JSON's sha256 is its URL id). CAND = https://api.imd.fun/artifacts/a97fa964e707df8aff4feb6a2dd8532d33189b88fe3c217749968d5216efd139: `code_zb64` (Solidity), `port_zb64` (its exact float port; `notes`: how its W argument is built from `params`), `params` (the frozen weights); its `hashes.artifacts` give by id `RS2_port` (`differential_test_source`: an EVM-against-port test to adapt). IB = the goal's IB file: `code_zb64`.\n\nSTEPS.\n1. SETUP; fetch and check the files.\n2. The goal's gate C on CAND: its Solidity in the EVM against its port with its `params`, 50 x 2,000 callbacks, largest fee difference under 0.1 bps.\n3. REAL ENGINE, once: IB's Solidity and CAND's, each alone, seeds {{real}}..+1023 in 64-seed chunks, saving state under scratch/ between chunks; gas_stats per arm.\n\nRESULT: one JSON object: status; blocked; gates{C}; seeds; paired{n,mean_diff,se,sum,sumsq,worst5} of CAND minus IB; means_per_64_seeds (16 numbers); by_quartile: the seeds in quartiles of IB's retail volume (q1 quietest), each with n, mean_diff, se and each arm's mean edge and mean retail volume; retail and arb deltas; mean_edge per arm; gas{afterSwap_peak,oog,gas_stats} per arm; valid (false on any OOG or an afterSwap peak over 245,000); CAND's complete Solidity as plain `code` with code_sha256; notes. Report only what you measured; if SETUP fails return blocked={step,error}.",
   "items": [
    {
     "key": "ic-block-a",
     "vars": {
      "real": "8038912"
     }
    },
    {
     "key": "ic-block-b",
     "vars": {
      "real": "8039936"
     }
    }
   ],
   "output": {
    "format": "json",
    "maxBytes": 64000
   },
   "merge": {
    "groupSize": 25,
    "brief": "No merge is needed: hand each item's result on as it is, unchanged."
   }
  }
 ],
 "read": [
  "ic-long/ic-s30-h40-p16",
  "ic-long/ic-s30-h40-p32",
  "ic-long/ic-s50-h30-p16",
  "ic-long/ic-s20-h60-p16",
  "ic-long/ic-s50-h30-p32",
  "slope/slope-c05-p16",
  "slope/slope-c15-p16",
  "slope/slope-c10-p32",
  "confirm-ic/ic-block-a",
  "confirm-ic/ic-block-b"
 ],
 "cancel": [],
 "pause": [
  "scale"
 ],
 "wake": {
  "batches": [
   "ib-long",
   "fa-long",
   "kit-ib",
   "ic-long",
   "slope",
   "confirm-ic"
  ],
  "afterMinutes": 150
 },
 "finish": false
}
