Skip to main content

Introduction

Welcome to Open PQL - a high-performance Rust implementation of Poker Query Language (PQL) that enables SQL-like queries for poker analysis and calculations.

What is Open PQL?

Open PQL provides a powerful query language for poker analysis, allowing users to perform complex calculations on poker scenarios using familiar SQL-like syntax. The library supports various poker variants and offers comprehensive hand evaluation, equity calculations, and range analysis capabilities.

Key Features

  • SQL-like Query Language: Intuitive PQL syntax for poker analysis
  • High Performance: Optimized Rust implementation for fast calculations
  • Multi-game Support: Texas Hold'em, Short Deck, and other poker variants
  • Range Analysis: Advanced hand range evaluation and filtering
  • Equity Calculations: Precise equity computations for different scenarios
  • WebAssembly Support: Run PQL queries in the browser

Quick Example

Here's a simple PQL query to calculate equity between two hands:

select equity from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'

This query calculates the equity of AhKh (hero) versus QQ+ range (villain) on the Ah9s2c board in Texas Hold'em.

Getting Started

Installation

Add Open PQL to your Rust project:

[dependencies]
open-pql = "0.0.3"

CLI Usage

Install the command-line tool:

cargo install opql

Run PQL queries directly:

opql -c "select avg(boardsuitcount(river)) from hero='As9s', villain='*', board='2s3sJh', game='holdem'"

Try Online

Experience Open PQL in your browser at the PQL Playground.

What's Next?