Skip to content

solve-poker/Poker-Query-Language

Repository files navigation

Open PQL

SQL for poker. Written in Rust.

crates.io docs.rs downloads Rust 1.85+ License: MIT

Playground PQL Docs

PlaygroundDocsQuick StartWorkspace

PQL Playground demo


⚠️ 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'

Features

  • ♠️ 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 opql binary

Quick Start

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.

Workspace

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

Documentation

License

MIT — see LICENSE.

Bibliography

  • K. Waugh, 2013. A Fast and Optimal Hand Isomorphism Algorithm.

Acknowledgments

Thanks to the Odds Oracle (propokertools.com) team for pioneering PQL.

Made with ♥️

About

SQL-like query language for poker hand analysis (Hold'em, Omaha, Short Deck) — Rust implementation with WASM playground

Topics

Resources

License

Stars

4 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors