PAAR_RAISE=nie/antwort: Ein-Paar-Value-Raise gegen eine Wette (groesster offener Grosse-Pots-Block), Klassifikation + Nachspiel der verlorenen Pots, 2 Pflichtfaelle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 21:55:49 +01:00
co-authored by Claude Opus 5.5
parent 63dff7eab5
commit e65cf4d46e
12 changed files with 927 additions and 3 deletions
+61 -1
View File
@@ -99,10 +99,62 @@ fn river_monster(spot: &Spot, eff: &Effective, read: &HandRead) -> bool {
&& !(read.texture.suits == SuitPattern::FourFlush && read.made < Made::Flush)
}
/// Messschalter (einmal gelesen) `PAAR_RAISE`: the value raise of a one-pair hand FACING a bet.
/// Live NL2 (4430 hands, 16.11.): the open block of lost big pots is one pair raising a bet and
/// then stacking off (KQ/AQ top pair, A5 top pair on the turn, JJ overpair on the river: -352 BB).
/// The raise is valued over fold and call only; the villain's re-raise - near-nuts at the micros -
/// and hero's pot-odds call-off are not in it.
/// * `nie`: no value raise for one pair facing a bet (it calls or folds on its EV);
/// * `antwort`: the raise keeps its value kind but is valued with the re-raise branch
/// (`bluff::branches_vs_raise`, re-raise rate = the bettor's `reraise_to_raise` read, else the pool
/// `RAISE_TO_BET_POOL`; hero calls the re-raise only when its bluffs pay).
/// Anything else is off (bit-identical).
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PaarRaise {
Nie,
Antwort,
}
pub fn paar_raise() -> Option<PaarRaise> {
use std::sync::OnceLock;
static MODE: OnceLock<Option<PaarRaise>> = OnceLock::new();
*MODE.get_or_init(|| match std::env::var("PAAR_RAISE").as_deref() {
Ok("nie") => Some(PaarRaise::Nie),
Ok("antwort") => Some(PaarRaise::Antwort),
_ => None,
})
}
/// One pair (no two pair or better), facing a bet postflop.
fn one_pair_facing_bet(spot: &Spot, read: &HandRead) -> bool {
spot.to_call > 0.0
&& spot.street != crate::game::Street::Preflop
&& matches!(
read.made,
Made::Underpair
| Made::BottomPair
| Made::MiddlePair
| Made::TopPairWeakKicker
| Made::TopPairGoodKicker
| Made::Overpair
)
}
/// Re-raise rate of the villains facing hero's raise: the highest `reraise_to_raise` read among the
/// live villains, else the pool value.
fn reraise_rate(spot: &Spot) -> f64 {
use crate::exploit::street_continuation::RAISE_TO_BET_POOL;
spot.live_villains()
.map(|v| v.profile.and_then(|p| p.reraise_to_raise).filter(|x| x.is_finite()).unwrap_or(RAISE_TO_BET_POOL))
.fold(0.0_f64, f64::max)
.clamp(0.0, 1.0)
}
/// What kind of raise this hand could make here, if any.
fn raise_kind(spot: &Spot, eff: &Effective, read: &HandRead) -> Option<RaiseKind> {
let bluffable = eff.raise_ok && !never_folds(spot);
if is_value_raise(eff) || river_monster(spot, eff, read) {
let pair_blocked = paar_raise() == Some(PaarRaise::Nie) && one_pair_facing_bet(spot, read);
if (is_value_raise(eff) && !pair_blocked) || river_monster(spot, eff, read) {
Some(RaiseKind::Value)
} else if thin_value(eff, read.made, spot.street, spot.is_legal(ActionKind::Check)) {
Some(RaiseKind::ThinValue)
@@ -161,7 +213,15 @@ pub fn scored(
let fe = table_fold(spot, to, thresholds.fold_equity_scale);
let against = realized_share(called.share_at(to, share), eff.villains);
let against = super::fortsetzung::discounted(spot, kind, to, fe, against);
let reraised = kind == RaiseKind::Value
&& paar_raise() == Some(PaarRaise::Antwort)
&& to < spot.hero_stack
&& one_pair_facing_bet(spot, read);
let b = match (kind, check_raise_rate(spot)) {
_ if reraised => {
let rho = reraise_rate(spot);
branches_vs_raise(spot, to, fe, against, RaiseKind::ThinValue, rho, None)
}
(RaiseKind::Value, _) | (_, None) => branches(spot, to, fe, against),
(k, Some((rho, profile))) => branches_vs_raise(spot, to, fe, against, k, rho, profile.as_ref()),
};