ProPokerTools Syntax
This topic contains 14 replies, has 5 voices, and was last updated by Nikolaj 1 year, 8 months ago.

ProPokerTools Syntax
By Nikolaj
I get a lot of the same questions from users on how the syntax works, and usually I just refer them to ProPokerTools documentation on the generic syntax that can be found here, but figured I’d extract the PLO related part of that documentation and post it so our users could ask their questions in this post.
So here we go ๐
Generic Syntax Documentation
- Games Supported
- Ranks and Suits
- Percent of Hands
- Combining Ranges
- Card Order
- Rank Spans
- Rank and Suit Lists
- No Pair Constraint
- Syntax Macros
- Generic Syntax Odds and Ends
- Key Differences vs. Classic Syntax
Extensive Examples
Generic Syntax Documentation
Games Supported
Generic Syntax is currently available for all games. Generic Syntax may also be used to specify the board and dead cards.
Ranks and Suits
- The standard ranks are “AKQJT98765432”.
- The standard suits are “shdc”.
- Suit variables are “wxyz”. See the examples below for how these work.
- All other letters not listed above are rank variables. “R” for Rank, “O” for Other rank, and “N” for aNother rank are reasonable choices. See the examples below for how these work.
- “*” is the wildcard rank, and means “any rank”.
Here are some example 4-card (omaha) ranges using only the above:
- AsKhJd2c – a specific hand where all cards are known.
- AA – a hand with at least two aces in it.
- AxAyxy – double-suited Aces.
- sshh – a hand with two spades and two hearts.
- wxy – a hand with at least three suits.
- **** – a completely random hand. This can be written more simply as “*”.
- RRON – A hand with one pair and two non-paired side cards.
- RxRyOxOy – A double-suited hand with two pairs in it.
Percent of Hands
ProPokerTools has its own ranking of hands for omaha, omaha hi/lo, hold’em, five-card omaha, and five-card omaha hi/lo. Here are a few examples of how to generate ranges using these rankings:
- 15% – The top 15 percent of hands (full-ring)
- 5%-10% – Hands between the top 5 and top 10 percent of hands (full-ring)
- 1%-100% – All hands
The default rankings are for full-ring games. Also provided are rankings for 6-handed games. To specify the 6-handed rankings, simply add “6h” after the percentage sign:
- 15%6h – The top 15 percent of hands (6-handed)
- 5%-10%6h – Hands between the top 5 and top 10 percent of hands (6-handed)
Text files containing the hand orderings can be downloaded below:
- Omaha Hi 10-handed | 6-handed | 3-handed | vs random hand
If you are curious about how these orderings were created, you can check out these blog posts:
Combining Ranges
There are three ways to combine multiple ranges.
- Use ‘,’ (read as “or”) to get the union of two ranges. For instance, in hold’em, “JJ, AK” means “Jacks OR Ace-King.”
- Use ‘:’ (read as “and”) to get the intersection of two ranges. For instance, in hold’em, “xx:15%” means “hands that are suited AND in the top 15% of hands.”
- Use ‘!’ (read as “not”) to get the difference of two ranges. For instance, in omaha, “AA!AAA” means “hands with two aces NOT three aces.”
Note that all three combinators (“,”, “:”, and “!”) can be used together. For instance, in omaha, “AA:xxyy, JJ!JJJ, KK” means “double suited aces or a hand with exactly two jacks or a hand with at least two kings.”
Rank Spans
Rank spans allow you to specify cards that vary from a start rank to an end rank. This is easier explained with a few omaha hand examples:
- KQJT-T987 – Equivalent to KQJT,QJT9,JT98,T987
- AAJT-AA87 – Equivalent to AAJT,AAT9,AA98,AA87
It is possible to use multiple rank spans in the same hand if they are enclosed in square brackets. For instance:
- [A-Q][J-T]23 – Equivalent to AJ23, AT23, KJ23, KT23, QJ23, QT23
Furthermore, you can use a trailing plus or minus to indicate ascending or descending ranges:
- T8+ – Equivalent to T8,J9,QT,KJ,AQ
- 664- – Equivalent to 664,553,442
Finally, suits and suit variables are allowed, as long as both sides match:
- TsJs-KsQs – Equivalent to TsJs,JsQs,QsKs
- [Kx-Jx]x – Equivalent to Kxx, Qxx, Jxx
Rank and Suit Lists
Occasionally, you want to have a card match a particular set of ranks, suits, or cards. Here are some examples:
- [2,3,4] – Equivalent to 2-4
- [2,4,6,8,T][3,5,7,9] – A hand with at least one odd and one even number card.
- [As,Ah,K]K – Equivalent to AsK, AhK, KK
Card Order
Card order is preserved for games where the order of cards is significant (stud, stud-8). Card order is ignored for other games (hold’em, omaha, omaha-8). Card order is also preserved for flop game boards on the turn and river.
Card Order in Flop Games
There is no concept of card order in generic range syntax for Hold’em and Omaha. For instance, in Hold’em, “KJ:hd” translates directly to “a hand with a king and a jack AND a hand with a heart and a diamond”. As such, it is equivalent to “KhJd, KdJh” – it is NOT the same as “KhJd”. Similarly, in Omaha, if one wanted to specify a hand with ace-high flush potential in hearts single-suited, one would write “Ahhxy” – it is NOT correct to write “A:hhxy”, as that would include hands such as “AcJs7h6h”.
Card Order on Flop Game Boards
For games with a shared board (hold’em, omaha, omaha-8), the order of the first three cards (the “flop”) is not significant, while the order of the last two cards (the “turn” and “river”) is significant. For instance, the boards “KKJ” and “JKK” are equivalent – they translate to “a flop with two kings and one jack”. However, the boards “sshds” and “sshsd” are NOT equivalent – the first board has a flop with two spades and one heart, a diamond on the turn, and a spade on the river, while the second board has the same flop but a SPADE on the turn and a DIAMOND on the river.
No Pair Constraint
You can enclose any number of cards in a subrange in curly braces to indicate that there are no paired cards. For instance:
- A{A$W$W} – an omaha hand containg two aces and two non-paired wheel cards
- {$W$W 5s} – a stud hand with a wheel draw headed by the five of spades
Syntax Macros
Syntax macros are a useful way to avoid typing in the same string of characters over and over again. Macros begin with a $ and may contain numbers and letters. Macros may reference other macros (but no macro may reference itself). The Generic Syntax comes with the following built-in macros:
Macro | Meaning | Translates to | Example |
$B | big card | [A-J] | $B$B – two big cards |
$M | middle card | [T-7] | $M$M – two middle cards |
$Z | small card | [6-2] | $Z$Z – two small cards |
$F | face card | [K-J] | $F$F – two face cards |
$R | broadway card | [A-T] | $R$R – two broadway cards |
$W | wheel card | [A,2,3,4,5] | $W$W – two wheel cards |
$ds | double-suited | :xxyy | AA$ds – double-suited aces |
$ss | single-suited | :xxyz | AKQJ-9876$ss – single-suited rundown |
$np | no pairs constraint | !RR | 15%$np – a hand in the top 15% with no paired cards |
$op | one pair constraint | :RRON | 5%$op – a hand in the top 5% with exactly one pair |
$tp | two pair constraint | :RROO | 20%tp – a hand in the top 20% with two pair |
$nt | no trips constraint | !RRR | 50%$nt – a hand in the top 50% with no trips (or quads) |
$0g | a 0-gap rundown | AKQJ- | $0g:10% – a 0-gap rundown in the top 10% of hands |
$1g | a 1-gap rundown | A:(KQT,KJT,QJT) | $1g:20% – a 1-gap rundown in the top 20% of hands |
$2g | a 2-gap rundown | A:(KQ9,KT9,JT9) | $2g:ss – a 2-gap rundown with two or more spades |
Case (“A” vs. “a”) is ignored. Nevertheless, ranges are easier to read if ranks and rank variables are capitalized while suit variables are in lower case.
Generic Syntax Odds and Ends
- Aces are always high. This means that “A-5” is equivalent to “[A,K,Q,J,T,9,8,7,6,5]”. If you want wheel cards, you can use [A,2,3,4,5] instead.
- Suits and suit variables are attached to the rank on their left. If the symbol immediately to the left is not a rank (A, K, …), rank variable (R, O,…), or wildcard rank (*), then a wildcard rank is implicit. For example, “ss” is equivalent to “*s*s”, “KsTsxx” is equivalent to “KsTs*x*x”, and “sJhhd” is equivalent to “*sJh*h*d”.
- Suit variables will not bind to any suits listed in a range. For instance, “ssxx” means two spades and two cards of some other suit – the ‘x’ will not assume the value of spades. Similarly, rank variables will not bind to any ranks listed in a range. For instance, “AARR” means aces with another pair – it does not include four aces.
- Parentheses (“(” and “)”) have the highest precedence, and can be used for grouping. For instance, “(AK, JT):xx” is equivalent to “AxKx, JxTx”.
- Constraints (“!” and “:”) have the next highest precedence after parentheses, and are left-associative. For instance, “AK,*:xx!RR” is equivalent to “AK, (*:xx)!RR”
- Commas (“,”) have the lowest precedence.
Key Differences vs. Classic Syntax
Here are a few quick notes for those of you who have made extensive use of the classic ProPokerTools range of hands syntax:
Omaha Players
- If less than four cards are specified, wildcards (‘*’) are added for you. Where you used to write “AA**”, you can now write “AA”. Where a random hand was “****”, “*” will now suffice.
- “&” (the “and” combinator) has been replaced with “:”. This is partly to avoid confusion with the old syntax, and partly because the colon just feels better.
- Operator precedence has been fixed to match users’ expectations. In the old syntax, errors seemed almost more common than correct usage when combining “&”, “,” and “!”. Constraints (“!” (“NOT”) and “:” (“AND”)) now have high precedence and are left associative. This means that “AK:15%, JT:30%, KQ!Ks” means what it looks like – namely, “ace-king in the top 15% or jack-ten in the top 30% or king-queen without the king of spades”. The most common case where you need parentheses in the generic syntax is when you apply a constraint to a number of subranges, such as “(AA, AK):xxyy” for “aces or ace-king double suited”.
Extensive Examples
Omaha Examples
- AsKhJd2c – Ace of spades, king of hearts, jack of diamonds, and two of clubs
- AA – A hand with at least two aces
- AA,KK – A hand with at least two aces or two kings
- AxAyxy – Double-suited aces
- AA$ds – Another way to write double-suited aces
- AxAyxz – Single-suited aces
- AA$ss – Another way to write single-suited aces
- KJ*ss – Any king, any jack, and two other cards that are spades
- * – A random hand
- 15% – A hand in the top 15% of hands
- 30%-50% – A hand between the top 30 and top 50 percent of hands.
- K – A hand with a king in it
- ss – A hand with two spades in it
- JRON – A hand with a jack and three other ranks
- RROO – A hand with two pairs in it
- hhxx – A hand with two hearts and two of some other suit
- TT-77 – A hand with at least two tens, nines, eights, or sevens in it
- Q+ – A hand with at least one queen, king, or ace
- 9876- – A medium to small rundown
- A-Q – A hand with an ace, a king, or a queen
- [A-J][2-5]33 – A hand with an A, K, Q, or J and a 2, 3, 4, or 5 and two threes
- K[2s,Jc,T] – A hand with a king and a 2 of spades, jack of clubs, or ten
- J[T-][T-][T-] – A jack-high hand
- *$np – A hand with no paired cards
- *$nt – A hand with no trips
- AA!AAA – A hand with exactly two aces
- AA$nt – Another way to write a hand with exactly two aces
- AARR – A hand with two aces and another pair (but not four aces)
- {$L$L$L$L} – Four non-paired cards that can make a lo
- A!K – A hand with an ace but no king
- 25%:wxyz – A hand in the top 25% of hands that is monotone
- A:15%!AA – A hand with an ace in the top 15% of hands but not a pair of aces.
- 40%!RR – A hand in the top 40% of hands with no paired cards
- ([T+][T+][T+], ss):15% – At least three big cards or a hand with two spades in the top 15% of hands
- (Ax[2x-5x], 2x3x-2x5x, 3x4x-3x5x, 4x5x):30%-50% – A hand with at least two suited wheel cards in the top 30 to 50 percent of hands
Board Examples
- AsKdJh – A flop with the ace of spades, the king of diamonds, and the jack of hearts
- A**!AA* – A flop with exactly one ace
- ***![T+]** – A flop with no card ten or higher
- RON – A flop with no pairs
- RRO – A flop with one pair
- 234+ – A straight-friendly flop
- RONR – A board with no pairs on the flop that paired on the turn
- xyz – A rainbow flop
- xxx – A monotone flop
Further references:
Video on PokerJuice Syntax
Video on Odds Oracle Syntax