RERAISE_TIEFE stetig: k-te Aggression einer Strasse behaelt den staerksten Anteil r^(k-1) (top_share, raise_to_bet, ohne Haende Pool 0,30); Schwelle/Trust entfernt; aus bit-identisch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,7 +102,7 @@ Eine Regel für Bankroll und Gesamt-Verlustdeckel über die 30 000 Hände fehlt
|
||||
| D1c | Gedächtnis formt die Ranges des Solvers: `exploit::range_read` (Range-Kippung nach Lockerheit, Bluffanteil je Größe aus Straßen-Aggression und gezeigten River-Einsätzen, Fold je Straße, Vertrauen aus echter Stichprobe) → Kippung der Kombigewichte, festgelegter geglaubter Gegner, KL-Schranke λ aus Vertrauen. Schalter `GEGNER_RANGE=1`, aus. Schnittstelle mit solver-ueberall vereinbart (Orchestrator 14.11.) | LBR gepaart nicht schlechter jenseits des Rauschens; Leiter mit Gedächtnis-Read: Gewinn, kein Profil verliert | gebaut, zuerst im bestehenden River-Veto verdrahtet; Werte auf 634 echten Gegner-Spots plausibel. Leiter `range-an` + LBR `range-lbr-typ` eingereiht. Haken wandert in den Einstieg von solver-ueberall, sobald Stufe A steht |
|
||||
| D1d | Lesen breit: Ausbeutung auch gegen Nit, Maniac, Folder, passive Fische über begrenzte Kanäle (`engine::read_exploit`, Schalter `GEGNER_BREIT`, aus; C-Bet-Druck, Bluff-Veto, River-Bluff-Catch und Dünnwert über `river_br`, Light-3-Bet), jeder Read in einer KL-Vertrauensregion um den Blind-Wert | Messregel 1a: Gewinn gegen den Lese-Typ > 0, LBR-Anstieg ≤ 5 bb/100, Leiter ohne Verlierer | gebaut; Replay echter Züge: Lesen ändert 0,74 % (vorher 0,67 %), mit Gedächtnis-Draht (`profile.reads`) 1,04 %; Diagnose: limitiert NICHT durch Menge oder Schranke, sondern durch fehlende Kanäle (Steal 32 %, 3-Bet mit Spielern dahinter 16 %) und multiway (24 %); Micro-Pool (`GEGNER_POOL`) gebaut, ändert 0 Züge; Leiter- und LBR-Arme eingereiht |
|
||||
| D1e | Neue Lese-Kanäle, wo die Diagnose die Züge findet: (1) Steal gegen die Blinds über foldToSteal (Einzel + Pool), (2) Light-3-Bet mit Spielern dahinter (Opener allein im Topf, Rest noch nicht gehandelt), (3) Flop/Turn gegen Einsatz (Bluff-Catch über Aggression), (4) multiway nur defensiv. Je Kanal in der KL-Region, Pool als Anker bei dünner Stichprobe | Messregel 1a je Kanal; Replay-Anteil + Audit-Wert | läuft (15.11.): Blockade-Tabelle mit bb fertig; (1) Steal `s` gebaut, Replay 1,04 → 1,71 %, Leiter+LBR eingereiht; (2) `m` gebaut, 0 Züge, verworfen; nächster Hebel nach Geld: postflop Check ohne C-Bet-Lage / gegen Einsatz Turn |
|
||||
| D1f | Decke je Gegnertyp: Best Response gegen jeden festen Leiter-Bot (LBR auf S1 mit dem Bot als Gegner, `blueprint::welt_gegner`, `src/bin/decke.rs`), Engine dagegen, Anteil ausgeschöpft; dann größte Lücken (Lücke × Micro-Häufigkeit) schließen, Read-gewichtet. Priorität 1: cbet-folder −31 | Tabelle Engine / Decke / % je Zeile; je Fix Leiter ohne Verlierer, LBR nicht schlechter | läuft (15.11.): cbet-folder-Leck gefunden (Erhöhungskriege ≈ −58 bb/100), Fix `RERAISE_TIEFE` + Read `raise_to_bet`, Pilot +6,16 ±3,12 kein Verlierer (cbet-folder +19,7), Leiter eingereiht; S1-Decke läuft (`messung_decke/`) |
|
||||
| D1f | Decke je Gegnertyp: Best Response gegen jeden festen Leiter-Bot (LBR auf S1 mit dem Bot als Gegner, `blueprint::welt_gegner`, `src/bin/decke.rs`), Engine dagegen, Anteil ausgeschöpft; dann größte Lücken (Lücke × Micro-Häufigkeit) schließen, Read-gewichtet. Priorität 1: cbet-folder −31 | Tabelle Engine / Decke / % je Zeile; je Fix Leiter ohne Verlierer, LBR nicht schlechter | läuft (15.11.): cbet-folder-Leck gefunden (Erhöhungskriege ≈ −58 bb/100), Fix `RERAISE_TIEFE` + Read `raise_to_bet`, Pilot (Schwelle) +6,16 ±3,12 kein Verlierer (cbet-folder +19,7); 03:15 auf stetige Bayes-Verengung r^(k−1) umgebaut, Tor eingereiht (Leiter all + micro + pool-nl2, LBR erzwungen + blind); Draht fertig, Zähler bei D2/D3; S1-Decke läuft (`messung_decke/`) |
|
||||
| D2 | Priors aus echten Händen eichen (`lesen/eichung.py`), ab 200 Gegnern mit je ≥ 30 Chancen | κ-Intervalle endlich; ersetzt die gesetzten Anker | Werkzeug steht; 0 von 16 Reads am Tor (39 Gegner); vpip μ̂ 0,70 statt Anker 0,28 |
|
||||
| D3 | Gezeigte Hände verengen die Range-Annahme je Gegner | Vorhersage auf zurückgehaltenen Händen besser (Log-Loss) | Werkzeug steht; 5 echte gezeigte Hände, zu wenig |
|
||||
| D4 | Entscheidungs-Audit: jede echte River- und Turn-Entscheidung wird nachgerechnet, EV-Verlust je Entscheidung | Bericht je Woche; zeigt das größte Leck in echten Spots | Werkzeug steht (`bin/audit`); hatte die MDF-Boden-Calls schon markiert. **Wochenbericht läuft noch nicht** |
|
||||
|
||||
@@ -297,4 +297,4 @@ das E1-Tor erneut.
|
||||
| D1e Kanal `s` Steal-Weite (`GEGNER_BREIT=…s`, aus; `1` bleibt c b r w 3) | `steal_width` aus dem RAW-Spot: Nicht-Stations über foldToBet in der KL-Region, Stations wie bisher. Replay: **1,04 → 1,71 %** (+9 Züge, alle FOLD→RAISE, Weite 1,02–1,18). Kein Audit (Audit rechnet nur Turn/River) | eingereiht: Leiter `steal-basis`/`steal-an`, LBR `steal-lbr-{typ,maniac,nit}-{aus,an}`; Tor Messregel 1a |
|
||||
| D1e Kanal `m` Light-3-Bet mit Spielern dahinter (`GEGNER_BREIT=…m`, aus) | Opener allein im Topf, Rest noch nicht gehandelt; f3 × 0,9 je Spieler dahinter gegen den Preis. Replay: **0 Züge** (die f3-Reads um 0,40 reichen nach dem Abschlag nie an ~0,6 Preis). Heads-up-Leiter/LBR sehen den Pfad nicht (bit-identisch) | nicht weiter verfolgt; bleibt aus |
|
||||
| Vergleich GTO-Bot als Hero (Owner-OK 15.11.; `sim::table::set_hero_gto`, ab_zelle `HERO=gto`, Bot `sim::gto` Shape BALANCED) | Hero-Austausch gab es nicht, gebaut als reine Mess-Option: Bot spielt den Hero-Sitz auf denselben Deals, eigener Seed, Gegner-Strom unberührt. Bit-identisch bewiesen: Live-Kern alt/neu auf 4531 echten Shadow-Anfragen 0 Unterschiede (nur die Solver-Zeit im Grund-Text schwankt, auch alt gegen alt), Leiter mit Schalter aus Byte-gleich. Rauchtest 150 Deals: Bot vs gto −25 ± 52 (≈ 0, wie erwartet) | eingereiht `gtohero` (pokerbench-engine-gtohero.exe, Zeilen/Deals von leiter-mdf + micro-passiv); Auswertung `messung_zaehlung/vergleich_gtohero.py arme/gtohero arme/leiter-mdf arme/micro-mdf` |
|
||||
| Decke: cbet-folder −31 (Priorität 1, 15.11.; `diag_welt`, `messung_decke/`) | Engine −31, GTO-Bot auf denselben Deals +57. Größter Posten Erhöhungskriege ≈ −58 bb/100 (Bot ≈ −7): `street_continuation` zählte jede Erhöhung gleich (`level` Bet/Raise), die Equity blieb über 3–4 Erhöhungen bei 0,63–0,65 (Top Pair + Gutshot 5-bettet all-in, Luft + OESD „Semibluff“ in reine Wertranges). Fix `RERAISE_TIEFE=1` (aus, bit-identisch): zweite Aggression einer Straße → Boden zwei Paare / Set, nur Kombi-Draws, Bluff-Anteil halb, gewichtet mit neuem Read `raise_to_bet` (Erhöhen gegen Einsatz; Sim-Gedächtnis, auf 0,30 geschrumpft; voll ≤ 0,25, aus ≥ 0,35). Ungegated: nemesis-2 −41 ±22 (Verlierer); auf Aggression gegated: −26 ±18 (Aggression trennt nicht: nemesis-2 0,32–0,38, reg 0,25–0,32); auf `raise_to_bet` (nemesis-2 0,41–0,49, reg 0,10–0,17, Folder 0,10–0,25): **Pilot +6,16 ±3,12, kein Verlierer** — cbet-folder +19,7 ±18,2 (−27 → −8), wert-sizer +20,4 ±10,9, reg +16,3 ±13,0, check-raiser +14,3 ±11,3, 3bet-folder −5,6 ±13,5 offen, nemesis-1/2/3, maniac, station neutral. LBR unberührt (Draht liefert `raise_to_bet` nicht → Vertrauen 0). Live wirkungslos, bis `lesen/` den Zähler liefert | eingereiht: Leiter `reraise-an` (all) gegen `leiter-mdf`, `reraise-micro` gegen `micro-mdf`; Commit folgt |
|
||||
| Decke: cbet-folder −31 (Priorität 1, 15.11.; `diag_welt`, `messung_decke/`) | Engine −31, GTO-Bot auf denselben Deals +57. Größter Posten Erhöhungskriege ≈ −58 bb/100 (Bot ≈ −7): `street_continuation` zählte jede Erhöhung gleich (`level` Bet/Raise), die Equity blieb über 3–4 Erhöhungen bei 0,63–0,65 (Top Pair + Gutshot 5-bettet all-in, Luft + OESD „Semibluff“ in reine Wertranges). Fix `RERAISE_TIEFE=1` (aus, bit-identisch): zweite Aggression einer Straße → Boden zwei Paare / Set, nur Kombi-Draws, Bluff-Anteil halb, gewichtet mit neuem Read `raise_to_bet` (Erhöhen gegen Einsatz; Sim-Gedächtnis, auf 0,30 geschrumpft; voll ≤ 0,25, aus ≥ 0,35). Ungegated: nemesis-2 −41 ±22 (Verlierer); auf Aggression gegated: −26 ±18 (Aggression trennt nicht: nemesis-2 0,32–0,38, reg 0,25–0,32); auf `raise_to_bet` (nemesis-2 0,41–0,49, reg 0,10–0,17, Folder 0,10–0,25): **Pilot +6,16 ±3,12, kein Verlierer** — cbet-folder +19,7 ±18,2 (−27 → −8), wert-sizer +20,4 ±10,9, reg +16,3 ±13,0, check-raiser +14,3 ±11,3, 3bet-folder −5,6 ±13,5 offen, nemesis-1/2/3, maniac, station neutral. LBR unberührt (Draht liefert `raise_to_bet` nicht → Vertrauen 0). Live wirkungslos, bis `lesen/` den Zähler liefert | **15.11. 03:15 umgebaut (Orchestrator: keine Schwelle, stetige Verengung):** nach der k-ten Aggression einer Straße bleibt der stärkste Anteil r^(k−1) dessen, was nach der ersten in der Range war (`Continuation::top_share`, `engine::range_filter` nach Made, dann Draw), plus Größen-Bluffanteil; r = `raise_to_bet` aus dem Gedächtnis, auf 0,30 geschrumpft, ohne Hände der Pool-Wert 0,30. Schwelle 0,25/0,35, Trust und `RERAISE_RUNG` entfernt. Aus bit-identisch (cmp cbet-folder, nemesis-2). Draht: `reads.raiseToBet` (a4d30e7), Zähler-Patch für `lesen/zaehler.py` an D2/D3. Eingereiht (vorgezogen, neue Binärdatei): `reraise-an`, `reraise-micro`, `pn2-reraise` gegen `pn2-mdf`, LBR erzwungener Read folder 0,12 aus/an + mittel 0,28 an, LBR blind an gegen `engine-s1-mdf` |
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
3bet-folder (S1, 2000 Haende, LBR-Stichprobe 60, seed 7)
|
||||
Decke (LBR gegen den Bot) +337.53 ± 96.95 bb/100
|
||||
Engine ohne Read +199.63 ± 107.22 bb/100 ausgeschoepft 59 %
|
||||
Engine mit Archetyp-HUD +200.11 ± 105.22 bb/100 ausgeschoepft 59 %
|
||||
HUD {"vpip":0.450,"pfr":0.300,"foldToBet":0.550,"hands":400,"aggression":0.300,"aggressionActions":150}
|
||||
@@ -0,0 +1,5 @@
|
||||
cbet-folder (S1, 2000 Haende, LBR-Stichprobe 60, seed 7)
|
||||
Decke (LBR gegen den Bot) +545.23 ± 148.81 bb/100
|
||||
Engine ohne Read +229.42 ± 98.87 bb/100 ausgeschoepft 42 %
|
||||
Engine mit Archetyp-HUD +225.32 ± 95.32 bb/100 ausgeschoepft 41 %
|
||||
HUD {"vpip":0.310,"pfr":0.130,"foldToBet":0.500,"hands":400,"aggression":0.300,"aggressionActions":150}
|
||||
@@ -0,0 +1,5 @@
|
||||
position (S1, 2000 Haende, LBR-Stichprobe 60, seed 7)
|
||||
Decke (LBR gegen den Bot) +258.18 ± 96.06 bb/100
|
||||
Engine ohne Read +135.45 ± 103.70 bb/100 ausgeschoepft 52 %
|
||||
Engine mit Archetyp-HUD +151.42 ± 96.24 bb/100 ausgeschoepft 59 %
|
||||
HUD {"vpip":0.530,"pfr":0.100,"foldToBet":0.490,"hands":400,"aggression":0.390,"aggressionActions":150}
|
||||
@@ -0,0 +1,5 @@
|
||||
textur-cbet (S1, 2000 Haende, LBR-Stichprobe 60, seed 7)
|
||||
Decke (LBR gegen den Bot) +408.54 ± 109.59 bb/100
|
||||
Engine ohne Read +153.67 ± 105.73 bb/100 ausgeschoepft 38 %
|
||||
Engine mit Archetyp-HUD +140.86 ± 103.82 bb/100 ausgeschoepft 34 %
|
||||
HUD {"vpip":0.440,"pfr":0.060,"foldToBet":0.580,"hands":400,"aggression":0.520,"aggressionActions":150}
|
||||
@@ -0,0 +1,5 @@
|
||||
wert-sizer (S1, 2000 Haende, LBR-Stichprobe 60, seed 7)
|
||||
Decke (LBR gegen den Bot) +299.49 ± 91.49 bb/100
|
||||
Engine ohne Read +70.60 ± 97.62 bb/100 ausgeschoepft 24 %
|
||||
Engine mit Archetyp-HUD +60.99 ± 94.87 bb/100 ausgeschoepft 20 %
|
||||
HUD {"vpip":0.450,"pfr":0.100,"foldToBet":0.550,"hands":400,"aggression":0.330,"aggressionActions":150}
|
||||
+42
-12
@@ -1,7 +1,9 @@
|
||||
use crate::card::{deck, Card};
|
||||
use crate::exploit::range_spec::{Continuation, RangeSpec};
|
||||
use crate::preflop::hand_percentile::percentile;
|
||||
use crate::read::draw::Draw;
|
||||
use crate::read::glance::glance;
|
||||
use crate::read::made::Made;
|
||||
use crate::rng::Rng;
|
||||
use crate::variant::{Rules, Variant};
|
||||
|
||||
@@ -12,11 +14,38 @@ pub type HandFilter = Box<dyn Fn(&[Card]) -> bool>;
|
||||
const SAMPLE: usize = 600;
|
||||
const SAMPLE_SEED: u64 = 0xB1FF_5EED;
|
||||
|
||||
/// Does `hand` meet the floor of `c` on its part of the board? `None` when unreadable.
|
||||
fn meets(rules: &Rules, c: &Continuation, hand: &[Card], board: &[Card]) -> Option<bool> {
|
||||
glance(rules, hand, &board[..c.board_len.min(board.len())])
|
||||
.ok()
|
||||
.map(|(made, draw)| made >= c.min_made || (c.draws_continue && draw >= c.min_draw))
|
||||
/// Strength order of a hand for `Continuation::top_share`: made hand, then draw, then a fixed ticket
|
||||
/// (own salt, so ties do not correlate with the bluff tickets of the same step).
|
||||
type Key = (Made, Draw, f64);
|
||||
|
||||
/// Salt of the tie-break ticket of `Key`, apart from the bluff tickets (`ticket(hand, step)`).
|
||||
const TOP_SALT: usize = 0x5_0000;
|
||||
|
||||
fn key(rules: &Rules, c: &Continuation, hand: &[Card], board: &[Card], step: usize) -> Option<Key> {
|
||||
glance(rules, hand, &board[..c.board_len.min(board.len())]).ok().map(|(made, draw)| (made, draw, ticket(hand, step + TOP_SALT)))
|
||||
}
|
||||
|
||||
fn above(k: &Key, cut: &Key) -> bool {
|
||||
(k.0, k.1).cmp(&(cut.0, cut.1)).then(k.2.total_cmp(&cut.2)).is_ge()
|
||||
}
|
||||
|
||||
/// Does `hand` meet the floor of `c` on its part of the board (and, with a strength cut from
|
||||
/// `top_share`, lie at or above it)? `None` when unreadable.
|
||||
fn meets(rules: &Rules, c: &Continuation, hand: &[Card], board: &[Card], step: usize, cut: Option<&Key>) -> Option<bool> {
|
||||
glance(rules, hand, &board[..c.board_len.min(board.len())]).ok().map(|(made, draw)| {
|
||||
(made >= c.min_made || (c.draws_continue && draw >= c.min_draw))
|
||||
&& cut.is_none_or(|cut| key(rules, c, hand, board, step).is_some_and(|k| above(&k, cut)))
|
||||
})
|
||||
}
|
||||
|
||||
/// The strength cut of `top_share`: the key of the `ceil(share * alive)`-th strongest readable hand
|
||||
/// (at least one hand stays); `None` without a share or with a share of 1 or more.
|
||||
fn strength_cut(rules: &Rules, c: &Continuation, alive: &[Vec<Card>], board: &[Card], step: usize) -> Option<Key> {
|
||||
let share = c.top_share.filter(|t| t.is_finite() && *t < 1.0)?;
|
||||
let mut keys: Vec<Key> = alive.iter().filter_map(|h| key(rules, c, h, board, step)).collect();
|
||||
keys.sort_by(|a, b| (b.0, b.1).cmp(&(a.0, a.1)).then(b.2.total_cmp(&a.2)));
|
||||
let n = ((share.max(0.0) * alive.len() as f64).ceil() as usize).clamp(1, keys.len().max(1));
|
||||
keys.get(n - 1).copied()
|
||||
}
|
||||
|
||||
/// A fixed number in `[0, 1)` per hand and continuation, independent of card order.
|
||||
@@ -74,9 +103,9 @@ fn admitted(c: &Continuation, value: usize, alive: usize) -> usize {
|
||||
}
|
||||
|
||||
/// Ticket threshold per continuation for hands below its floor: the `admitted` lowest tickets
|
||||
/// pass. Second value: `true` when some continuation has no value hand at all in what is
|
||||
/// left (the band contradicts the action).
|
||||
fn acceptances(spec: &RangeSpec, rules: &Rules, variant: Variant, board: &[Card]) -> (Vec<f64>, bool) {
|
||||
/// pass; and the strength cut of its `top_share`. Second value: `true` when some continuation has
|
||||
/// no value hand at all in what is left (the band contradicts the action).
|
||||
fn acceptances(spec: &RangeSpec, rules: &Rules, variant: Variant, board: &[Card]) -> (Vec<(f64, Option<Key>)>, bool) {
|
||||
if spec.continues.is_empty() {
|
||||
return (Vec::new(), false);
|
||||
}
|
||||
@@ -86,13 +115,14 @@ fn acceptances(spec: &RangeSpec, rules: &Rules, variant: Variant, board: &[Card]
|
||||
.collect();
|
||||
let init = (start, Vec::new(), false);
|
||||
let (_, qs, starved) = spec.continues.iter().enumerate().fold(init, |(alive, mut qs, starved), (step, c)| {
|
||||
let cut = strength_cut(rules, c, &alive, board, step);
|
||||
let judged: Vec<(Vec<Card>, Option<bool>)> =
|
||||
alive.into_iter().map(|h| { let m = meets(rules, c, &h, board); (h, m) }).collect();
|
||||
alive.into_iter().map(|h| { let m = meets(rules, c, &h, board, step, cut.as_ref()); (h, m) }).collect();
|
||||
let value = judged.iter().filter(|(_, m)| *m == Some(true)).count();
|
||||
let below: Vec<f64> =
|
||||
judged.iter().filter(|(_, m)| *m == Some(false)).map(|(h, _)| ticket(h, step)).collect();
|
||||
let q = threshold(below, admitted(c, value, judged.len()));
|
||||
qs.push(q);
|
||||
qs.push((q, cut));
|
||||
let next = judged
|
||||
.into_iter()
|
||||
.filter(|(h, m)| *m == Some(true) || (*m == Some(false) && ticket(h, step) < q))
|
||||
@@ -130,8 +160,8 @@ pub fn range_filter(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[C
|
||||
let p = percentile(variant, hand);
|
||||
p >= spec.lo
|
||||
&& p <= spec.hi
|
||||
&& spec.continues.iter().zip(&qs).enumerate().all(|(step, (c, q))| {
|
||||
match meets(&rules, c, hand, &board) {
|
||||
&& spec.continues.iter().zip(&qs).enumerate().all(|(step, (c, (q, cut)))| {
|
||||
match meets(&rules, c, hand, &board, step, cut.as_ref()) {
|
||||
Some(true) => true,
|
||||
Some(false) => *q > 0.0 && ticket(hand, step) < *q,
|
||||
None => false,
|
||||
|
||||
@@ -25,5 +25,6 @@ pub fn call_continuation(villain: &Villain, street: Street, ratio: f64, facing_r
|
||||
min_draw: crate::read::draw::Draw::Gutshot,
|
||||
bluff_share: 0.0,
|
||||
continue_share: Some(1.0 - fold_chance(villain.profile.as_ref(), ratio, facing_raise)),
|
||||
top_share: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ pub struct Continuation {
|
||||
pub min_draw: Draw,
|
||||
pub bluff_share: f64,
|
||||
pub continue_share: Option<f64>,
|
||||
/// `top_share`, when set, keeps only the strongest that share of the hands still in the range at
|
||||
/// this step (by made hand, then draw, `engine::range_filter`) as value; `bluff_share` is admitted
|
||||
/// below it as usual. A re-raise narrows the range this way per raise level (`RERAISE_TIEFE`).
|
||||
pub top_share: Option<f64>,
|
||||
}
|
||||
|
||||
impl RangeSpec {
|
||||
|
||||
@@ -93,38 +93,29 @@ fn raise_draw_floor() -> Draw {
|
||||
})
|
||||
}
|
||||
|
||||
/// Floor rung of a RE-RAISE (the villain's second or later bet/raise on one street: a 3-bet after a
|
||||
/// check-raise, a 4-bet after hero's 3-bet ...) per street: two pair on flop and turn, set on the river.
|
||||
const RERAISE_RUNG: [i32; 3] = [6, 6, 7];
|
||||
|
||||
/// Messschalter (einmal gelesen): `RERAISE_TIEFE=1` modelliert eine Re-Erhoehung (zweite oder spaetere
|
||||
/// Aggression des Gegners auf einer Strasse) strenger als eine erste Erhoehung, gewichtet mit dem
|
||||
/// Vertrauen, dass seine Erhoehungen Wert sind (`reraise_trust`, raise_to_bet 0,25 voll bis 0,35 aus): Boden bis
|
||||
/// zwei Paare / Set, ab halbem Vertrauen nur Kombi-Draws, Bluff-Anteil bis halb, kein Populations-Prior. Befund 15.11. (diag_welt cbet-folder):
|
||||
/// gegen reine Wert-Erhoehungen blieb die Equity ueber drei Erhoehungen bei 0,64 (Top Pair + Gutshot
|
||||
/// 5-bettet all-in), weil `level` jede Erhoehung gleich zaehlte; Erhoehungskriege kosteten dort rund
|
||||
/// 58 bb/100. Vorgabe: aus (alt, bit-identisch).
|
||||
/// Messschalter (einmal gelesen): `RERAISE_TIEFE=1` verengt die Range bei jeder weiteren Aggression des
|
||||
/// Gegners auf einer Strasse (zweite Erhoehung, dritte ...) stetig nach seiner gemessenen Frequenz, gegen
|
||||
/// einen Einsatz zu erhoehen (`Profile::raise_to_bet`, Bayes je Linie): nach der k-ten Aggression bleibt
|
||||
/// der staerkste Anteil r^(k-1) dessen, was nach der ersten noch in der Range war, plus Bluffs. Ohne Read
|
||||
/// gilt der Pool-Wert. Befund 15.11. (diag_welt cbet-folder): gegen reine Wert-Erhoehungen blieb die Equity
|
||||
/// ueber drei Erhoehungen bei 0,64 (Top Pair + Gutshot 5-bettet all-in), weil `level` jede Erhoehung gleich
|
||||
/// zaehlte; Erhoehungskriege kosteten dort rund 58 bb/100. Vorgabe: aus (alt, bit-identisch).
|
||||
fn reraise_depth_enabled() -> bool {
|
||||
use std::sync::OnceLock;
|
||||
static ON: OnceLock<bool> = OnceLock::new();
|
||||
*ON.get_or_init(|| std::env::var("RERAISE_TIEFE").as_deref() == Ok("1"))
|
||||
}
|
||||
|
||||
/// Raise-facing-a-bet read (`Profile::raise_to_bet`) at or below which a re-raise counts as fully
|
||||
/// value-weighted, and at or above which the re-raise model stays the old one. The pooled aggression
|
||||
/// does not separate (memory 15.11.: nemesis-2 0.32-0.38, reg 0.25-0.32; the aggression-gated pilot
|
||||
/// still lost −26 ± 18 against nemesis-2); raise-to-bet does (nemesis-2 0.41-0.49, reg 0.10-0.17,
|
||||
/// c-bet/3-bet folders 0.10-0.25).
|
||||
const RERAISE_FULL_RAISE_TO_BET: f64 = 0.25;
|
||||
const RERAISE_NO_RAISE_TO_BET: f64 = 0.35;
|
||||
/// Raise-facing-a-bet frequency without a read: the pool value (anchor of the counted read,
|
||||
/// `wire::decode_villain` and `sim::memory`: 0.30), so zero hands mean the pool's narrowing.
|
||||
pub const RAISE_TO_BET_POOL: f64 = 0.30;
|
||||
|
||||
/// Trust that this villain's re-raises are value-only: linear in the raise-to-bet read between the two
|
||||
/// bounds above, `0` without a read (blind = the old model, bit-identical).
|
||||
fn reraise_trust(villain: &Villain) -> f64 {
|
||||
match villain.profile.as_ref().and_then(|p| p.raise_to_bet).filter(|a| a.is_finite()) {
|
||||
Some(r) => ((RERAISE_NO_RAISE_TO_BET - r) / (RERAISE_NO_RAISE_TO_BET - RERAISE_FULL_RAISE_TO_BET)).clamp(0.0, 1.0),
|
||||
None => 0.0,
|
||||
}
|
||||
/// The share of the range that continues after the villain's `k`-th aggression on one street
|
||||
/// (`k >= 2`): `r^(k-1)` with `r` the raise-to-bet read (shrunk to the pool in the read), clamped to
|
||||
/// `[0.02, 1]`.
|
||||
pub fn reraise_share(villain: &Villain, k: usize) -> f64 {
|
||||
let r = villain.profile.as_ref().and_then(|p| p.raise_to_bet).filter(|a| a.is_finite()).unwrap_or(RAISE_TO_BET_POOL);
|
||||
r.clamp(0.02, 1.0).powi(k.saturating_sub(1) as i32)
|
||||
}
|
||||
|
||||
/// How many times the villain bet or raised on `street`.
|
||||
@@ -149,28 +140,12 @@ fn on_street(
|
||||
ratios: &[Option<f64>],
|
||||
villain: &Villain,
|
||||
street: Street,
|
||||
) -> Option<Continuation> {
|
||||
) -> Vec<Continuation> {
|
||||
let slot = street as usize - 1;
|
||||
let sustained = aggressed_earlier(&spot.history, street, villain.seat);
|
||||
let trust = if reraise_depth_enabled() && aggressions_on(&spot.history, street, villain.seat) >= 2 {
|
||||
reraise_trust(villain)
|
||||
} else {
|
||||
0.0
|
||||
};
|
||||
let made_bet =
|
||||
own_aggression(&spot.history, ratios, street, villain.seat).map(|(lvl, ratio)| {
|
||||
let bluff = bluff_share(villain.profile.as_ref(), ratio, street);
|
||||
if trust > 0.0 && lvl == 1 {
|
||||
// Trust-weighted: the floor moves from the raise rung toward the re-raise rung, strong
|
||||
// draws only from half trust on, the bluff share shrinks to half at full trust.
|
||||
let base = RAISE_RUNG[slot] + ((RERAISE_RUNG[slot] - RAISE_RUNG[slot]) as f64 * trust).round() as i32;
|
||||
return (
|
||||
rung(base, size_notch(ratio) + style_rung(villain)),
|
||||
DRAWS[slot],
|
||||
if trust >= 0.5 { Draw::Combo } else { raise_draw_floor() },
|
||||
(1.0 - 0.5 * trust) * bluff,
|
||||
);
|
||||
}
|
||||
let base = [BET_RUNG, RAISE_RUNG][lvl][slot];
|
||||
(
|
||||
rung(base, size_notch(ratio) + style_rung(villain)),
|
||||
@@ -191,14 +166,25 @@ fn on_street(
|
||||
0.0,
|
||||
)
|
||||
});
|
||||
merge(made_bet, made_call).map(|(min_made, draws_continue, min_draw, bluff_share)| Continuation {
|
||||
let first = merge(made_bet, made_call).map(|(min_made, draws_continue, min_draw, bluff_share)| Continuation {
|
||||
board_len: street.board_len(),
|
||||
min_made,
|
||||
draws_continue,
|
||||
min_draw,
|
||||
bluff_share,
|
||||
continue_share: None,
|
||||
})
|
||||
top_share: None,
|
||||
});
|
||||
// Each further aggression on the street keeps the strongest r^(k-1) of what the first left, with
|
||||
// the plain size bluff share below it (a sustained line earns no population over-bluff prior).
|
||||
let k = aggressions_on(&spot.history, street, villain.seat);
|
||||
let deeper = (reraise_depth_enabled() && k >= 2).then_some(()).and(first).map(|c| Continuation {
|
||||
top_share: Some(reraise_share(villain, k)),
|
||||
bluff_share: own_aggression(&spot.history, ratios, street, villain.seat)
|
||||
.map_or(0.0, |(_, ratio)| bluff_share(villain.profile.as_ref(), ratio, street)),
|
||||
..c
|
||||
});
|
||||
first.into_iter().chain(deeper).collect()
|
||||
}
|
||||
|
||||
/// Postflop narrowing from the villain own actions, one entry per dealt street
|
||||
@@ -224,6 +210,6 @@ pub fn continuations(spot: &Spot, villain: &Villain) -> Vec<Continuation> {
|
||||
[Street::Flop, Street::Turn, Street::River]
|
||||
.into_iter()
|
||||
.filter(|street| street.board_len() <= spot.board.len())
|
||||
.filter_map(|street| on_street(spot, &ratios, villain, street))
|
||||
.flat_map(|street| on_street(spot, &ratios, villain, street))
|
||||
.collect()
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ fn spec(bluff_share: f64) -> RangeSpec {
|
||||
min_draw: rechner::read::draw::Draw::Gutshot,
|
||||
bluff_share,
|
||||
continue_share: None,
|
||||
top_share: None,
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ fn floor_spec(min_made: Made, continue_share: Option<f64>) -> RangeSpec {
|
||||
min_draw: rechner::read::draw::Draw::Gutshot,
|
||||
bluff_share: 0.0,
|
||||
continue_share,
|
||||
top_share: None,
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
//! Spec: a re-raise narrows the villain's range by his measured raise frequency (`RERAISE_TIEFE`).
|
||||
//!
|
||||
//! The villain's second (third ...) bet or raise on one street used to get the same floor as his
|
||||
//! first (`street_continuation::level` knew only bet / raise): against value-only raisers top pair
|
||||
//! with a gutshot kept 0.64 equity through three raises and went all-in (diag_welt cbet-folder
|
||||
//! 15.11., raise wars about -58 bb/100). Now each further aggression keeps the strongest share of
|
||||
//! what was left - his raise-facing-bet frequency `r` per level (Bayes per line), shrunk to the pool
|
||||
//! value without hands - via `Continuation::top_share` in `engine::range_filter`.
|
||||
|
||||
mod spot_fixture;
|
||||
|
||||
use rechner::card::{deck, Card};
|
||||
use rechner::engine::range_filter::range_filter;
|
||||
use rechner::exploit::profile::Profile;
|
||||
use rechner::exploit::range_spec::{Continuation, RangeSpec};
|
||||
use rechner::exploit::street_continuation::{reraise_share, RAISE_TO_BET_POOL};
|
||||
use rechner::game::Villain;
|
||||
use rechner::read::draw::Draw;
|
||||
use rechner::read::glance::glance;
|
||||
use rechner::read::made::Made;
|
||||
use rechner::variant::{rules, Variant};
|
||||
use spot_fixture::cards;
|
||||
|
||||
const BOARD: &str = "Kd 8h 3c";
|
||||
|
||||
fn spec(top_share: Option<f64>, bluff_share: f64) -> RangeSpec {
|
||||
RangeSpec {
|
||||
lo: 0.0,
|
||||
hi: 1.0,
|
||||
continues: vec![Continuation {
|
||||
board_len: 3,
|
||||
min_made: Made::BottomPair,
|
||||
draws_continue: true,
|
||||
min_draw: Draw::Gutshot,
|
||||
bluff_share,
|
||||
continue_share: None,
|
||||
top_share,
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
fn all_hands(board: &[Card]) -> Vec<[Card; 2]> {
|
||||
let pool = deck::without(board);
|
||||
(0..pool.len()).flat_map(|i| (i + 1..pool.len()).map(move |j| (i, j))).map(|(i, j)| [pool[i], pool[j]]).collect()
|
||||
}
|
||||
|
||||
/// (share passing, weakest made hand passing, strongest made hand failing)
|
||||
fn census(s: &RangeSpec) -> (f64, Made, Made) {
|
||||
let board = cards(BOARD);
|
||||
let r = rules(Variant::Nlhe);
|
||||
let filter = range_filter(s, r, Variant::Nlhe, &board);
|
||||
let hands = all_hands(&board);
|
||||
let made = |h: &[Card; 2]| glance(&r, &h[..], &board).unwrap().0;
|
||||
let pass: Vec<_> = hands.iter().filter(|h| filter(&h[..])).collect();
|
||||
let weakest = pass.iter().map(|h| made(h)).min().unwrap();
|
||||
let best_out = hands.iter().filter(|h| !filter(&h[..])).map(made).max().unwrap();
|
||||
(pass.len() as f64 / hands.len() as f64, weakest, best_out)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_top_share_keeps_the_strongest_hands() {
|
||||
for share in [0.05, 0.15, 0.3] {
|
||||
let (passing, weakest, best_out) = census(&spec(Some(share), 0.0));
|
||||
assert!((passing - share).abs() < 0.005, "share {share}: {passing:.3} pass");
|
||||
assert!(weakest >= best_out, "share {share}: {weakest:?} passes while {best_out:?} is out");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn without_a_top_share_nothing_changes() {
|
||||
let (alone, _, _) = census(&spec(None, 0.0));
|
||||
let (all, _, _) = census(&spec(Some(1.0), 0.0));
|
||||
assert_eq!(alone, all);
|
||||
assert!(alone > 0.3, "the floor alone passes {alone:.3}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bluffs_are_admitted_below_the_cut() {
|
||||
let (value, _, _) = census(&spec(Some(0.1), 0.0));
|
||||
let (with_bluffs, _, _) = census(&spec(Some(0.1), 0.25));
|
||||
assert!((with_bluffs - value / 0.75).abs() < 0.005, "{value:.3} value, {with_bluffs:.3} with bluffs");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_share_per_level_is_the_raise_frequency_and_the_pool_without_a_read() {
|
||||
let read = |r: Option<f64>| Villain {
|
||||
seat: 1,
|
||||
stack: 100.0,
|
||||
folded: false,
|
||||
profile: Some(Profile { raise_to_bet: r, ..Profile::default() }),
|
||||
};
|
||||
assert!((reraise_share(&read(Some(0.2)), 2) - 0.2).abs() < 1e-12);
|
||||
assert!((reraise_share(&read(Some(0.2)), 3) - 0.04).abs() < 1e-12);
|
||||
assert!((reraise_share(&read(None), 2) - RAISE_TO_BET_POOL).abs() < 1e-12);
|
||||
let blind = Villain { seat: 1, stack: 100.0, folded: false, profile: None };
|
||||
assert!((reraise_share(&blind, 2) - RAISE_TO_BET_POOL).abs() < 1e-12);
|
||||
}
|
||||
Reference in New Issue
Block a user