Disclaimer: This code is not to be re-used or re-distributed and certainly not utilised in any commercial project. The author reserves all rights.
Testing RTP
test_rtp.py
has a threaded function (test()
(default 100,000,000 spins)) which can be called to confirm the payout coefficients derived from the linear optimisation outlined below actually determine the RTP set against the optimisation (note: this LP is a bit basic and the RTP error margin over 100,000,000 spins is at around +1.5% currently due to not considering multiple lines against one spin).
Basic Info
-
3 reel machine.
-
5 pay lines (3 horizontal, 2 diagonal).
-
5 symbols (this is arbitrary, the symbol and reel sets can be mutated on the fly and new payout coefficients derived from LP implementation).
-
RTP @ 0.9 which can also be adjusted and new coefficients derived.
-
Win = 3 of the same symbol across any line.
Current implementation
Derive
The values in the bottom 2 constraints are chosen arbitrarily, they exist purely to ensure that we don't end up with 4 symbols which have payout multipliers
This implementation allows us to change the number of symbols and state of each reel haphazardly without having to manually adjust the win multipliers.