id: b701f348f5ea4a3d88e839f75d483dbc
parent_id: afc2cec6566b4d0bb94be889ed74ba52
item_type: 1
item_id: 659da65d964344fc89e6b4eafac0098c
item_updated_time: 1785502494915
title_diff: "[]"
body_diff: "[{\"diffs\":[[0,\"2026-07-\"],[1,\"3\"],[0,\"1\"],[-1,\"7\"],[0,\".\\\n\\\n## St\"]],\"start1\":40,\"start2\":40,\"length1\":18,\"length2\":18},{\"diffs\":[[0,\"use the \"],[-1,\"**\"],[0,\"modular \"]],\"start1\":87,\"start2\":87,\"length1\":18,\"length2\":16},{\"diffs\":[[0,\"tern\"],[-1,\"** (ported from Java Supersonic)\"],[0,\". St\"]],\"start1\":115,\"start2\":115,\"length1\":40,\"length2\":8},{\"diffs\":[[0,\"sed \"],[-1,\"in a tree \"],[0,\"with\"]],\"start1\":141,\"start2\":141,\"length1\":18,\"length2\":8},{\"diffs\":[[0,\"ting\"],[-1,\" mechanisms\"],[0,\":\\\n- \"]],\"start1\":152,\"start2\":152,\"length1\":19,\"length2\":8},{\"diffs\":[[0,\"()`.\"],[-1,\" If it returns Fold/Check and `consider_fold_as_not_applicable()` is true, the chain continues to the next strategy.\"],[0,\"\\\n\\\n##\"]],\"start1\":360,\"start2\":360,\"length1\":124,\"length2\":8},{\"diffs\":[[0,\"-07-\"],[1,\"3\"],[0,\"1\"],[-1,\"7\"],[0,\")\\\n\\\n**G\"],[-1,\"48 Live\"],[1,\"en 5 / G49 Sim\"],[0,\"** (\"]],\"start1\":398,\"start2\":398,\"length1\":23,\"length2\":30},{\"diffs\":[[0,\"sh_nl_g4\"],[-1,\"8_live\"],[1,\"9\"],[0,\".toml`):\"]],\"start1\":444,\"start2\":444,\"length1\":22,\"length2\":17},{\"diffs\":[[0,\"ble\\\"\\\n\\\n1.\"],[1,\" g2_ke_hu_nash          → heads-up Nash equilibrium (KE)\\\n\\\n2.\"],[0,\" g47_equ\"]],\"start1\":494,\"start2\":494,\"length1\":16,\"length2\":76},{\"diffs\":[[0,\"o MC\"],[-1,\", pure lookup\"],[0,\")\\\n  \"]],\"start1\":620,\"start2\":620,\"length1\":21,\"length2\":8},{\"diffs\":[[0,\"moid\"],[-1,\"\\\n                            Harrington-aligned sizing: 3BB open, 4BB premium (35%), 2BB speculative\\\n\\\n2\"],[1,\", npot saturation\\\n\\\n3\"],[0,\". g4\"]],\"start1\":792,\"start2\":792,\"length1\":111,\"length2\":28},{\"diffs\":[[0,\"-hs)\"],[-1,\" - behind_penalty_w×(1-hs)×(1-ppot)\"],[0,\"\\\n   \"]],\"start1\":981,\"start2\":981,\"length1\":43,\"length2\":8},{\"diffs\":[[0,\"    \"],[-1,\"board-hit boost, drawy trap guard, per-player looseness\"],[1,\"+ RangeNet NN range prediction (when range_model_path is set)\\\n                            Blends: alpha × NN + (1-alpha) × heuristic\"],[0,\"\\\n   \"]],\"start1\":1080,\"start2\":1080,\"length1\":63,\"length2\":140},{\"diffs\":[[0,\"et: \"],[-1,\"4\"],[1,\"1\"],[0,\"0,000 (\"],[-1,\"divided by opp count, floor 8K)\\\n```\\\n\\\n**G47\"],[1,\"sim) / 40,000 (live)\\\n```\\\n\\\n**Gen 5 / G49\"],[0,\" Liv\"]],\"start1\":1252,\"start2\":1252,\"length1\":58,\"length2\":55},{\"diffs\":[[0,\"sh_nl_g4\"],[-1,\"7\"],[1,\"9\"],[0,\"_live.to\"]],\"start1\":1328,\"start2\":1328,\"length1\":17,\"length2\":17},{\"diffs\":[[0,\"ml`)\"],[-1,\" — fallback:\\\n```\\\n1. g47_equity_preflop     → preflop: PEM2 matrix equity\\\n2. g4_adaptive_postflop   → postflop: observer-driven range narrowing → Gen 3 equity\\\n```\\\n\\\n## G48 Key Parameters (live)\\\n\\\n| Parameter | Value | Description |\\\n|-----------|-------|-------------|\\\n| `sizing_base` | 0.33 | Base bet/raise fraction of pot |\\\n| `bet_base` | 0.08 | Minimum bet fraction (unraised pot) |\\\n| `ppot_weight` | 0.75 | Draw bonus weight in combined score |\\\n| `npot_weight` | 0.10 | Negative potential penalty |\\\n| `behind_penalty_weight` | 0.15 | Continuous penalty for hands unlikely to improve when behind |\\\n| `narrow_board_hit_boost` | 3.0 | Range narrowing: ×3 weight for board-matching hands |\\\n| `call_base` | 0.42 | Base call threshold |\\\n| `call_bs_weight` | 0.12 | Board-strength adjustment to call threshold |\\\n| `raise_base_bb` | 3.0 | Preflop standard open (Harrington) |\\\n| `raise_strong_freq` | 0.35 | 35% chance of 4BB with premiums |\\\n| `raise_jitter` | 0.0 | No preflop jitter (avoid sizing tells) |\\\n| MC samples | 40,000 | Divided by opponent count, floor 8,000 |\\\n\\\n## Multiway Call Margin\\\n\\\n```\\\ncap = required_equity × (1 + margin)\\\n  margin = 0.28/√opp  (non-river)   [was 0.35, relaxed 2026-07-08]\\\n  margin = 0.15/√opp  (river)\\\n```\\\n\\\nAlso bounded by: `required_equity × 0.5` (floor) and `required_equity + 0.15` (ceiling).\\\n\\\n## Shared Postflop Base\\\n\\\nGen 2-4 postflop strategies all inherit from `rollout_postflop_base.rs` (27 methods):\\\n- `compute_equity()` — Monte Carlo equity\\\n- `should_call()`, `should_raise()`, `should_bet()` — threshold-based decisions\\\n- `push_when_calling()` — AllIn guard when facing bet with deep stack\\\n- `remaining_stack_share()` — fraction of bankroll committed\\\n\\\nKey functions for G48:\\\n- `build_ranges_and_equity()` in `gen4/mod.rs` — shared range-building (G45 + G48)\\\n- `compute_equity_with_ranges()` in `rollout_postflop_gen3.rs` — MC equity vs predicted ranges\\\n\\\n## Equity Computation\\\n\\\n| Situation | Method |\\\n|---|---|\\\n| **Preflop (G47)** | PEM2 matrix lookup (zero MC) |\\\n| **Postflop (G48)** | Monte Carlo vs observer-predicted ranges |\\\n| Heads-up exact | Exhaustive enumeration (trie-optimized) |\\\n| Multi-way MC | Monte Carlo with partial Fisher-Yates dealing |\\\n\\\n### PotentialResult fields\\\n- `hs`: hand strength (P(best hand now))\\\n- `ppot`: positive potential (P(improve))\\\n- `npot`: negative potential (P(decline))\\\n- `nutpot`: nut potential\\\n- `rpot`: robustness\\\n- `win_prob`: EHS = hs*(1-npot) + (1-hs)*ppot\"],[1,\":\\\nSame chain with higher MC budget (40K), profile persistence, debug logging.\\\n\\\n### G49 vs G48\\\nThe only difference is `range_model_path` in the G48 formula postflop config.\\\n- G48 = formula with heuristic ranges only\\\n- G49 = formula with RangeNet NN blending into heuristic ranges\\\n\\\n## Gen 5 = G49 (2026-07-31)\\\n\\\n```\\\nGen 5 = G48 formula + RangeNet (1 NN)\\\n```\\\n\\\nRangeNet predicts opponent hand distribution (169-dim softmax) from 81 observable features.\\\nBlends with heuristic ranges by observer confidence: alpha 0.3→0.7.\\\n\\\n### G48 Key Parameters (live)\\\n\\\n| Parameter | Value | Description |\\\n|-----------|-------|-------------|\\\n| `sizing_base` | 0.33 | Base bet/raise fraction of pot |\\\n| `bet_base` | 0.08 | Minimum bet fraction (unraised pot) |\\\n| `ppot_weight` | 0.75 | Draw bonus weight in combined score |\\\n| `npot_weight` | 0.10 | Negative potential penalty |\\\n| `call_base` | 0.42 | Base call threshold |\\\n| `raise_base_bb` | 3.0 | Preflop standard open |\\\n| MC samples | 40,000 | Divided by opponent count, floor 8K |\\\n\\\n## Equity Computation\\\n\\\n| Situation | Method |\\\n|---|---|\\\n| **Preflop (G47)** | PEM2 matrix lookup (zero MC) |\\\n| **Postflop (G48)** | Monte Carlo vs observer-predicted ranges |\\\n| **Range (Gen 5)** | RangeNet NN (81→512→512→512→256→169) |\"],[0,\"\\\n\\\n##\"]],\"start1\":1345,\"start2\":1345,\"length1\":2445,\"length2\":1256},{\"diffs\":[[0,\"ults\"],[-1,\" (new players)\\\n- \"],[1,\"\\\n\"],[0,\"VPIP\"]],\"start1\":2648,\"start2\":2648,\"length1\":25,\"length2\":9},{\"diffs\":[[0,\"1.0,\"],[-1,\" threebet: 0.05\\\n-\"],[0,\" fol\"]],\"start1\":2680,\"start2\":2680,\"length1\":25,\"length2\":8},{\"diffs\":[[0,\"50, cbet\"],[-1,\"_freq\"],[0,\": 0.45, \"]],\"start1\":2700,\"start2\":2700,\"length1\":21,\"length2\":16},{\"diffs\":[[0,\"0.10\"],[-1,\"\\\n- call_raise_freq: 0.15 (#[serde(default)] for backward compat)\"],[0,\"\\\n\\\n##\"]],\"start1\":2722,\"start2\":2722,\"length1\":72,\"length2\":8},{\"diffs\":[[0,\"lend\\\n1. \"],[-1,\"**\"],[0,\"Player s\"]],\"start1\":2744,\"start2\":2744,\"length1\":18,\"length2\":16},{\"diffs\":[[0,\"er stats\"],[-1,\"**\"],[0,\" (per-se\"]],\"start1\":2756,\"start2\":2756,\"length1\":18,\"length2\":16},{\"diffs\":[[0,\" EMA\"],[-1,\" with half-life\"],[0,\")\\\n2. \"],[-1,\"**\"],[0,\"Tabl\"]],\"start1\":2774,\"start2\":2774,\"length1\":30,\"length2\":13},{\"diffs\":[[0,\"le stats\"],[-1,\"**\"],[0,\" (aggreg\"]],\"start1\":2786,\"start2\":2786,\"length1\":18,\"length2\":16},{\"diffs\":[[0,\"EMA)\\\n3. \"],[-1,\"**\"],[0,\"Cold-sta\"]],\"start1\":2806,\"start2\":2806,\"length1\":18,\"length2\":16},{\"diffs\":[[0,\"ults\"],[-1,\"** (for unknown players)\\\n\\\nWeight transitions from table → player as `hands_observed` grows (10-hand blend start, 100-hand full weight).\\\n\\\n### Range narrowing\\\n`build_opponent_range_v2()` uses:\\\n-\"],[1,\"\\\n\\\n### Range narrowing (heuristic)\\\nUses\"],[0,\" VPI\"]],\"start1\":2829,\"start2\":2829,\"length1\":200,\"length2\":46},{\"diffs\":[[0,\"freq\"],[-1,\" for preflop range width\\\n- I\"],[1,\", i\"],[0,\"n-ha\"]],\"start1\":2901,\"start2\":2901,\"length1\":36,\"length2\":11},{\"diffs\":[[0,\"ions\"],[1,\",\"],[0,\" \"],[-1,\"(\"],[0,\"bet\"],[-1,\", raise, call, check) for postflop narrowing\\\n- Bet-sizing ratio for additional tightening\\\n- Position for range\"],[1,\"-sizing, position, board-hit boost.\\\n\\\n### Range prediction (NN)\\\nRangeNet takes 81-dim features (49 base + 32 action history) → 169-dim softmax.\\\nBlended\"],[0,\" wi\"],[-1,\"d\"],[0,\"th \"],[-1,\"adjustment\\\n- **Board-hit boost** (added 2026-07-16): hands matching top board card get ×3 weight\\\n\\\n## Config System\\\n\\\nBot configs are TOML files in `configs/bots/`:\\\n```toml\\\n[bot]\\\nname = \\\"cash_nl_g48_live\\\"\\\nvoting_mode = \\\"first_applicable\\\"\\\n\\\n[[strategies]]\\\ntype = \\\"g47_equity_preflop\\\"\\\n\\\n[[strategies]]\\\ntype = \\\"g48_formula_postflop\\\"\\\n\\\n[strategies.config]\\\nmc_samples = 40000\\\nsizing_base = 0.33\\\nbehind_penalty_weight = 0.15\\\nnarrow_board_hit_boost = 3.0\\\nraise_base_bb = 3.0\\\nraise_strong_freq = 0.35\\\n# ... more parameters\\\n```\"],[1,\"heuristic: `alpha × NN + (1-alpha) × heuristic` where alpha scales with confidence.\\\n\\\n## Action Space\\\n\\\n### Postflop (11 actions)\\\nFold=0, Check=1, Call=2, BetThird=3, BetHalf=4, BetTwoThird=5, BetThreeQuarter=6, BetPot=7, Raise25x=8, RaisePot=9, AllIn=10\\\n\\\n### Preflop (11 actions)\\\nFold=0, Call=1, Raise 2.5BB=2, 3BB=3, 4BB=4, 6BB=5, 9BB=6, 13BB=7, 20BB=8, 30BB=9, AllIn=10\"],[0,\"\\\n\\\n##\"]],\"start1\":2918,\"start2\":2918,\"length1\":643,\"length2\":539},{\"diffs\":[[0,\"ypes\"],[-1,\" (BotAction, TableEvent with dom_snapshot)\"],[0,\"\\\n├──\"]],\"start1\":3688,\"start2\":3688,\"length1\":50,\"length2\":8},{\"diffs\":[[0,\"ests\"],[-1,\" (40+ test hands)\"],[0,\"\\\n├──\"]],\"start1\":3749,\"start2\":3749,\"length1\":25,\"length2\":8},{\"diffs\":[[0,\" # S\"],[-1,\"weep/tournament/sanity/gen5 collection scripts\"],[1,\"anity check, eval, collection scripts\\\n├── models/               # Trained NN models (currently empty — range_v14 pending)\"],[0,\"\\\n├──\"]],\"start1\":3831,\"start2\":3831,\"length1\":54,\"length2\":129},{\"diffs\":[[0,\"profiles\"],[-1,\" (gitignored)\"],[0,\"\\\n└── dat\"]],\"start1\":4004,\"start2\":4004,\"length1\":29,\"length2\":16},{\"diffs\":[[0,\"nary\"],[-1,\" (gitignored)\\\n```\\\n\\\n## Userscript (separate project)\\\n\\\n```\\\n/home/jan/WebstormProjects/super-marvin-userscripts/\\\n├── torn/                 # Torn-specific script\\\n│   ├── src/              # TypeScript source\\\n│   ├── dist/             # Built output (torn.user.js)\\\n│   └── meta.json         # V\"],[1,\", flop distributions\\\n```\\\n\\\n## Configs\\\n\\\n| Config | Purpose |\\\n|--------|---------|\\\n| `cash_nl_g49.toml` | Gen 5 sim config (10K MC budget) |\\\n| `cash_nl_g49_live.toml` | Gen 5 live config (40K MC budget, profiles) |\\\n| `cash_nl_g48.toml` | G48 without range model |\\\n| `cash_nl_gen2.toml` | Gen 2 (EHS rollout) |\\\n| `cash_nl.toml` | Gen 3 (range equity) |\\\n| `g48_{fish,station,nit,tag,lag,maniac,reg}.toml` | G48 p\"],[0,\"ers\"],[-1,\"i\"],[0,\"on\"],[-1,\" (v0.1.11)\\\n└── shared/               # Shared HTTP client\\\n```\\\n\"],[1,\"ality variants |\\\n| `gen5_equity_collect.toml` | Range data collection config |\"]],\"start1\":4055,\"start2\":4055,\"length1\":362,\"length2\":494}]"
metadata_diff: {"new":{},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-07-31T12:59:40.917Z
created_time: 2026-07-31T12:59:40.917Z
is_locked: 0
type_: 13