Das Trace-Werkzeug (sim::table) spielt jeden Deal blind gegen Oracle auf gleichen Seeds und schreibt die erste divergente Hero-Entscheidung zu. Damit ist der Nit-Full-Read-Leak lokalisiert: nicht Under-Barrel, sondern das Gegenteil - der Read macht aus Flop-Checks Bluff-Raises (140 Haende, -436 bb), die mehrstraessig in genutzte Ranges bluten. Die read_gate-Doku nennt jetzt den gemessenen Mechanismus. Der Frozen-Benchmark beweist das Werkzeug verhaltensneutral (GESAMT 0.00, 0 Haende geaendert). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
73 lines
4.3 KiB
Rust
73 lines
4.3 KiB
Rust
//! "Never worse than blind." Measured on the ladder, the exploit logic only beats solid blind play
|
||
//! against opponents whose read it has EARNED. Acting on a read of a competent or aggressive
|
||
//! opponent (reg / maniac) makes the engine play WORSE than blind - it bleeds to a heads-up reg
|
||
//! (−102 bb/100 with a truthful read). Until a style's read is proven on the ladder (fed by real
|
||
//! data), the engine keeps a read ONLY for the earned styles and plays everyone else blind.
|
||
//!
|
||
//! The gate is a per-style table (`earned_trust`), not a single hard-coded class: each style is
|
||
//! turned on only once its `... (blind)` twin in `sim::benchmark` proves the read never costs. This
|
||
//! can never make a read harmful: it only ever acts where acting is known to help, and falls back to
|
||
//! the solid baseline everywhere else. Same spirit as the price/commitment floor - a read, like a
|
||
//! loose table, may never tip us into a worse decision.
|
||
|
||
use crate::exploit::style::{classify, Style};
|
||
use crate::game::{Spot, Villain};
|
||
|
||
/// How much of a read's adjustment each opponent style has EARNED on the ladder — the measured right
|
||
/// to deviate from blind play. `1.0` = exploit in full, `0.0` = keep playing blind (the read is
|
||
/// dropped at the gate). This generalizes the old CallingStation-only gate into a per-style table,
|
||
/// so a style is turned on only once its read is proven never worse than blind (the `... (blind)`
|
||
/// twins in `sim::benchmark` / `benchmarks/baseline.txt`).
|
||
///
|
||
/// Only `> 0.0` is consumed today (keep-or-drop at the gate); the shift shapes themselves live in
|
||
/// `exploit::style_shift` and apply in full to whatever survives the gate. The value is an `f64`,
|
||
/// not a bool, to leave room for a partial, confidence-weighted trust later without changing this
|
||
/// seam.
|
||
pub fn earned_trust(style: Style) -> f64 {
|
||
match style {
|
||
// Over-callers (fish, station): value-bet thinner, never bluff. Earned since Stage 0 — the
|
||
// `heads-up ... (blind)` twins show a large recaptured prize.
|
||
Style::CallingStation => 1.0,
|
||
// Measured on the ladder (Stage 3, every non-style run at full trust against the blind
|
||
// baseline): acting on a strong-player read only ever COSTS. Heads-up, a truthful read is
|
||
// worse than blind by reg −176, maniac −148, nit −50 bb/100 — the nit turns a +38 blind
|
||
// winner into a loser. The decision-trace diagnostic (Stage 5, `sim_blind::
|
||
// diagnose_nit_full_read_leak`) localized the nit leak: it is not under-barrelling but the
|
||
// OPPOSITE — the read turns flop CHECKS into bluff-RAISES (140 hands, −436 of −596 bb total),
|
||
// because `table_fold` now sees the nit's true 0.82 fold rate and the single-street bluff-EV
|
||
// books `0.82 × pot` as near-pure profit. The 18 % that continue hold a nutted range and
|
||
// bleed across turn and river, a multi-street cost the single-street called branch never
|
||
// models. The DEFENSIVE adjustments of the same read all GAIN (fold more thin value / bluff
|
||
// catchers into a proven non-bluffer) and are already harvested by the ungated MDF floor
|
||
// (`mdf_floor::floor` on the raw spot in `engine::decide`); this gate governs only the
|
||
// OFFENSIVE adjustments, which over-fire into strong ranges. So every non-over-caller stays
|
||
// blind until the bluff-EV models the multi-street cost of a called barrel (BEFUND-nit-read-leck).
|
||
Style::Regular => 0.0,
|
||
Style::Nit => 0.0,
|
||
Style::LooseAggressive => 0.0,
|
||
// No usable read.
|
||
Style::Unknown => 0.0,
|
||
}
|
||
}
|
||
|
||
/// A read is acted on only when its style has earned trust on the ladder - the classes the exploit
|
||
/// logic is measured to beat blind play against. Every other style falls back to blind.
|
||
pub fn exploit_worthy(style: Style) -> bool {
|
||
earned_trust(style) > 0.0
|
||
}
|
||
|
||
/// The spot with every opponent read the engine is not (yet) proven to use profitably dropped to
|
||
/// `None`, so the decision plays blind against competent and aggressive opponents and only exploits
|
||
/// the earned styles.
|
||
pub fn gate_reads(spot: &Spot) -> Spot {
|
||
let villains = spot
|
||
.villains
|
||
.iter()
|
||
.map(|v| Villain {
|
||
profile: v.profile.filter(|p| exploit_worthy(classify(p))),
|
||
..v.clone()
|
||
})
|
||
.collect();
|
||
Spot { villains, ..spot.clone() }
|
||
}
|