ProPokerTools

Generic Syntax Documentation

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

Here are some example 4-card (omaha) ranges using only the above:

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:

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:

Text files containing the hand orderings can be downloaded below:

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.

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:

It is possible to use multiple rank spans in the same hand if they are enclosed in square brackets. For instance: Furthermore, you can use a trailing plus or minus to indicate ascending or descending ranges: Finally, suits and suit variables are allowed, as long as both sides match:

Rank and Suit Lists

Occasionally, you want to have a card match a particular set of ranks, suits, or cards. Here are some examples:

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 Stud Games

In seven-card stud, the order of the cards as they come out is significant except in the case of the first two cards. For instance, "KsJhTd" and "KsTdJh" are NOT considered the same hand. "KsJhTd" and "JhKsTd" ARE considered the same hand, because the order of the first two cards is not considered significant. When combining ranges, card order is respected for cards on third-street and beyond. For instance, "KQJ:xxy" implies a stud hand with a suited king-queen in the hole and an off-suit jack showing (an equivalent way to write it wold be "KxQxJy").

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.

Card Counts

For games where the number of cards in a hand is always known (hold'em always has 2 cards, omaha always 4), ranges are always implicitly 'topped off' with wildcards to bring the number of cards up to the correct number. For instance, in omaha, "AA" is equivalent to "AA**", and "KJ:xxy" is equivalent to "KJ**:xxy*".

For stud games, card counts can vary. For stud and stud-8, card counts are brought up to a minimum of three cards, but no other topping-off is performed. For example, "KJ" is equivalent to "KJ*" (because all hands are brought to a minimum size of three). In addition, sub-ranges can only be combined if they have the same number of cards listed. For instance, "KJ84:xxyz" is legal, whereas "KJ84:xx" is not.

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:

Special Stud Syntax

The pipe '|' character can be used to delineate separate ranges for portions of a stud hand. For instance:

Note that each of the range pieces separated by '|' are completely independent of each other. This means, for instance, that "xx|xx" does NOT mean four suited cards - it means two suited cards in the hole and two suited cards showing.

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 Games Translates to Example
$s suited constraint Hold'em :xx AK$s - ace-king suited
$o off-suit constraint Hold'em :xy JT$o - jack-ten off-suit
$B big card All [A-J] $B$B - two big cards
$M middle card All [T-7] $M$M - two middle cards
$Z small card All [6-2] $Z$Z - two small cards
$L low card All [A,2,3,4,5,6,7,8] $L$L$L$L!RRRR - four cards that can make a low (omaha hi/lo).
$N no-low card All [K-9] $N$N$N$N - four cards that cannot make a low (omaha hi/lo).
$F face card All [K-J] $F$F - two face cards
$R broadway card All [A-T] $R$R - two broadway cards
$W wheel card All [A,2,3,4,5] $W$W - two wheel cards
$ds double-suited constraint Omaha, Omaha Hi/Lo :xxyy AA$ds - double-suited aces
$ss single-suited constraint Omaha, Omaha Hi/Lo :xxyz AKQJ-9876$ss - single-suited medium-to-large rundown (hand has three suits)
$np no pairs constraint Omaha, Omaha Hi/Lo !RR 15%$np - a hand in the top 15% with no paired cards
$op one pair constraint Omaha, Omaha Hi/Lo :RRON 5%$op - a hand in the top 5% with exactly one pair (and no trips)
$tp two pair constraint Omaha, Omaha Hi/Lo :RROO 20%tp - a hand in the top 20% with two pair
$nt no trips constraint Omaha, Omaha Hi/Lo !RRR 50%$nt - a hand in the top 50% with no trips (or quads)
$0g a zero-gap rundown Omaha, Omaha Hi/Lo AKQJ- $0g:10% - a zero-gap rundown in the top 10% of hands
$1g a one-gap rundown Omaha, Omaha Hi/Lo (AKQT-, AKJT-, AQJT-) $1g:20% - a one-gap rundown in the top 20% of hands
$2g a two-gap rundown Omaha, Omaha Hi/Lo (AKQ9-, AKT9-, AJT9-) $2g:ss - a two-gap rundown with two or more spades

Weighted Ranges

Weighted ranges are supported for hold'em, omaha, and omaha hi/lo.

Weighted ranges allow you to specify the relative probabilities of hands appearing in a range. For instance, if we want a range where aces and kings are always played but queens are only played half the time, we could write "AA-KK@100,QQ@50".

Click here for more details on weighted ranges

Generic Syntax Odds and Ends

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:

Hold'em Players
Omaha Players
Stud Players

Extensive Examples

Hold'em Examples

Omaha Examples

Stud Examples

Board Examples