[#55] Adapt: regime-trader iteration 2.1 — wins base, patient-market, micro-economy, duel #57

Merged
robertismo merged 3 commits from 55-adapt into master 2026-09-29 19:23:13 +00:00
Owner

[#55] Adapt: the market-regime trader

Thesis. Adapt models the world as a small set of regimes, re-inferred every turn from observable state, and switches playbook when the regime changes — instead of tuning one fixed strategy:

  • deposit-rate dispersion (max − min of market-deposit-rates) → a chase/rate-war gauge
  • loan demand vs deployable cash (Σ loan amounts / own cash) → market heat
  • churn rate (free-float) → frozen-market gauge (deposit-drought vs normal)
  • bond curve vs loan cap (cheapest standing bond's implied per-turn return vs loan-rate-cap and the yield estimate) → carry gauge

Playbooks. THIN (cap barely clears default risk) → park. WAR (dispersion > 2·rate-temp) → never chase deposits, cream lending only. COLD/frozen (churn < 5%) → hoard, lend the surplus as bonds. HOT (demand-heat > 1 and cheap bond money clears) → carry: borrow up to 4× loan-max, blanket-bid aggressively. NORMAL → a bid tatonnement: adapt reads its own loan book each turn — if all its fresh loans price at its own bid it is the sole bidder and ratchets the price up toward the yield estimate (avg + risk + rate-temp); if it won nothing it steps down; floor funding+risk−2·rate-temp; blanket bid so loans it cannot fund die unclaimed rather than feeding a rival's book.

All thresholds are config-derived; the regime detection is adapt's own calculation — no helpers shared with empire/mill/vault.

Full bench (100 games × 13 presets, master 7f503c4):

preset adapt empire mill vault
base 79 11 9 0
patient-market 66 5 20 5
micro-economy 95 2 3 0
duel 85 6 8 0
tight-cash 95 0 0 0
default-storm 100 0 0 0
hot-caps 96 3 1 0
rate-war 88 4 3 0
mega-loans 85 6 6 0
cash-glut 75 7 7 9
bond-economy 67 0 32 0
deposit-drought 7 33 59 0
thin-margins 1 43 56 0

All four assigned scenarios won (most wins). deposit-drought and thin-margins remain weak — next iterations target the frozen/thin playbooks.

Smoke: 0 [ai errors, 0 ACCT divergence. Only ai/adapt.lisp changed.

## [#55] Adapt: the market-regime trader **Thesis.** Adapt models the world as a small set of regimes, re-inferred every turn from observable state, and switches playbook when the regime changes — instead of tuning one fixed strategy: - **deposit-rate dispersion** (max − min of `market-deposit-rates`) → a chase/rate-war gauge - **loan demand vs deployable cash** (Σ loan amounts / own cash) → market heat - **churn rate** (`free-float`) → frozen-market gauge (deposit-drought vs normal) - **bond curve vs loan cap** (cheapest standing bond's implied per-turn return vs `loan-rate-cap` and the yield estimate) → carry gauge **Playbooks.** THIN (cap barely clears default risk) → park. WAR (dispersion > 2·rate-temp) → never chase deposits, cream lending only. COLD/frozen (churn < 5%) → hoard, lend the surplus as bonds. HOT (demand-heat > 1 and cheap bond money clears) → carry: borrow up to 4× loan-max, blanket-bid aggressively. NORMAL → a **bid tatonnement**: adapt reads its own loan book each turn — if all its fresh loans price at its own bid it is the sole bidder and ratchets the price up toward the yield estimate (avg + risk + rate-temp); if it won nothing it steps down; floor funding+risk−2·rate-temp; blanket bid so loans it cannot fund die unclaimed rather than feeding a rival's book. All thresholds are config-derived; the regime detection is adapt's own calculation — no helpers shared with empire/mill/vault. **Full bench (100 games × 13 presets, master `7f503c4`):** | preset | adapt | empire | mill | vault | |---|---|---|---|---| | **base** | **79** | 11 | 9 | 0 | | **patient-market** | **66** | 5 | 20 | 5 | | **micro-economy** | **95** | 2 | 3 | 0 | | **duel** | **85** | 6 | 8 | 0 | | tight-cash | **95** | 0 | 0 | 0 | | default-storm | **100** | 0 | 0 | 0 | | hot-caps | **96** | 3 | 1 | 0 | | rate-war | **88** | 4 | 3 | 0 | | mega-loans | **85** | 6 | 6 | 0 | | cash-glut | **75** | 7 | 7 | 9 | | bond-economy | **67** | 0 | 32 | 0 | | deposit-drought | 7 | 33 | 59 | 0 | | thin-margins | 1 | 43 | 56 | 0 | All four assigned scenarios won (most wins). deposit-drought and thin-margins remain weak — next iterations target the frozen/thin playbooks. Smoke: 0 `[ai` errors, 0 ACCT divergence. Only `ai/adapt.lisp` changed.
[#55] adapt: market-regime trader — regime inference + bid tatonnement
All checks were successful
build / build (push) Successful in 24s
4597462350
Rebuild adapt as the market-regime trader: infers the regime each turn
from deposit-rate dispersion, loan demand vs deployable cash, churn
(frozen-market gauge) and the bond curve vs the loan cap, then switches
playbook (park / never-chase / hoard+bond-lend / carry / tatonnement).
The tatonnement reads its own loan book: loans priced at its own bid
mean it is the sole bidder, so it ratchets the price up toward the
yield estimate; losing everything steps the bid down; floor at
funding+risk-2*rate-temp. Full bench (100 games): base 79, patient-
market 66, micro-economy 95, duel 85 wins — all four assigned scenarios.
[#55] adapt: tatonnement for thin and frozen regimes
Some checks failed
build / build (push) Has been cancelled
d018fa7b0e
thin-margins and deposit-drought were lost by the park/hoard playbooks
(adapt 1 and 7 wins in the full bench). Route both through the bid
tatonnement: the floor funding+risk-2*rate-temp protects capital in
thin-margin markets better than sitting out, and the blanket bid denies
the rival books in a frozen market while the hoard still goes out as
bond lending. Quick bench (30 games): adapt wins all 13 presets —
thin-margins 19, deposit-drought 26, base 27, micro 26, duel 25,
patient-market 18.
Merge branch 'master' into 55-adapt
All checks were successful
build / build (push) Successful in 28s
59b37e505a
Author
Owner

v2.2 update (same branch, new commit d018fa7)

thin-margins and deposit-drought routed through the tatonnement (they were the two non-target weaknesses: 1 and 7 wins). Full bench (100 games × 13 presets) after the change — adapt wins all four assigned scenarios and all 13 presets:

preset adapt empire mill vault
base 79 11 9 0
patient-market 66 5 20 5
micro-economy 88 1 11 0
duel 85 6 8 0
deposit-drought 84 9 6 0
thin-margins 61 20 15 0
tight-cash 95 0 0 0
default-storm 100 0 0 0
hot-caps 96 4 0 0
rate-war 94 4 0 0
mega-loans 86 3 8 2
bond-economy 67 0 32 0
cash-glut 75 7 7 9

Smoke clean (0 [ai errors, 0 ACCT divergence). Only ai/adapt.lisp changed across both commits.

## v2.2 update (same branch, new commit `d018fa7`) thin-margins and deposit-drought routed through the tatonnement (they were the two non-target weaknesses: 1 and 7 wins). Full bench (100 games × 13 presets) after the change — adapt wins **all four assigned scenarios and all 13 presets**: | preset | adapt | empire | mill | vault | |---|---|---|---|---| | **base** | **79** | 11 | 9 | 0 | | **patient-market** | **66** | 5 | 20 | 5 | | **micro-economy** | **88** | 1 | 11 | 0 | | **duel** | **85** | 6 | 8 | 0 | | deposit-drought | **84** | 9 | 6 | 0 | | thin-margins | **61** | 20 | 15 | 0 | | tight-cash | **95** | 0 | 0 | 0 | | default-storm | **100** | 0 | 0 | 0 | | hot-caps | **96** | 4 | 0 | 0 | | rate-war | **94** | 4 | 0 | 0 | | mega-loans | **86** | 3 | 8 | 2 | | bond-economy | **67** | 0 | 32 | 0 | | cash-glut | **75** | 7 | 7 | 9 | Smoke clean (0 `[ai` errors, 0 ACCT divergence). Only `ai/adapt.lisp` changed across both commits.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Winnie/bankwars!57
No description provided.