Rust poker library
Project description
RustPoker
A poker library written in rust.
- Multithreaded range vs range equity calculation
- Fast hand evaluation
- Efficient hand indexing
Developing Bindings
Use virtual env virtualenv .venv.
Enable the envirnmoent source .venv/bin/activate
Run maturin develop to create ptyhon lib with bindings, it will automatically put it inside the python packages dir.
To test out point the ipynb notebooks kernel to virtualenv and then just run the package.
To install pytohn packages pip install poetry && poetry install --no-root
Hand Evaluator
Evaluates the strength of any poker hand using up to 7 cards.
Usage
import pyrust_poker
keep_cards_mask = np.zeros(shape=(2, 52), dtype=np.uint64)
keep_cards_mask[0, [0, 4, 8, 12, 48]] = 1 # 36865 - straight flush 5 high
keep_cards_mask[1, [48, 44, 40, 36, 32]] = 1 # 36874 - straight flush A high
pyrust_poker.get_hand_strengths(keep_cards_mask)
Equity Calculator
Calculates the range vs range equities for up to 6 different ranges specified by equilab-like range strings. Supports monte-carlo simulations and exact equity calculations
Credit
The hand evaluator and equity calculator library is a rust rewrite of zekyll's C++ equity calculator, OMPEval
License
This project is MIT Licensed
Copyright (c) 2020 Kyle Murphy
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrust_poker-0.2.2.tar.gz.
File metadata
- Download URL: pyrust_poker-0.2.2.tar.gz
- Upload date:
- Size: 56.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2feb8785463e921519eb780430ce22c91adc9b8f16b87b8fa18d213941921b34
|
|
| MD5 |
b68bffba3531c19fe23e9524f54cef25
|
|
| BLAKE2b-256 |
20b267ed660c2b4ee007991433e31331856910a1dbc9f737c66093a23ab4c1ef
|
File details
Details for the file pyrust_poker-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pyrust_poker-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 243.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02bcf450c886e97da3891b2c23e1264e1122298b22f1c92a7cf8d430cadc310
|
|
| MD5 |
c6433e5e137fc86eaea7044842eb34b9
|
|
| BLAKE2b-256 |
319cd02d52139ec930af35d772ee773c1c71431852226347bd880857f68e76e9
|