Hold'em market
Three hold'em hands are dealt face up; the board comes by street; the player buys an outcome at its exact probability and may sell at any street.
- Kind
- a traded market on a hold'em hand
- Largest win
- Set by the play, not by a table
- Name in the files
- holdem_market
- Version
- 72052857e4d0
Download this engine as one file
What the player sets
Nothing before the round: the choices are made during it.
Every round also takes the return dial in basis points, 9600 to 9900, and a stake.
The round, in order
- the cards left are 0..51. At the start the three hands are dealt and shown: six take(left), the first hand's two cards, then the second's, then the third's. The board is not drawn until it is dealt: each "next" draws its street with take(left), the flop three cards, the turn one, the river one
- four outcomes: hand 1, hand 2, hand 3 wins alone, or a tie for best
- a hand is the best five cards out of its two and the five of the board, by the usual order: straight flush, four of a kind, full house, flush, straight, three of a kind, two pair, a pair, high card; within one kind the higher ranks win, compared in the usual order (the four, the three or the pairs first, then the other cards from the top); an ace also makes the five-high straight; suits never break a tie
- the price of an outcome is its exact probability: of every set of cards that can still complete the board, taken from the 52 less the hands and the board so far, the share on which that outcome happens. Kept as two whole numbers, n boards of d
- a position can be bought while its price is between 2% and 98% (2 x d <= 100 x n <= 98 x d)
int_below(m) is a whole number from 0 to m-1: limit = 2^64 - (2^64 mod m); take values until v < limit; return v mod m. shuffle: Fisher-Yates from the end, j = int_below(i+1). Words: HMAC-SHA256(key = seed, "STORM-DRBG|" || u64be(j)), cut into big-endian u64s.
What the player may do
- next: deal the next street
- buy_p1, buy_p2, buy_p3, buy_push: buy that outcome (push is the tie for best)
- sell
What it pays
A position bought at probability p pays rtp / p if it wins; sold at a street it pays rtp x (probability now / p). Both are worked in whole counts of boards, not rounded prices: bought when the outcome wins n of d boards, it pays rtp x d div n; sold when it wins c of t boards, rtp x c x d div (t x n). With no position at the river the stake comes back.
Tables
No table: a traded market, not a table. What is paid follows from the steps above.
On Storm
In Storm’s core this engine is built from this page as written, with the settings and the largest win above, and is right when it reproduces the test rounds below. The rest of this part is about the templates Storm has live today, which is the way onto Storm until then.
Our reading against Storm’s templates: does not fit. A traded market, not a table.
On the templates it would take: a card template. Storm lists it as not enabled.
Check a build against ours
51 whole rounds, each from a seed given in the file. A build is right when, from the same seed, settings, dial and actions, it makes the same draws in the same order and pays the same amount. The seed of a test round is sha256("rain-engine-vector|<engine>|<case>|<rtp_bps>|<i>"), given in hex in each vector.
The rest are in this engine’s file, with the full result of each round. The reference build plays this engine and reproduces every one of them.
Nothing hidden is fixed when a round starts: what a step shows is drawn at that step. So the same file holds 51 more rounds played with a seed of its own for the start and for every action after it, as a round runs where each step’s randomness is formed only after the player has acted. The rules are the same; only the generator is started afresh at each step.