Merge claude/faustregel-null (FAUSTREGEL=aus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 20:17:54 +01:00
co-authored by Claude Opus 5.5
4 changed files with 56 additions and 1 deletions
+6
View File
@@ -167,6 +167,12 @@ fn postflop(spot: &Spot, thresholds: &Thresholds, raw: &Spot, premium: f64) -> D
if let Some(d) = super::rueckfall::entscheide(spot, &lists) {
return d.with_equity(equity.share);
}
// FAUSTREGEL=aus (off by default): the rule of thumb is unreachable postflop; the fallback answers always.
if super::rueckfall::ohne_faustregel() {
if let Some(d) = super::rueckfall::entscheide_immer(spot, &lists) {
return d.with_equity(equity.share);
}
}
// Bounded exploitation of the non-station reads (`read_exploit`, switch GEGNER_BREIT, off).
let vetoed = super::vermerk::ersetzt(&floored, super::river_subgame::fold_veto(raw, floored.clone()));
return super::read_exploit::postflop(raw, &hand_read, vetoed);
+14
View File
@@ -656,6 +656,20 @@ pub fn entscheide(spot: &Spot, lists: &[Option<List>]) -> Option<Decision> {
entscheide_mit(spot, lists, c)
}
/// `FAUSTREGEL=aus` (Bündel faustregel-null, aus = bitgleich): postflop ist die Faustregel unerreichbar. Hat kein Solver
/// geantwortet und greift `entscheide` nicht (Schalter aus oder `zeit` ohne Zeitdruck), antwortet trotzdem der Rückfall,
/// mit der Konfiguration aus `KERN_RUECKFALL` ohne `zeit`, sonst mit der Vorgabe `baum`.
pub fn ohne_faustregel() -> bool {
static A: OnceLock<bool> = OnceLock::new();
*A.get_or_init(|| std::env::var("FAUSTREGEL").as_deref() == Ok("aus"))
}
/// Der Rückfall ohne Zeitbedingung (für `FAUSTREGEL=aus`).
pub fn entscheide_immer(spot: &Spot, lists: &[Option<List>]) -> Option<Decision> {
let c = cfg().cloned().or_else(|| parse("baum"))?;
entscheide_mit(spot, lists, &Cfg { nur_zeit: false, ..c })
}
pub fn entscheide_mit(spot: &Spot, lists: &[Option<List>], c: &Cfg) -> Option<Decision> {
if !matches!(spot.street, Street::Flop | Street::Turn | Street::River) || spot.hero_cards.len() != 2 || spot.rules().hole_cards != 2 || spot.board.len() != spot.street.board_len() {
return None;