Every engine
03Engine

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

  1. the table is set at the start: after k flips won the prize is rtp x 2^k (x10k)
  2. each advance: r = int_below(1000000); the flip is won when r < 500000
  3. 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 wonPaysExact return, stopping here
11.92x96% (24/25)
23.84x96% (24/25)
37.68x96% (24/25)
415.36x96% (24/25)
530.72x96% (24/25)
661.44x96% (24/25)
7122.88x96% (24/25)
8245.76x96% (24/25)
9491.52x96% (24/25)
10983.04x96% (24/25)
111,966.08x96% (24/25)
123,932.16x96% (24/25)
137,864.32x96% (24/25)
1415,728.64x96% (24/25)
1531,457.28x96% (24/25)
1662,914.56x96% (24/25)
17125,829.12x96% (24/25)
18251,658.24x96% (24/25)
19503,316.48x96% (24/25)
201,006,632.96x96% (24/25)

Dial at 97.5%

20 flipslargest win 1,022,361.6x
Flips wonPaysExact return, stopping here
11.95x97.5% (39/40)
23.9x97.5% (39/40)
37.8x97.5% (39/40)
415.6x97.5% (39/40)
531.2x97.5% (39/40)
662.4x97.5% (39/40)
7124.8x97.5% (39/40)
8249.6x97.5% (39/40)
9499.2x97.5% (39/40)
10998.4x97.5% (39/40)
111,996.8x97.5% (39/40)
123,993.6x97.5% (39/40)
137,987.2x97.5% (39/40)
1415,974.4x97.5% (39/40)
1531,948.8x97.5% (39/40)
1663,897.6x97.5% (39/40)
17127,795.2x97.5% (39/40)
18255,590.4x97.5% (39/40)
19511,180.8x97.5% (39/40)
201,022,361.6x97.5% (39/40)

Dial at 99%

20 flipslargest win 1,038,090.24x
Flips wonPaysExact return, stopping here
11.98x99% (99/100)
23.96x99% (99/100)
37.92x99% (99/100)
415.84x99% (99/100)
531.68x99% (99/100)
663.36x99% (99/100)
7126.72x99% (99/100)
8253.44x99% (99/100)
9506.88x99% (99/100)
101,013.76x99% (99/100)
112,027.52x99% (99/100)
124,055.04x99% (99/100)
138,110.08x99% (99/100)
1416,220.16x99% (99/100)
1532,440.32x99% (99/100)
1664,880.64x99% (99/100)
17129,761.28x99% (99/100)
18259,522.56x99% (99/100)
19519,045.12x99% (99/100)
201,038,090.24x99% (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.

stop at 3, dial 9900
seed e210ed0f953c115e04ca2d6820c92b314b94318be3b7762ebf59ed97e698c101
settings {"steps":10}
actions [["advance"],["advance"],["advance"],["cashout"]]
draws int_below(1000000) = 94303, int_below(1000000) = 96991, int_below(1000000) = 458229
pays 7.92x (payX10k 79200)
stop at 8, dial 9900
seed 6438fdb6ab7335aad2798dee8db2283d4c83f650a5fb50250e1d3f558ede7f4c
settings {"steps":10}
actions [["advance"]]
draws int_below(1000000) = 722286
pays 0x (payX10k 0)

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.