{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3178-build-shared-evaluation-kit/45e7563d1a29ffca9d608fdf60c90bf2624d2d01/README.md",
      "quote": "<!-- Credit: Taylor (gtmcknight), amm-sim@4812a6382311624e1506aca131ca35c378f930d9 research/solved, solved-policy research. -->\n# Shared AMM evaluation kit\n\nBuilt on [Taylor (gtmcknight)'s solved-policy research](https://github.com/gtmcknight/amm-sim/tree/4812a6382311624e1506aca131ca35c378f930d9/research/solved),\n`amm-sim@4812a6382311624e1506aca131ca35c378f930d9 research/solved`, for the\n[Paradigm"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/fetch.sh",
      "quote": "#!/bin/sh\n# Fetch ../solved and this folder into ONE directory and check every file's sha256.\n# usage: sh fetch.sh <raw URL of research/ at a commit> [dir]        default dir: test/scratch/amm\n# This folder's README.md lands as TELL.md and its fetch.sh as fetch-tell.sh; ../solved keeps its names.\nset -eu\nB=$1; D=${2:-test/scratch/amm}\nmkdir -p \"$D/"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/solved/README.md",
      "quote": "10000  448.261189  443.455598  443.522608  443.663520\n10001  576.779199  571.463409  571.623551  571.977293\n10002  531.886497  525.168028  525.865859  526.411631\n\npython3 -I evalpol.py pol_mid.json hold                          # 538.261, vs HA +8.704 se 0.047\npython3 -I track.py pol_mid.json none rival,count                # +8.704, +8.499\npython3 -I real.py pol_mid.json plain:soft=1 qm:soft=1,qm"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/solved/SHA256SUMS",
      "quote": "fdf24c7aa2b604d770336a5783276da8ed4d50bca9dbcc02e98b4da58f608d26  calib_out_2048.json\n4bd79bfad7e6b6bb5471c72019e1c39b8fceaa880c05f4f98378a88823aaa1ce  clsdata.py\nf362ad97bf49dcc80312ced8f4785259445d615703c22d60bd7a0fc9b14f6578  dp.py\n27fa051b1dfc3a5da824596c59ed5140823049ab05fd18185a4ece1995d65df1  evalpol.py\nb1b374010c5afe28d27edb529e86bf3274d498"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/SHA256SUMS",
      "quote": "58313183f81d5a0ba6a5e3454645bd3572c1fe5366694ad72242b7ad932a9714  README.md\n5c567e2dbfcb461e5fad98003c28a66e9c7e0d154e15c962742ffe61e82b8ea9  check.py\ne15046bbf222840e7f1b9fdbf6c151d7e6e3ae92580095d8012cbac6f3ae9628  fetch.sh\n10d22059f380d5abcf596ebd206c0b60aaf1eb67e08684d21016a6d99c180e6e  mirror.py\nad382c07e6c2b3a5a8055ea767e140b7461105f29dafee69"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/solved/run.py",
      "quote": "\"\"\"Score a policy on a range of replica seeds, showing it only what afterSwap shows a contract.\n\nusage: python3 -I run.py <policy> <seed0> <n> <out.json> [key=val ...]\n  policy   perfect            the solved policy with the true price and rival spot (not blind)\n           gauss              real.py's Gaussian filter      e.g. soft=1 qm=qm_k1e-5.js"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/tellpol.py",
      "quote": "\"\"\"The solved policy with the arbitrage test in place of its guess, on the replica, blind.\n\n  python3 -I run.py tellpol:TellPolicy 10000 2048 out.json soft=1 qm=qm_k1e-5.json\n  python3 -I pair.py out.json ref/gauss_qm.json        # +3.21: what the test adds to the policy the ports implement\n  python3 -I pair.py out.json ref/flag_qm.json         # -"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/tellref.py",
      "quote": "\"\"\"The arbitrage test in whole numbers only, as a contract has to do it.\n\nA contract's afterSwap is handed four integers a trade (amountX, amountY, reserveX, reserveY, each the\nengine's f64 times 1e18, truncated) and it knows two more things it can keep itself: the reserves its\nprevious callback was handed and the fees it returned then.  `is_arb` a"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/solved/real.py",
      "quote": "\"\"\"Solved policy driven ONLY by what afterSwap sees (side, amounts, timestamp, reserves).\n\nFilter: Gaussian belief over ln p (mean, variance).\n  - new step: variance grows by sigma^2 a step; steps with no trade of ours truncate the belief to our no-arb interval\n  - first trade of a step: arb or retail by likelihood ratio. Arb => p is exact (post-tr"
    },
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/solved/replica2.py",
      "quote": "\"\"\"Pure-Python replica of benedictbrady/amm-challenge @6b6921f8 (engine.rs, cfmm.rs,\narbitrageur.rs, router.rs, retail.rs), written from the source for ceiling experiments.\nRNG streams differ from the Rust engine, so absolute scores move by the seed set;\ncompare policies paired on the same seeds.\n\nA policy gets a callback after every trade on its o"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3178-build-shared-evaluation-kit/45e7563d1a29ffca9d608fdf60c90bf2624d2d01/score.py",
      "quote": "def summarize(pairs):\n    if not pairs:\n        return {'n': 0, 'mean_diff': None, 'se': None, 'worst5': []}\n    diffs = [diff for seed, diff in pairs]\n    mean = finite(statistics.mean(diffs), 'mean difference')\n    se = finite(statistics.stdev(diffs) / math.sqrt(len(diffs)), 'standard error') if len(diffs) > 1 else None\n    worst = sorted(pairs, key=lambda pair: (pair[1], pair[0]))[:5]\n    retur"
    },
    {
      "url": "https://api.imd.fun/artifacts/f5a140f51df99423d6ede60b618dbc6eabc37a3050ac439c80dc3824191e9f59",
      "quote": "176f8115fb67d99340f1de1e6994042dfaa41f830c22e000595df3377cc6a2b3"
    }
  ]
}