From 24c4e94a6b6e62708f5916e0f12dc6973f16bcb9 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 13 Mar 2026 14:50:26 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20feat:=20LLM=20seed=20=E2=80=94=20Momentu?= =?UTF-8?q?m=20Follower=20optimizer=20(#674)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../push3-evolution/seeds/llm_momentum.push3 | 73 +++++++++++++++++++ tools/push3-evolution/seeds/manifest.jsonl | 1 + 2 files changed, 74 insertions(+) create mode 100644 tools/push3-evolution/seeds/llm_momentum.push3 diff --git a/tools/push3-evolution/seeds/llm_momentum.push3 b/tools/push3-evolution/seeds/llm_momentum.push3 new file mode 100644 index 0000000..13ccbe7 --- /dev/null +++ b/tools/push3-evolution/seeds/llm_momentum.push3 @@ -0,0 +1,73 @@ +;; llm_momentum.push3 — Momentum Follower Optimizer +;; +;; Strategy: "follow the crowd, but keep a safety net." +;; +;; Philosophy: +;; High staking % → bull: wide discovery, high anchor share +;; Low staking % → bear: floor-heavy, narrow anchor, minimal discovery +;; +;; Uses smooth transitions (no hard if/else): percentageStaked directly +;; scales all output parameters via multiplication. +;; +;; Floor always gets at least 20% of ETH (safety net): +;; anchorShare is capped at 0.8e18 (= percentageStaked * 0.8). +;; +;; AnchorWidth is proportional to tax rate spread: +;; high tax rate → volatile market → wider anchor bands. +;; +;; Inputs on DYADIC stack (slot 0 on top, slot 7 at bottom): +;; [0] percentageStaked (0..1e18, where 1e18 = 100%) +;; [1] averageTaxRate (0..1e18) +;; [2-7] unused (normalized indicators, future use) +;; +;; Outputs (DYADIC stack at termination, bottom to top): +;; discoveryDepth = percentageStaked (0..1e18, direct scaling) +;; anchorWidth = 20 + taxRate * 80 / 1e18 (20..100 ticks) +;; anchorShare = percentageStaked * 0.8 (0..0.8e18, safety net) +;; ci = 0 +;; +;; At 0% staked: DD=0, AW=20, AS=0, CI=0 (full floor, minimal discovery) +;; At 50% staked: DD=0.5e18, AW=*, AS=0.4e18, CI=0 +;; At 100% staked: DD=1e18, AW=100, AS=0.8e18, CI=0 (anchor-heavy, full discovery) + +( + ;; Step 1: Bind slot 0 (percentageStaked) and slot 1 (averageTaxRate). + PERCENTAGESTAKED DYADIC.DEFINE + ;; Stack: [slot7, slot6, slot5, slot4, slot3, slot2, slot1] + TAXRATE DYADIC.DEFINE + ;; Stack: [slot7, slot6, slot5, slot4, slot3, slot2] + + ;; Step 2: Discard unused inputs (slots 2-7) — 6 pops. + DYADIC.POP + DYADIC.POP + DYADIC.POP + DYADIC.POP + DYADIC.POP + DYADIC.POP + ;; Stack: [] + + ;; Step 3: Push discoveryDepth = percentageStaked (0..1e18) + ;; Momentum: high staking → full discovery; low staking → no discovery. + PERCENTAGESTAKED + ;; Stack: [discoveryDepth] + + ;; Step 4: Push anchorWidth = 20 + averageTaxRate * 80 / 1e18 (ticks: 20..100) + ;; High tax spread → volatile market → wider anchor bands (bear-like). + ;; Low tax spread → stable market → narrow anchor bands (bull-like). + TAXRATE + 80 DYADIC.* + 1000000000000000000 DYADIC./ + 20 DYADIC.+ + ;; Stack: [discoveryDepth, anchorWidth] + + ;; Step 5: Push anchorShare = percentageStaked * 800000000000000000 / 1e18 (0..0.8e18) + ;; Safety net: tops out at 80%, so floor always receives >=20% of ETH. + PERCENTAGESTAKED + 800000000000000000 DYADIC.* + 1000000000000000000 DYADIC./ + ;; Stack: [discoveryDepth, anchorWidth, anchorShare] + + ;; Step 6: Push ci = 0 (capital inefficiency — optimizer output, fixed at 0). + 0 + ;; Stack: [discoveryDepth, anchorWidth, anchorShare, ci=0] +) diff --git a/tools/push3-evolution/seeds/manifest.jsonl b/tools/push3-evolution/seeds/manifest.jsonl index 04be5ec..b015eb3 100644 --- a/tools/push3-evolution/seeds/manifest.jsonl +++ b/tools/push3-evolution/seeds/manifest.jsonl @@ -1,2 +1,3 @@ {"file":"optimizer_v3.push3","fitness":8259844243839650390792,"origin":"hand-written","run":null,"generation":null,"date":"2026-03-10","note":"Original seed optimizer"} {"file":"evo_run004_champion.push3","fitness":2307549972110081697617459,"origin":"evolved","run":"004","generation":3,"date":"2026-03-13","note":"First evolution champion. Fitness inflated by token value (#670). Always-bull strategy."} +{"file":"llm_momentum.push3","fitness":null,"origin":"llm","run":null,"generation":null,"date":"2026-03-13","note":"Momentum Follower: smooth sentiment-tracking via direct percentageStaked multiplication. Safety net: floor always >=20%. AnchorWidth scales with tax volatility."}