Gen 2 — Rollout-Based EHS (State of the Art)

# Gen 2 — Rollout-Based EHS

> **FROZEN FINAL, 2026-08-27.** Gen2 ist komplett eingefroren — inklusive der letzten freigegebenen Änderung: HU-Widening adoptiert (`hu_extra_call_pct=0.90`, `hu_extra_raise_pct=0.45`, combo_2 aus 2-Runden-Sweep). **Keine weiteren Änderungen irgendeiner Art.** Gen2 ist Referenz-Baseline und Standard-Gegner für alle Folge-Sweeps. Pareto-Regel für Gen2-Entscheidungen war: nur Duel vs Gen1 relevant (HU-Loch gegen range-awarees Gen3 ist charakteristisch, nicht fixbar ohne den Baseline-Charakter zu brechen).

## Role in the Framework

Gen 2 is the first generation to compute **actual hand equity** via Monte Carlo simulation. It evaluates `hs` (hand strength), `ppot` (positive potential), and `npot` (negative potential) to make decisions.

Gen 2 strategies are used:
- As **postflop baselines** (sanity-check opponent, neutral pool, Sweep-Gegner)
- As **KEHU Nash HU equilibrium** (preflop only, ≤25BB) — chained into every production config
- As the **foundation** that Gen 3 and Gen 4 build upon (shared `rollout_postflop_base.rs`)

## Preflop Maneuver

| Priority | Strategy | When |
|---|---|---|
| 1 | `g2_ke_hu_nash` | HU, ≤25 BB → Nash equilibrium push/fold/call |
| 2 | `g1_short_stack_preflop` | ≤25 BB → push/fold chart |
| 3 | `g1_big_stack_preflop` | >25 BB → hand-group thresholds; HU-Block (big_stack_preflop.rs:321) + adoptierte `hu_extra_*`-Widening |

**HU-final (adoptiert 2026-08-27):** `hu_extra_call_pct=0.90`, `hu_extra_raise_pct=0.45` — additive Perzentil-Erweiterung über dem hardcoded Block (HU-Ranking-Perzentile, Defaults 0.0 = bit-identisch zum alten Verhalten, verifiziert 6/6 deterministische Zellen). Wirkung: **+37 BB/100 vs Gen1 im Duel** (+33.6→+71.1), +43 im Mirror-Duell. Gegen Gen3 (range-aware, HU-kalibriert) HU verloren (−149 bis −187) — akzeptiert: charakteryisiert korrekt einen nicht-range-awareen Bot gegen eine range-awaree Strategie; genau solche Gegner braucht das Trainingsfeld.

### KEHU Nash HU (`g2_ke_hu_nash`)
Ported from Java `KEHU20BBNeqV3`. 19 embedded Nash equilibrium tables, HU 15BB/20BB. **Deckt nur ≤25 BB ab** (`max_stack_bb=25.0`) — bei 75 BB Cash-Stacks nie applicable.

## Postflop Maneuver

### Shared Base: `rollout_postflop_base.rs`
Full-Ring- und OTB-Threshold-Pfade (kompletter Action-Tree-Fork via `is_short_handed`). **Gate-Semantik (fixiert 2026-08-25):** `is_short_handed` zählt dealt-in-Spieler (ohne `SittingOut`), NICHT `active_players`. Commit `2b77670`, 3 Regressionstests.

### Gen 2 Postflop: `g2_postflop_rollout_v4`
Nut-aware V4, Equity vs **random opponent hands** (uniform). Kein Range-Modelling — bewusst, das macht Gen2 zum neutralen Benchmark.

## Finale Kalibrierungshistorie

- **Postflop** (2026-08-25, commit 2b77670): 3 Sweep-Runden + Fine Sweep, alle 9 Knobs konvergiert. Trajektorie vs Gen1: 3.73 → 5.46 BB/100 mean.
- **HU-Preflop** (2026-08-27): hu_extra-Knobs, 2 Sweep-Runden vs Gen1/Gen3/Mirror, combo_2 adoptiert. Harrington: 7 pre-existing Failures unverändert; 1000-Hände-Selbstplay clean (0 Panics, 0 Guardrails).

## Configs

| Config | Chain |
|---|---|
| `cash_nl_gen2.toml` | ke_hu_nash → short_stack → g1_big_stack_preflop (+hu_extra in [strategies.config]) → g2_postflop_rollout_v4 |

## Referenz-Messpunkte (deterministisch bzw. Gen2-entropy-frei)

- vs Gen1: +5.46 mean (Ring-Formate), Duel +33.6 → **+71.1** (nach HU-Adoption)
- vs Gen3 (final kalibriert): Ring ~+2 BB/100 (Gen3-Loch), Duel −149 (charakteristisch, HU-Widening verschlechtert vs Gen3 weiter auf ~−187 — bewusst akzeptiert)

## Key Files

| File | Content |
|---|---|
| `holdem_bots/src/cash/rollout_postflop_base.rs` | Shared base; is_short_handed-Fix, OTB/Full-Ring-Pfade |
| `holdem_bots/src/cash/rollout_postflop_v4.rs` | Gen 2 V4 nut-aware postflop |
| `holdem_bots/src/cash/big_stack_preflop.rs` | Hand-Grouping-Preflop + hu_extra_*-Knobs (HU-Block :321) |
| `holdem_bots/src/common/hand_potential.rs` | PotentialResult + MC engine |
| `holdem_bots/src/sng/ke_hu_nash.rs` / `ke_hu_tables.rs` | KEHU Nash (≤25 BB) |
| `scripts/gen2_{river,turn,flop,raise,fine}_sweep.sh` | Sweep-Toolkit (Referenz) |

## Open Issues

Keine. Gen2 ist final. Bekannte Limitationen (dokumentiert, by design): uniforme MC-Equity (kein Range-Modelling), KQs-Top-Pair-Fold im Multiway (Harrington pre-existing), HU verlustbringend gegen range-awaree Strategien.

id: 8f9a294ec08d4a65ba90f901c64b1f81
parent_id: 1246bbc3bb4948fc8329079b84b4ae3d
created_time: 2026-06-28T05:15:52.185Z
updated_time: 2026-08-27T07:58:53.722Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
author: 
source_url: 
is_todo: 0
todo_due: 0
todo_completed: 0
source: joplin-desktop
source_application: net.cozic.joplin-desktop
application_data: 
order: 1782623752185
user_created_time: 2026-06-28T05:15:52.185Z
user_updated_time: 2026-08-27T07:58:53.722Z
encryption_cipher_text: 
encryption_applied: 0
markup_language: 1
is_shared: 0
share_id: 
conflict_original_id: 
master_key_id: 
user_data: 
deleted_time: 0
is_locked: 0
extracted_resource_ids: 
type_: 1