[][src]Function rust_poker::equity_calculator::calc_equity

pub fn calc_equity(
    hand_ranges: &[HandRange],
    board_mask: u64,
    n_threads: u8,
    sim_count: u64
) -> Vec<f64>

Runs a monte carlo simulation to calculate range vs range equity

Returns the equity for each player

Arguments

  • hand_ranges Array of hand ranges
  • board_mask 64 bit mask of public cards
  • n_threads Number of threads to use in simulation
  • sim_count Number of games to simulate

Example

use rust_poker::hand_range::{HandRange, get_card_mask};
use rust_poker::equity_calculator::calc_equity;
let ranges = HandRange::from_strings(["random".to_string(), "random".to_string()].to_vec());
let board_mask = get_card_mask("");
let equities = calc_equity(&ranges, board_mask, 4, 1000);