/// 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, } /// 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, } } }