maverick.utils.holding_strength.estimate_holding_strength#
- maverick.utils.holding_strength.estimate_holding_strength(holding: list[Card], *, community_cards: list[Card] | None = None, n_simulations: int = 1000, n_players: int = 8, n_private: int = 0, n_community_cards_total: int = 5) float[source]#
Estimate the holding strength as the relative linelihood of winning against n_players - 1 opponents.
If you are pre-flop, provide only your two hole cards in holding. If you are post-flop, provide your hole cards plus the community cards on the table in community_cards.
- Parameters:
n_simulations (int, optional) – The number of Monte Carlo simulations to run (default is 1000).
n_players (int, optional) – The total number of players at the table including the player (default is 8).
community_cards (list[Card], optional) – The community cards already on the table. If provided, these will be used in the simulations.
n_community_cards_total (int, optional) – The total number of community cards in the game (default is 5).
n_private (int, optional) – The number of private cards that must be included in the hand (default is 0). A value of 0 means any number of private cards can be used.
- Returns:
The relative linelihood of winning as a value in the unit interval [0, 1].
- Return type:
Notes
The estimated strength is only as accurate as the number of simulations run. Also, it is only the relative linelihood of winning mathematically, and does not take into account betting strategies, player tendencies, or other psychological factors.