Learnabolic
give AI agents (recursive) self-improvement
Your 👍 is the gradient.
No API key. No model. ~150 lines of math.
live sim · gen 0 · fitness —
§ 02 · use it in 60 seconds
Install. Tell your agent. Score each use.
Install the skill
Claude Code, Codex, Cursor and any agent that can run shell commands. Node ≥ 20.
Name the skill to improve
“Track my commit-message skill with learnabolic and learn from my ratings.”
Your agent snapshots that skill as v0. Before every use it runs
pickand follows the version it gets.Score every use
- Rate it
- Say “8/10” or 👍. Your agent runs
score commit-message 8. - Let your tests score it
- Add
- tests (w=1): auto higherto.learnabolic/bugfix/goals.md, then say: “after each fix, run the tests and score how many pass.” Your agent runsscore bugfix 42 --kr tests.autoranks each count against your last 50 runs, so any suite size works. - Or say nothing
- Output you accept unchanged scores top marks; output you rewrite scores bottom.
A real run, replayed. You only rate; the statistics decide.
champion v0 gen 0
challengersreject ◂ evidence ▸ promote
your ratings0 uses
Loading the recorded run…
§ 03 · how it improves itself
Every use is a tiny, safe experiment.
- PickYour agent asks which version to follow: usually the champion, sometimes a challenger with one small edit.
- ScoreYou, your tests or a stopwatch give that use a number. Nothing else is measured.
- RatchetA challenger replaces the champion only once it wins on enough scores. Losers are dropped, so nothing worse ships.
- ProposeLearnabolic picks the kind of edit that paid off before. Your agent writes the next small edit.
| Skill | Score it with | goals.md line | An edit it might keep |
|---|---|---|---|
| Commit messages | your 0–10 rating | - quality (w=1): 0..10 higher target 8 | + Keep the subject under 50 characters. |
| Bug fixes | tests passing after the fix | - tests (w=1): auto higher | + Reproduce the bug with a failing test first. |
| SQL queries | query time in ms | - speed (w=1): 0..2000 lower target 500 | + Filter rows before joining. |
| Code review | accepted as-is vs. edited | - quality (w=1): 0..10 higher target 8 | + Lead with the one blocking issue. |
| Support replies | 👍 / 👎 | - thumbs (w=1): 0..1 higher | + Link the exact docs page. |
| Landing copy | conversion % | - conversion (w=1): 0..10 higher target 4 | + State the price above the fold. |
The edits are examples. Which ones survive is decided by your scores, not by the model.
§ 04 · the problem
- Agents forget what worked.
- Every session starts from zero.
- Fine-tuning is out of reach. Prompt tweaking is guesswork.
§ 05 · the idea
The LLM proposes, statistics disposes.
kept 0 · n = 0
§ 06 · any score
If you can measure it, or rate it, learnabolic can use it to improve your agent.
- 👍
s = 1.00 - 7/10
s = 0.88 - 182 ms
s = 1.00 - 42/45 tests
s = 0.50 - 3.1% conversion
s = 0.78
- thumbs (w=1): 0..1 higher - quality (w=1): 0..10 higher target 8 - speed (w=0.3): 0..2000 lower target 500 - tests (w=0.5): auto higher - conversion (w=1): 0..10 higher target 4
§ 07 · the four instruments
Counting, not judging.
Bets on promising candidates without starving the rest.
Learns where to push: tighten, prune, explore…
Keeps a change only when the evidence says so. Then never slips back.
Notices when it's stuck, then explores.
Why no LLM judge? Judges drift, flatter and cost tokens. Counting doesn't.
§ 08 · goals steer
Goals steer; humans own the North Star.
§ 09 · live lab
Watch it learn, live.
Pick two: Correct, Fast, Cheap. Then watch it learn your taste.
§ 10 · portable brains
A brain is just a SKILL.md.
--- name: sim description: Correct, Fast, Cheap, learned in the Learnabolic Lab. --- # Coding habits Strength 0–1: how often the agent does it. - Write a failing test first (0.00) - Read the whole file before editing (0.80) - Reuse existing helpers (0.86) - Answer in one pass, skip re-checks (0.65) - Keep diffs small (0.90) - Run the full test suite after each change (0.00)```learnabolic { "version": 1, "generation": 15, "q": { "correct|flat": { "tighten": -0.025210390978246677, "emphasize-weakest-kr": -1.1091207952387683, "add-example": -1.0645384726967049, "explore": -0.982775643811597, "reorder": -1.0641952393127705, "prune": -0.9308111040422842 }, "cheap|flat": { "reorder": 0.032225360000000036, "emphasize-weakest-kr": 0.71245, "prune": 0.6944916666666667 }, "cheap|up": { "emphasize-weakest-kr": 1.1748835466666667, "add-example": 0.7455333333333333 }, "correct|up": { "tighten": 0.26, "prune": -0.4193918852993734, "add-example": -0.6080166121583175, "reorder": 0.0002642267989333702, "emphasize-weakest-kr": 0.20865139337578326 }, "correct|down": { "explore": 0.07474889337578339, "reorder": -0.16130464764556363, "tighten": 0.2262 } }, "fitnessHistory": [ 0.4185510699338983, 0.4185510699338983, 0.4185510699338983, 0.45532911077564897, 0.45109968371782677, 0.5018051015800572, 0.5266047328662946, 0.5612413968448526, 0.5669307372621828, 0.557596907934775, 0.5585242915724078, 0.6092103185292265, 0.6092103185292265, 0.6174896901796522, 0.6162652688199115, 0.6138004345546706, 0.6136325305840912, 0.6106750113707854, 0.6198476205184079, 0.6180247546058769, 0.6255667654796718, 0.6181568701494322, 0.6215617878817765, 0.619442200916749, 0.607366959403693, 0.6411773383895388, 0.6359955905763048, 0.6379649423819049, 0.6386553534693458, 0.6319588084946842, 0.6329792371079757, 0.6355738064204125, 0.6441623791654043, 0.6342062666545438, 0.631232542246862, 0.6362995909343356, 0.6362995909343356, 0.6335094530591927, 0.6336436805565426, 0.640184509563759, 0.6406878297946912, 0.6382962556595023, 0.6344966209934009, 0.6344966209934009, 0.6223205991350939, 0.6259578231945959, 0.624484599802904, 0.6211752227754676, 0.6279557349626201, 0.6274239766174715, 0.6496465854163999, 0.6516629148912165, 0.6499306901356137, 0.6422274596899268, 0.6407615429200538, 0.6389557298861409, 0.6442408077179567, 0.6459147492824876, 0.64841378815384, 0.6491813703265527, 0.5994536694873139, 0.6368341073170858, 0.6401019241396293, 0.637838009538097, 0.6520293641285502, 0.6439441601857132, 0.6438240474467677, 0.6438240474467677, 0.6466825113699703, 0.6512035790895015, 0.6512078356774467, 0.6458368213654477, 0.627979660364941, 0.6425688866957622, 0.6373025465780262, 0.6365413416518353, 0.6346643904156101, 0.6392552349591598, 0.6499623191539247, 0.6475799983748709, 0.6482736137896145, 0.6481647795950469, 0.6449799291120413, 0.6490772212601349, 0.64643596073202, 0.64643596073202, 0.6452874961604277, 0.6426935572176797, 0.6529444391477058 ], "lineage": [ { "id": "v0", "parent": null, "direction": null, "generation": 0 }, { "id": "v6", "parent": "v0", "direction": "emphasize-weakest-kr", "generation": 1 }, { "id": "v9", "parent": "v6", "direction": "emphasize-weakest-kr", "generation": 2 }, { "id": "v12", "parent": "v9", "direction": "reorder", "generation": 3 }, { "id": "v14", "parent": "v12", "direction": "add-example", "generation": 4 }, { "id": "v17", "parent": "v14", "direction": "emphasize-weakest-kr", "generation": 5 }, { "id": "v21", "parent": "v17", "direction": "emphasize-weakest-kr", "generation": 6 }, { "id": "v26", "parent": "v21", "direction": "prune", "generation": 7 }, { "id": "v41", "parent": "v26", "direction": "reorder", "generation": 8 }, { "id": "v45", "parent": "v41", "direction": "explore", "generation": 9 }, { "id": "v56", "parent": "v45", "direction": "tighten", "generation": 10 }, { "id": "v61", "parent": "v56", "direction": "tighten", "generation": 11 }, { "id": "v73", "parent": "v61", "direction": "explore", "generation": 12 }, { "id": "v85", "parent": "v73", "direction": "tighten", "generation": 13 }, { "id": "v88", "parent": "v85", "direction": "tighten", "generation": 14 }, { "id": "v120", "parent": "v88", "direction": "tighten", "generation": 15 } ], "ledger": [ {"t":"2026-10-03T20:23:51.126Z","event":"reject","variant":"v94","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.6520293641285502}, {"t":"2026-10-03T20:23:51.126Z","event":"reject","variant":"v95","direction":"tighten","s":null,"decision":"reject","fitness":0.6439441601857132}, {"t":"2026-10-03T20:23:51.127Z","event":"reject","variant":"v96","direction":"add-example","s":null,"decision":"reject","fitness":0.6438240474467677}, {"t":"2026-10-03T20:23:51.127Z","event":"propose","variant":"v97","direction":"add-example","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.127Z","event":"propose","variant":"v98","direction":"add-example","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.127Z","event":"reject","variant":"v99","direction":"reorder","s":null,"decision":"reject","fitness":0.6438240474467677}, {"t":"2026-10-03T20:23:51.127Z","event":"reject","variant":"v97","direction":"add-example","s":null,"decision":"reject","fitness":0.6466825113699703}, {"t":"2026-10-03T20:23:51.128Z","event":"reject","variant":"v98","direction":"add-example","s":null,"decision":"reject","fitness":0.6512035790895015}, {"t":"2026-10-03T20:23:51.128Z","event":"propose","variant":"v100","direction":"prune","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.128Z","event":"propose","variant":"v101","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.128Z","event":"propose","variant":"v102","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.128Z","event":"reject","variant":"v100","direction":"prune","s":null,"decision":"reject","fitness":0.6512078356774467}, {"t":"2026-10-03T20:23:51.129Z","event":"reject","variant":"v101","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.6458368213654477}, {"t":"2026-10-03T20:23:51.130Z","event":"reject","variant":"v102","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.627979660364941}, {"t":"2026-10-03T20:23:51.130Z","event":"propose","variant":"v103","direction":"reorder","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.130Z","event":"propose","variant":"v104","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.130Z","event":"propose","variant":"v105","direction":"reorder","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.131Z","event":"reject","variant":"v104","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.6425688866957622}, {"t":"2026-10-03T20:23:51.131Z","event":"reject","variant":"v105","direction":"reorder","s":null,"decision":"reject","fitness":0.6373025465780262}, {"t":"2026-10-03T20:23:51.132Z","event":"reject","variant":"v103","direction":"reorder","s":null,"decision":"reject","fitness":0.6365413416518353}, {"t":"2026-10-03T20:23:51.132Z","event":"propose","variant":"v106","direction":"add-example","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.132Z","event":"propose","variant":"v107","direction":"add-example","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.132Z","event":"propose","variant":"v108","direction":"reorder","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.132Z","event":"reject","variant":"v106","direction":"add-example","s":null,"decision":"reject","fitness":0.6346643904156101}, {"t":"2026-10-03T20:23:51.133Z","event":"reject","variant":"v108","direction":"reorder","s":null,"decision":"reject","fitness":0.6392552349591598}, {"t":"2026-10-03T20:23:51.133Z","event":"reject","variant":"v107","direction":"add-example","s":null,"decision":"reject","fitness":0.6499623191539247}, {"t":"2026-10-03T20:23:51.134Z","event":"propose","variant":"v109","direction":"explore","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.134Z","event":"propose","variant":"v110","direction":"reorder","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.134Z","event":"propose","variant":"v111","direction":"prune","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.135Z","event":"reject","variant":"v110","direction":"reorder","s":null,"decision":"reject","fitness":0.6475799983748709}, {"t":"2026-10-03T20:23:51.136Z","event":"reject","variant":"v109","direction":"explore","s":null,"decision":"reject","fitness":0.6482736137896145}, {"t":"2026-10-03T20:23:51.136Z","event":"reject","variant":"v111","direction":"prune","s":null,"decision":"reject","fitness":0.6481647795950469}, {"t":"2026-10-03T20:23:51.136Z","event":"propose","variant":"v112","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.136Z","event":"propose","variant":"v113","direction":"tighten","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.136Z","event":"propose","variant":"v114","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.137Z","event":"reject","variant":"v113","direction":"tighten","s":null,"decision":"reject","fitness":0.6449799291120413}, {"t":"2026-10-03T20:23:51.137Z","event":"reject","variant":"v112","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.6490772212601349}, {"t":"2026-10-03T20:23:51.138Z","event":"reject","variant":"v114","direction":"emphasize-weakest-kr","s":null,"decision":"reject","fitness":0.64643596073202}, {"t":"2026-10-03T20:23:51.138Z","event":"propose","variant":"v115","direction":"explore","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.138Z","event":"propose","variant":"v116","direction":"prune","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.138Z","event":"reject","variant":"v117","direction":"reorder","s":null,"decision":"reject","fitness":0.64643596073202}, {"t":"2026-10-03T20:23:51.139Z","event":"reject","variant":"v115","direction":"explore","s":null,"decision":"reject","fitness":0.6452874961604277}, {"t":"2026-10-03T20:23:51.139Z","event":"reject","variant":"v116","direction":"prune","s":null,"decision":"reject","fitness":0.6426935572176797}, {"t":"2026-10-03T20:23:51.139Z","event":"propose","variant":"v118","direction":"add-example","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.139Z","event":"propose","variant":"v119","direction":"prune","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.139Z","event":"propose","variant":"v120","direction":"tighten","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.140Z","event":"promote","variant":"v120","direction":"tighten","s":null,"decision":"promote","fitness":0.6529444391477058}, {"t":"2026-10-03T20:23:51.141Z","event":"propose","variant":"v121","direction":"tighten","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.141Z","event":"propose","variant":"v122","direction":"tighten","s":null,"decision":null,"fitness":null}, {"t":"2026-10-03T20:23:51.141Z","event":"propose","variant":"v123","direction":"emphasize-weakest-kr","s":null,"decision":null,"fitness":null} ], "envId": "sim", "policy": "# Coding habits\n\nStrength 0–1: how often the agent does it.\n\n- Write a failing test first (0.00)\n- Read the whole file before editing (0.80)\n- Reuse existing helpers (0.86)\n- Answer in one pass, skip re-checks (0.65)\n- Keep diffs small (0.90)\n- Run the full test suite after each change (0.00)\n" } ```
cli export- push to GitHub
npx skills add you/your-brain
It keeps learning from where you left off.
§ 11 · coming next
More worlds to learn in.
coming soon
Touchdown
A model that never sees the game writes a lander autopilot, and learns from scores alone.
Follow on GitHub →coming soon
Ratcheted autoresearch
Karpathy's overnight loop, with noise-aware keeps and a learned research taste.
Follow on GitHub →§ 12 · inspirations and credits
Standing on good shoulders.
- Memento: soft Q-learning over memory, LLM frozen.
- ACE: delta edits, not rewrites.
- karpathy/autoresearch: the keep/revert ratchet.
Built at Sundai X Copenhagen, October 2026. Theme: reinforcement learning for agents.
Acknowledgements: thanks to Connie for brainstorming the idea together at Sundai X Copenhagen, 3 October 2026.
§ 13 · learnabolic