ducy
A performant analysis library for poker, supporting Texas Hold'em and Omaha.
Features
- Bitfield-based deck representation — cards and decks are stored as
u64bitfields for fast set operations - Hand ranking — standard poker hand evaluation with
Ord-based comparison - Winner evaluation — determine winners for a given board state
- Equity calculation — enumerate all possible runouts to compute each player's equity
- Range support — build weighted hand ranges using notation like
"AQo+"and"AJs+" - Board analysis — flush texture analysis for Omaha boards
Quick start
Add ducy to your Cargo.toml:
[]
= "0.1.2"
Evaluate a Hold'em hand
use Deck;
use FlopGame;
use ;
use GameEvaluation;
let mut game = new;
game.add_player.unwrap;
game.add_player.unwrap;
game.set_flop.unwrap;
let evaluator = HoldemGameEvaluation ;
let winners = evaluator.evaluate_winners;
println!;
Evaluate an Omaha hand
use ;
use FlopGame;
use ;
use ;
let mut game = new;
game.add_player.unwrap;
game.add_player.unwrap;
game.set_flop.unwrap;
game.set_turn.unwrap;
let evaluator = OmahaGameEvaluation ;
let equity = evaluator.evaluate_equity;
println!;
Minimum supported Rust version
1.85.0 (edition 2024)
License
MIT