SQL for poker. Written in Rust.
Playground • Docs • Quick Start • Workspace
⚠️ Work in progress. Active development; not yet production-ready.
Why this exists. The original PQL — a Java tool released in 2014 by Odds Oracle — is no longer sold commercially, though free licenses are now available for download. Open PQL is a ground-up Rust rewrite that complements the original: free, open source, faster, and built to carry PQL forward for the next decade. It's a high-performance implementation of Poker Query Language, the SQL-like language for equity, range, and board analysis.
select equity
from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'♠️ Familiar syntax — SQL-like queries for equity, ranges, and board analysis- ⚡ Fast — bit-packed cards, Monte Carlo sampling, optimized evaluators
- 🃏 Multi-game — Texas Hold'em, Omaha, Short Deck
- 🎯 Expressive ranges — variable-based notation (
AwKw,QQ+,AwJw+) - 🛠️ Library + CLI — embed the runner or use the
opqlbinary
Add to Cargo.toml:
[dependencies]
openpql-runner = "0.1"Or use the CLI:
opql --run "select equity from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'"Try it in your browser at pql-playground.solve.poker.
| Crate | Purpose |
|---|---|
openpql-runner |
Library and opql CLI — start here |
openpql-pql-parser |
PQL syntax parser |
openpql-range-parser |
Range notation parser |
openpql-core |
Game abstraction & execution core |
openpql-prelude |
Cards, hands, evaluators |
openpql-macro |
Internal proc macros |
- 📖 PQL Guide & Tutorial — language reference and walkthroughs
- 🎮 Playground — run queries in your browser
MIT — see LICENSE.
- K. Waugh, 2013. A Fast and Optimal Hand Isomorphism Algorithm.
Thanks to the Odds Oracle (propokertools.com) team for pioneering PQL.
Made with