Coin streak
A fair coin is flipped again and again; each flip won doubles the prize; the player may take it after any win.
- Kind
- steps with a cash-out
- Largest win
- 1,038,090.24x the stake
- Name in the files
- coinstreak
- Version
- 26a29f09aaa1
Download this engine as one file
What the player sets
- steps: how many flips the streak can reach, 2 to 20
Every round also takes the return dial in basis points, 9600 to 9900, and a stake.
The round, in order
- the table is set at the start: after k flips won the prize is rtp x 2^k (x10k)
- each advance: r = int_below(1000000); the flip is won when r < 500000
- a lost flip ends the round with nothing; the last step won ends it with the top prize
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
- advance: flip again
- cashout: take the prize for the flips won so far (at least one)
What it pays
rtp x 2^k after k flips. The chance of k flips is 1 / 2^k, so the return is exactly the dial wherever the player stops.
Tables
The tables the round uses at three points of the dial, each with its exact return. A multiple is kept in the files as a whole number times 10,000, rounded down (Storm’s multX1e4); here it is written out.
Dial at 96%
20 flipslargest win 1,006,632.96x
| Flips won | Pays | Exact return, stopping here |
|---|---|---|
| 1 | 1.92x | 96% (24/25) |
| 2 | 3.84x | 96% (24/25) |
| 3 | 7.68x | 96% (24/25) |
| 4 | 15.36x | 96% (24/25) |
| 5 | 30.72x | 96% (24/25) |
| 6 | 61.44x | 96% (24/25) |
| 7 | 122.88x | 96% (24/25) |
| 8 | 245.76x | 96% (24/25) |
| 9 | 491.52x | 96% (24/25) |
| 10 | 983.04x | 96% (24/25) |
| 11 | 1,966.08x | 96% (24/25) |
| 12 | 3,932.16x | 96% (24/25) |
| 13 | 7,864.32x | 96% (24/25) |
| 14 | 15,728.64x | 96% (24/25) |
| 15 | 31,457.28x | 96% (24/25) |
| 16 | 62,914.56x | 96% (24/25) |
| 17 | 125,829.12x | 96% (24/25) |
| 18 | 251,658.24x | 96% (24/25) |
| 19 | 503,316.48x | 96% (24/25) |
| 20 | 1,006,632.96x | 96% (24/25) |
Dial at 97.5%
20 flipslargest win 1,022,361.6x
| Flips won | Pays | Exact return, stopping here |
|---|---|---|
| 1 | 1.95x | 97.5% (39/40) |
| 2 | 3.9x | 97.5% (39/40) |
| 3 | 7.8x | 97.5% (39/40) |
| 4 | 15.6x | 97.5% (39/40) |
| 5 | 31.2x | 97.5% (39/40) |
| 6 | 62.4x | 97.5% (39/40) |
| 7 | 124.8x | 97.5% (39/40) |
| 8 | 249.6x | 97.5% (39/40) |
| 9 | 499.2x | 97.5% (39/40) |
| 10 | 998.4x | 97.5% (39/40) |
| 11 | 1,996.8x | 97.5% (39/40) |
| 12 | 3,993.6x | 97.5% (39/40) |
| 13 | 7,987.2x | 97.5% (39/40) |
| 14 | 15,974.4x | 97.5% (39/40) |
| 15 | 31,948.8x | 97.5% (39/40) |
| 16 | 63,897.6x | 97.5% (39/40) |
| 17 | 127,795.2x | 97.5% (39/40) |
| 18 | 255,590.4x | 97.5% (39/40) |
| 19 | 511,180.8x | 97.5% (39/40) |
| 20 | 1,022,361.6x | 97.5% (39/40) |
Dial at 99%
20 flipslargest win 1,038,090.24x
| Flips won | Pays | Exact return, stopping here |
|---|---|---|
| 1 | 1.98x | 99% (99/100) |
| 2 | 3.96x | 99% (99/100) |
| 3 | 7.92x | 99% (99/100) |
| 4 | 15.84x | 99% (99/100) |
| 5 | 31.68x | 99% (99/100) |
| 6 | 63.36x | 99% (99/100) |
| 7 | 126.72x | 99% (99/100) |
| 8 | 253.44x | 99% (99/100) |
| 9 | 506.88x | 99% (99/100) |
| 10 | 1,013.76x | 99% (99/100) |
| 11 | 2,027.52x | 99% (99/100) |
| 12 | 4,055.04x | 99% (99/100) |
| 13 | 8,110.08x | 99% (99/100) |
| 14 | 16,220.16x | 99% (99/100) |
| 15 | 32,440.32x | 99% (99/100) |
| 16 | 64,880.64x | 99% (99/100) |
| 17 | 129,761.28x | 99% (99/100) |
| 18 | 259,522.56x | 99% (99/100) |
| 19 | 519,045.12x | 99% (99/100) |
| 20 | 1,038,090.24x | 99% (99/100) |
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 draw per flip and a choice to stop.
On the templates it would take: a step template (a draw per step, a choice to stop). Storm lists it as not enabled.
Check a build against ours
24 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 24 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.