RustPoker
A poker library written in rust.
- Multithreaded range vs range equity calculation
- Fast hand evaluation
- Efficient hand indexing
Installation
Add this to your Cargo.toml
:
[dependencies]
rust_poker = "0.1.9"
Note: The first build of an application using rust_poker
will take extra time to generate the hand evaluation table
Hand Evaluator
Evaluates the strength of any poker hand using up to 7 cards.
Usage
use ;
// cards are indexed 0->51 where index is 4 * rank + suit
let hand = empty + CARDS + CARDS;
let score = evaluate;
println!;
Equity Calculator
Calculates the range vs range equities for up to 6 different ranges specified by equilab-like range strings.
Usage
use ;
use calc_equity;
let ranges = from_strings;
let public_cards = get_card_mask;
let n_games = 10000;
let n_threads = 4;
let equities = calc_equity;
println!;
Credit
The hand evaluator and equity calculator library is a rust rewrite of zekyll's C++ equity calculator, OMPEval