/// Observed opponent tendencies, all frequencies in `[0, 1]`. Every field optional. /// Wire shape (extension): /// `"profile": {"vpip": 0.45, "pfr": 0.08, "foldToBet": 0.3, "aggression": 0.4}`. /// /// The fields below `aggression` are the HUD numbers the client already delivers but the core did /// not read before (`lesen/profil.py` DURCHGEREICHT). They carry their client names on the wire /// (`src/wire/decode_villain.rs`) and reach the engine per villain. No exploit rule reads them yet: /// every new read must first earn its place on the ladder benchmark (`read_gate`), which no /// candidate has so far. They stand ready for the opponent memory and future, ladder-proven rules. #[derive(Clone, Copy, Debug, PartialEq, Default)] pub struct Profile { /// Voluntarily put money in pot, preflop. pub vpip: Option, /// Preflop raise frequency. pub pfr: Option, /// How often the player folds to a bet postflop. pub fold_to_bet: Option, /// Share of the player's postflop actions that are bets or raises (aggression /// frequency). Steers how much of their betting range is a bluff (`bluff_share`). pub aggression: Option, /// Aggression frequency on the TURN only (bets+raises over the player's turn actions). `None` /// until the memory/HUD has turn data. The turn gearbox (`engine::turn_subgame`) prefers it over /// the pooled `aggression`: a player who barrels turns but checks flops reads as a turn bluffer /// here, so the defensive veto does not fold a good call against them. pub turn_aggression: Option, /// Aggression frequency on the RIVER only. `None` until the memory/HUD has river data. The river /// gearbox (`engine::river_subgame`) prefers it over the pooled `aggression`, since river bluffing /// tendency differs from flop/turn barreling. pub river_aggression: Option, /// Fold-to-bet split by street `[flop, turn, river]`, already shrunk toward the pooled /// `fold_to_bet` by the street's own sample size (`sim::memory`), so a thin street stays at the /// pooled read and a well-sampled one moves to its own rate. `None` per street = no data. Read /// only by `fold_chance::fold_chance_on` (hero's fold equity on that street). pub street_fold_to_bet: [Option; 3], /// How often the player continuation-bets the flop as the preflop aggressor. pub cbet: Option, /// How often the player folds to a continuation bet. pub fold_to_cbet: Option, /// Preflop three-bet frequency. pub three_bet: Option, /// How often the player folds to a three-bet. pub fold_to_three_bet: Option, /// How often the player attempts to steal the blinds from late position. pub steal: Option, /// How often the player check-raises. pub check_raise: Option, /// Went to showdown: how often the player reaches showdown once seeing the flop. A high /// value marks a sticky, showdown-happy opponent. pub wtsd: Option, /// Won at showdown: how often the player wins once at showdown. pub wsd: Option, /// Confidence in this read, in `[0, 1)`: 0 without data, rising with the observed postflop /// sample (half at `sim::memory::CONFIDENCE_HALF` actions). Not a tendency — it says how far the /// read may be trusted. The river gearbox (`engine::river_subgame`) turns it into the KL trust /// radius λ: strong read → exploit far, weak read → stay near GTO. `None` = no confidence signal /// (treated as 0 by the gearbox). No classify/gate rule reads it; it only scales exploitation. pub confidence: Option, /// Confidence of the AGGRESSION read alone, in `[0, 1)`. Live the client HUD has no aggression: /// it comes from the few postflop moves this session saw (`lesen/profil.py`), while `confidence` /// comes from the HUD hand count, so the two can disagree by orders of magnitude (500 HUD hands, /// 2 seen moves). `None` = the aggression read is as good as `confidence` (the session memory, /// where both come from the same postflop sample). Read through `bluff_read_confidence`. pub aggression_confidence: Option, /// River showdown read: of the player's river bets/raises that were SHOWN DOWN, the share that was /// air (equity below `AIR_STRENGTH` vs a random hand on the final board). Unbiased evidence of the /// river betting range: whether hero calls depends on hero's cards, not the bettor's. The river /// gearbox blends it into its bluff belief by `river_bluff_shown` (`engine::river_subgame`). pub river_bluff_share: Option, /// How many river bets/raises `river_bluff_share` rests on. pub river_bluff_shown: Option, /// Aggression frequency on the FLOP only (memory handover `reads.flopAggression`). `None` without it. pub flop_aggression: Option, /// Shown hands on the river (plan D3, `profile.shown.linien` of the memory handover): the /// preflop-class distribution (`range_spec::chen_class`) of what this player holds when he reaches /// showdown after betting/raising the river (`[0]`, "river-aggr") or after checking/calling it /// (`[1]`, "river-passiv"). Hierarchical: the line population is the prior, the player's own shown /// hands pull it by their sample (`lesen/uebergabe._klassen_feld`). Used by `ZEIGT_KIPP=1` only. pub shown_river: Option<[[f64; crate::exploit::range_spec::CLASSES]; 2]>, /// How often the player, in a blind, folds to a steal raise (`reads.foldToSteal`). pub fold_to_steal: Option, /// How often the player folds after betting/raising a postflop street and being raised (`reads.foldToRaise`). pub fold_to_raise: Option, /// How often the player RAISES when facing a postflop bet (raises over folds + calls + raises facing /// a bet). Sim memory only so far (`RERAISE_TIEFE` gate); `None` without it. pub raise_to_bet: Option, /// How many chances (`reads.raiseToBet.n`) `raise_to_bet` rests on; `None` without a counted read. /// Used by `POSTERIOR=...,fluss:` (thin reads keep the incoming bluff share on flop/turn). pub raise_to_bet_n: Option, /// How often the player RE-RAISES when raised after their own postflop bet/raise on that street /// (aggressive over fold + call + aggressive in that spot). Drives the `RERAISE_TIEFE` narrowing /// per raise level; `None` without it (pool value). pub reraise_to_raise: Option, /// How strongly the player's bet size tells their strength, as a gain on the population's /// size notch (`exploit::size_notch`): 1 = the population (bigger is stronger, as assumed), 0 = no /// tell, negative = reverse sizing, 2 = a pure value-sizer. From the shown (size, strength) pairs, /// shrunk toward 1. Sim memory only so far; used under `GROESSE_LESEN=1`. pub size_gain: Option, /// Set by `engine::read_gate` (switch `ANGRIFF_FOLD`) on the reduced profile of an untrusted style: /// only the fold reads were kept, so the profile has no style (`exploit::style::classify` = /// Unknown) and only the fold chance of hero's bets uses it. Never on the wire. pub fold_only: bool, /// Set by `engine::read_gate` (switch `POOL_PRIOR`) on the stake's pool baseline of an unread or /// gated villain: only the pool's passive fold reads, faded by the villain's own sample. No style /// (`classify` = Unknown); the bet over-bluff prior of an unread villain still applies /// (`exploit::bluff_share`). Never on the wire. pub pool_baseline: bool, /// With `pool_baseline`: the villain's raises carry the pool's value share (no population /// over-bluff prior on a raise), because his own raise read is not wider than the anchor. pub pool_raise_value: bool, /// Counted open-bet frequency per postflop street (flop, turn, river): `(bets, chances)` when the /// player was to act with no bet on the street yet (check or bet). Calls are not in it, unlike /// `aggression`. Drives the bluff share of an open bet under `EINSATZ_BLUFF` (`exploit::bet_open`). pub bet_open: [Option<(f64, f64)>; 3], } /// Equity vs a random hand on the river below which a shown river bet counts as air (a bluff): the /// lower two strength bands (`sim::welt_memory::STRENGTH_BANDS`). pub const AIR_STRENGTH: f64 = 0.4; impl Profile { /// How far a read about this player's BLUFFING may be trusted: the weaker of the overall read /// and the aggression read. `None` = no confidence signal (the gearbox treats it as 0). pub fn bluff_read_confidence(&self) -> Option { let ok = |x: Option| x.filter(|c| !c.is_nan()); match (ok(self.confidence), ok(self.aggression_confidence)) { (Some(c), Some(a)) => Some(c.min(a)), (c, _) => c, } } }