Query grammar and meaning
This is an original query subset, not a claim of compatibility with another provider's PQL. Use P(boolean event | boolean condition), AVG(number | condition) or COUNT(event | condition). Add WHERE condition after the closing parenthesis. Conditions can contain nested parentheses, AND, OR, NOT and comparisons ==, !=, <, >, <=, >=. Numeric expressions support +, -, * and /. Strings use double quotes.
Players are numbered from one. Zero means only the board for has, rankcount and suitcount. These three functions otherwise inspect only hole cards. Examples: has(1,"As"), rankcount(0,14), suitcount(0,"h"). Ranks are 2 to 14 or "A", "K", "Q", "J", "T". Other functions: equity(1), win(1), tie(1), split(1), category(1), boardpaired(). Categories are 0 high card, 1 pair, 2 two pair, 3 trips, 4 straight, 5 flush, 6 full house, 7 quads, 8 straight flush. Short-deck strength still puts flush above full house. win means the full pot; split means any positive fractional pot share. For high-low use split, not tie.
Weighted ranges use AA:50% or AKs@0.25. Exact evaluation has a 30,000-outcome budget. Counts are the number of matching visited physical outcomes; sampled COUNT is not a population total and weights are reported separately. Probability uses weighted mass in exact mode. Sampling intervals use the accepted conditional sample, with Wilson intervals for probabilities. A condition seen zero times is an error, not evidence of impossibility.
Calculations run in a cancellable background worker. Samples describe random-card or path uncertainty. Supplied ranges, draw policies, stakes and future outcomes remain assumptions.