ZEIGT_KIPP=richtung: gezeigte Haende kippen die Aggressiv-Linie nur staerker, die Passiv-Linie nur schwaecher (nie gegen einen Station-Read); =aggr/=passiv zur Diagnose; =1 und aus unveraendert. Leck-Finder: --zusatz und --gezeigt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::card::{deck, Card};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
use crate::exploit::range_spec::{chen_class, Continuation, RangeSpec, CLASSES};
|
||||
use crate::exploit::range_spec::{chen_class, ClassTilt, Continuation, RangeSpec, CLASSES};
|
||||
use crate::preflop::hand_percentile::percentile;
|
||||
use crate::read::draw::Draw;
|
||||
use crate::read::glance::glance;
|
||||
@@ -204,8 +204,10 @@ const CLASS_SALT: usize = 0x6_0000;
|
||||
/// Keep chance per class so the kept range has the class shares of `target`: the I-projection of the
|
||||
/// untilted range onto that class marginal is a per-class factor target_c / r_c (r = class shares of the
|
||||
/// untilted range), scaled so the largest factor keeps all. A class the range lacks stays out; `None`
|
||||
/// for Omaha, an empty range, or a target without mass.
|
||||
fn class_keep(target: &[f64; CLASSES], kept: &Kept) -> Option<[f64; CLASSES]> {
|
||||
/// for Omaha, an empty range, or a target without mass. With a direction (`ClassTilt::dir`) a target
|
||||
/// whose mean class moves the range the other way leaves it untilted (`None`).
|
||||
fn class_keep(tilt: &ClassTilt, kept: &Kept) -> Option<[f64; CLASSES]> {
|
||||
let target = &tilt.target;
|
||||
if kept.rules.hole_cards != 2 {
|
||||
return None;
|
||||
}
|
||||
@@ -220,6 +222,14 @@ fn class_keep(target: &[f64; CLASSES], kept: &Kept) -> Option<[f64; CLASSES]> {
|
||||
if n <= 0.0 || t <= 0.0 {
|
||||
return None;
|
||||
}
|
||||
if tilt.dir != 0 {
|
||||
let mean_r: f64 = (0..CLASSES).map(|c| c as f64 * r[c] / n).sum();
|
||||
let mean_t: f64 = (0..CLASSES).filter(|&c| target[c].is_finite() && target[c] > 0.0).map(|c| c as f64 * target[c] / t).sum();
|
||||
// +1 = only stronger: the target's mean class must lie below the range's (0 = premium)
|
||||
if (mean_t - mean_r) * tilt.dir as f64 >= 0.0 {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
let mut f = [0.0; CLASSES];
|
||||
for c in 0..CLASSES {
|
||||
if r[c] > 0.0 && target[c].is_finite() && target[c] > 0.0 {
|
||||
|
||||
Reference in New Issue
Block a user