Gegnermodell: MDF-Fix, Strassen- und Linien-Reads, leichter 3-Bet, Leiter-Infrastruktur

Bewiesen auf der gepaarten Leiter (19 Gegner, 95 %-CI, kein Profil verliert):
- MDF-Floor/Veto-Fix: in der Sim bit-identisch, echte Haende Overfold 36 -> 7.5 bb.
- Aggressions-Vertrauen, Strassen-Reads (Turn/River-Aggression, Fold-auf-Bet je Strasse,
  Bayes-geschrumpft zum Gesamt-Read), Zug-Logging der Gegnerprofile, Replay mit geloggten Profilen.
- Leichter 3-Bet gegen 3-Bet-Folder (EV-Break-even risk/(pot+risk)): +6.62 +-5.23 bb/100
  gegen den 3-Bet-Folder, sonst unveraendert.
- Fold-auf-C-Bet preist die C-Bet: neutral.
- Welt-Archetypen cbet-folder, 3bet-folder, check-raiser; ab_zelle (Zellen-Leiter, fortsetzbar),
  Warteschlange mit Thread-Budget, ab.py.

Nicht drin: der Check-Raise-Abschlag (drei Varianten, keine sauber; wird durch ein
Spielbaum-Modell ersetzt), der River-Showdown-Read bleibt aus (Verlierer -1.31).
Ergebnisse: messung_engine/ERGEBNISSE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 21:27:08 +01:00
co-authored by Claude Opus 5.5
parent c03530a1c4
commit 0deb2e10de
34 changed files with 1497 additions and 26 deletions
+88 -3
View File
@@ -216,6 +216,36 @@ pub(crate) fn believed_villain(tree: &Tree, n: usize, profile: Option<&Profile>,
.unwrap_or(with_call)
}
/// Shown river bets at which the showdown read and the aggression read weigh the same (the street
/// prior, `exploit::sample::STREET_PRIOR`).
const SHOWN_HALF: f64 = crate::exploit::sample::STREET_PRIOR;
/// The aggression the river belief runs on. Without a showdown read: the river (else pooled)
/// aggression, as before. With one (`Profile::river_bluff_share` over `river_bluff_shown` river bets
/// seen at showdown): the aggression `believed_villain` would need to produce that air share — inverted
/// from its own model (bets = value above `VALUE_RANK` + `bluff_prob` of the range below `BLUFF_RANK`,
/// `bluff_prob = gto_bluff · a / DEFAULT_AGGRESSION`) — blended in by `n / (n + SHOWN_HALF)`. Direct
/// evidence beats the aggression proxy: a player who bets often with value (aggressive, not bluffy) or
/// rarely but always as air.
pub(crate) fn river_bluff_aggression(profile: Option<&Profile>, pot: f64, bet: f64) -> Option<f64> {
let p = profile?;
let a = p.river_aggression.or(p.aggression).filter(|x| !x.is_nan());
let ok = |x: Option<f64>| x.filter(|v| !v.is_nan());
let (Some(share), Some(n)) = (ok(p.river_bluff_share), ok(p.river_bluff_shown).filter(|n| *n > 0.0)) else {
return a;
};
let gto_bluff = if pot + bet > 0.0 { bet / (pot + bet) } else { 0.0 };
if gto_bluff <= 0.0 {
return a;
}
let s = share.clamp(0.0, 0.999);
let bluff_prob = (s * (1.0 - VALUE_RANK) / (BLUFF_RANK * (1.0 - s))).clamp(0.0, 1.0);
let shown = (bluff_prob * DEFAULT_AGGRESSION / gto_bluff).clamp(0.0, 1.0);
let base = a.unwrap_or(DEFAULT_AGGRESSION);
let w = n / (n + SHOWN_HALF);
Some(base + w * (shown - base))
}
/// The KL trust radius from the read's confidence (payoff/chip units). `λ = LAMBDA_POT_SCALE · pot ·
/// (1−c)/c`: no confidence (`None`/0) → `∞` → `kl_best_response` returns exact GTO (the proven
/// unexploitable baseline — it can never again balance against a fish it cannot read); confidence → 1
@@ -289,7 +319,9 @@ pub fn river_exploit_plan(spot: &Spot, villain_combos: &[Vec<Card>], profile: Op
return None;
}
// Only exploit on a read strong enough to trust; otherwise the heuristic keeps the edge.
if profile.and_then(|p| p.confidence).filter(|c| !c.is_nan()).unwrap_or(0.0) < CONFIDENCE_FLOOR {
// The gearbox exploits a belief about BLUFFING: trust it only as far as the aggression read goes.
let confidence = profile.and_then(Profile::bluff_read_confidence);
if confidence.unwrap_or(0.0) < CONFIDENCE_FLOOR {
return None;
}
let rules = spot.rules();
@@ -307,8 +339,8 @@ pub fn river_exploit_plan(spot: &Spot, villain_combos: &[Vec<Card>], profile: Op
let game = subgame(spot, villain_combos, villain_combos, pot, bet)?;
let n = game.ladder.len();
let opponent = believed_villain(&game.tree, n, profile, pot, bet, profile.and_then(|p| p.river_aggression.or(p.aggression)));
let lambda = lambda_from_confidence(profile.and_then(|p| p.confidence), pot);
let opponent = believed_villain(&game.tree, n, profile, pot, bet, river_bluff_aggression(profile, pot, bet));
let lambda = lambda_from_confidence(confidence, pot);
let tilted = kl_best_response(&game.tree, &opponent, &game.solved.strategy, 0, lambda);
let hb = game.bucket(hero_strength);
@@ -346,6 +378,19 @@ pub fn fold_veto(spot: &Spot, base: Decision) -> Decision {
if base.choice != Choice::Call {
return base;
}
// The veto answers a read that the bettor UNDER-bluffs. Without a postflop aggression read there
// is no bluff evidence at all (the belief would fall back to the balanced default and fold the
// bottom of a GTO range against a player nobody measured): stand down. Replay 10.11., hand
// 174898200346: vpip-only read, river top pair vetoed into a fold against a pair of tens.
let bluff_read = spot
.live_villains()
.next()
.and_then(|v| v.profile.as_ref())
.and_then(|p| p.river_aggression.or(p.aggression))
.is_some_and(|a| !a.is_nan());
if !bluff_read {
return base;
}
let Some(plan) = river_exploit_mix(spot) else {
return base;
};
@@ -638,4 +683,44 @@ mod tests {
let check = Decision::new(Choice::Check, 0.7, "heuristic check");
assert_eq!(fold_veto(&spot, check.clone()), check, "a non-call base is never vetoed");
}
/// The showdown read moves the river belief toward what was SHOWN: all-air river bets raise the
/// believed aggression, all-value ones lower it, a thin sample barely moves it, none leaves it.
#[test]
fn shown_river_bets_move_the_bluff_belief() {
let base = prof(0.4, 0.35, 0.9);
let (pot, bet) = (10.0, 7.5);
assert_eq!(river_bluff_aggression(Some(&base), pot, bet), Some(0.35));
let shown = |share: f64, n: f64| Profile { river_bluff_share: Some(share), river_bluff_shown: Some(n), ..base };
let honest = river_bluff_aggression(Some(&shown(0.0, 60.0)), pot, bet).unwrap();
let bluffer = river_bluff_aggression(Some(&shown(0.45, 60.0)), pot, bet).unwrap();
let thin = river_bluff_aggression(Some(&shown(0.0, 1.0)), pot, bet).unwrap();
assert!(honest < 0.1, "never bluffed at showdown: {honest}");
assert!(bluffer > 0.6, "mostly air at showdown: {bluffer}");
assert!(thin > 0.3 && thin < 0.35, "one showdown barely moves it: {thin}");
// The air share the model implies at the balanced aggression maps back onto it (round trip).
let gto_bluff = bet / (pot + bet);
let b = gto_bluff; // bluff_prob at a = DEFAULT_AGGRESSION
let s = BLUFF_RANK * b / (BLUFF_RANK * b + (1.0 - VALUE_RANK));
let back = river_bluff_aggression(Some(&shown(s, 1e9)), pot, bet).unwrap();
assert!((back - DEFAULT_AGGRESSION).abs() < 1e-6, "{back}");
}
/// No aggression read = no under-bluff evidence: the veto stands down even on a confident read
/// of other stats (replay 10.11., vpip-only HUD, river top pair vetoed into a fold).
#[test]
fn the_veto_needs_an_aggression_read() {
let board = Card::parse_list("Ah Kd 7c 2s 9h").unwrap();
let no_aggr = Profile { aggression: None, vpip: Some(0.6), ..prof(0.30, 0.06, 0.85) };
let spot = river_vs_bet(&board, "Jc Js", 6.0, 6.0, Some(no_aggr));
let call = Decision::new(Choice::Call, 0.6, "heuristic call");
assert_eq!(fold_veto(&spot, call.clone()), call, "no bluff read, no veto");
// A strong HUD read (confidence 0.85) whose aggression rests on two seen moves: the gearbox
// trusts the bluff read only as far as the aggression goes -> below the floor, no plan.
let thin = Profile { aggression_confidence: Some(2.0 / 32.0), ..prof(0.30, 0.06, 0.85) };
let spot = river_vs_bet(&board, "Jc Js", 6.0, 6.0, Some(thin));
assert_eq!(fold_veto(&spot, call.clone()), call, "thin aggression read, no veto");
let villain = sample_villain();
assert!(river_exploit_plan(&spot, &villain, spot.live_villains().next().unwrap().profile.as_ref()).is_none());
}
}