Leiter-Befund mit WAHREN Reads: gegen Reg/Nit/Maniac verstellt sich die Engine und verliert (Heads-up-Reg -102 bb/100), gegen Fish/Station crusht sie. read_gate behaelt den Read daher nur fuer die ausbeutungswuerdige Calling Station und faellt sonst aufs Blind-Spiel zurueck (Profil -> None in decide_with). Leiter gegen die ehrliche Basislinie: HU reg +128, nit +63, maniac +129, 6max reg +41 BESSER; Fish/Station unveraendert (Crush bleibt); GESAMT +36 bb/100 BESSER. engine_read_gate test-first gruen; keine Regression in from_plan/postflop/advise.
90 lines
3.0 KiB
Rust
90 lines
3.0 KiB
Rust
//! "Never worse than blind": der Read-Riegel. Gegen klar Schwache (Calling Station) wird der Read
|
|
//! behalten und ausgebeutet; gegen Kompetente/Aggressive (Reg/Nit/Maniac) faellt die Engine auf das
|
|
//! blinde Grundspiel zurueck (Profil -> None). Belegt an der Leiter: mit Read verliert sie dort,
|
|
//! blind nicht.
|
|
|
|
use rechner::engine::read_gate::{exploit_worthy, gate_reads};
|
|
use rechner::exploit::profile::Profile;
|
|
use rechner::exploit::style::Style;
|
|
use rechner::game::{ActionKind, Spot, Street, Villain};
|
|
use rechner::variant::Variant;
|
|
|
|
fn prof(vpip: f64, pfr: f64, fold: f64, aggr: f64) -> Option<Profile> {
|
|
Some(Profile { vpip: Some(vpip), pfr: Some(pfr), fold_to_bet: Some(fold), aggression: Some(aggr) })
|
|
}
|
|
|
|
fn spot_mit(villains: Vec<Villain>) -> Spot {
|
|
Spot {
|
|
variant: Variant::Nlhe,
|
|
big_blind: 1.0,
|
|
seats: (villains.len() as u8) + 1,
|
|
hero_seat: 0,
|
|
button_seat: Some(0),
|
|
hero_cards: vec![],
|
|
board: vec![],
|
|
street: Street::Flop,
|
|
pot: 10.0,
|
|
to_call: 0.0,
|
|
hero_stack: 100.0,
|
|
min_raise_to: Some(2.0),
|
|
max_raise_to: Some(100.0),
|
|
legal: vec![ActionKind::Check, ActionKind::Raise],
|
|
allowed_sizes: None,
|
|
villains,
|
|
seed: 1,
|
|
history: vec![],
|
|
}
|
|
}
|
|
|
|
fn villain(seat: u8, profile: Option<Profile>) -> Villain {
|
|
Villain { seat, stack: 100.0, folded: false, profile }
|
|
}
|
|
|
|
#[test]
|
|
fn nur_die_calling_station_ist_ausbeutungswuerdig() {
|
|
assert!(exploit_worthy(Style::CallingStation));
|
|
assert!(!exploit_worthy(Style::Regular));
|
|
assert!(!exploit_worthy(Style::Nit));
|
|
assert!(!exploit_worthy(Style::LooseAggressive));
|
|
assert!(!exploit_worthy(Style::Unknown));
|
|
}
|
|
|
|
#[test]
|
|
fn der_read_eines_regs_wird_fallen_gelassen() {
|
|
// Reg (0.26/0.19/0.50/0.50) -> Regular -> blind: Profil weg.
|
|
let gespielt = gate_reads(&spot_mit(vec![villain(1, prof(0.26, 0.19, 0.50, 0.50))]));
|
|
assert_eq!(gespielt.villains[0].profile, None);
|
|
}
|
|
|
|
#[test]
|
|
fn der_read_einer_calling_station_bleibt() {
|
|
// Station (0.80/0.0/0.05/0.05) -> CallingStation -> Read behalten.
|
|
let roh = prof(0.80, 0.0, 0.05, 0.05);
|
|
let gespielt = gate_reads(&spot_mit(vec![villain(1, roh)]));
|
|
assert_eq!(gespielt.villains[0].profile, roh);
|
|
}
|
|
|
|
#[test]
|
|
fn gemischter_tisch_nur_die_schwachen_reads_bleiben() {
|
|
let station = prof(0.80, 0.0, 0.05, 0.05);
|
|
let reg = prof(0.26, 0.19, 0.50, 0.50);
|
|
let gespielt = gate_reads(&spot_mit(vec![
|
|
villain(1, station),
|
|
villain(2, reg),
|
|
villain(3, None),
|
|
]));
|
|
assert_eq!(gespielt.villains[0].profile, station, "Station bleibt");
|
|
assert_eq!(gespielt.villains[1].profile, None, "Reg wird blind");
|
|
assert_eq!(gespielt.villains[2].profile, None, "ohne Read bleibt ohne");
|
|
}
|
|
|
|
#[test]
|
|
fn der_rest_des_spots_bleibt_unberuehrt() {
|
|
let s = spot_mit(vec![villain(1, prof(0.26, 0.19, 0.50, 0.50))]);
|
|
let g = gate_reads(&s);
|
|
assert_eq!(g.pot, s.pot);
|
|
assert_eq!(g.villains.len(), s.villains.len());
|
|
assert_eq!(g.villains[0].seat, 1);
|
|
assert_eq!(g.villains[0].stack, 100.0);
|
|
}
|