Slot Machine RTP Optimization and Symbols Wins Equalization With Discrete Differential Evolution
Slot Machine RTP Optimization and Symbols Wins Equalization With Discrete Differential Evolution
net/publication/300209679
Slot Machine RTP Optimization and Symbols Wins Equalization with Discrete
Differential Evolution
CITATIONS READS
4 2,113
3 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Todor Balabanov on 23 September 2016.
1 Introduction
Slot machines are electronic gambling devices, which are popular all over the
world. The most popular slot machines consists of five reels. The reels start
spinning when the button is pushed. Nowadays slot machines are computerized
with PRNG embedded in them. In 1984 Inge Telnaes received a patent for a de-
vice titled, ”Electronic Gaming Device Utilizing a Random Number Generator
for Selecting the Reel Stop Positions” (US Patent 4448419) [1]. In the beginning
slot machines have been mechanical. They have had a lever on the side of the ma-
chine (because of this lever, machines were known as one armed bandits), which
have been used for reels spinning activation. The machine pays off according to
symbol patterns, visible on the screen, when the reels stop. Slot machines are
the most popular gambling method in casinos and constitute about 70 percent
of the average US casino income [2].
A gambler playing a slot machine has credit inserted - cash, by printed ticket
or loaded by the attendant. The machine is activated by means of a lever (or a
button), or by pressing a touchscreen. The objective of the game is to win money
from the machine, which usually involves matching symbols on reels (mechanical
or virtual) that spin and stop to reveal one or several symbols. Most games have
a variety of winning combinations of symbols. If a player matches a combination
according to the given patterns, the slot machine rewards the player.
Each machine has a table that lists the number of credits the player will
receive if the symbols listed on the pay table line up on the pay line of the
machine. Some symbols are wild and can represent many (or all) of the other
symbols to complete a winning line [3]. Symbols are statistically distributed on
the reels. Some symbols show up more often than others. Some symbols pay more
than others, according to the pay table. Slot machines are usually adjusted to
pay out as winnings 75 to 98 percent of the money that is wagered by players.
It is known as theoretical payout percentage or RTP (return to player). The
minimum RTP varies among jurisdictions and it is subject of law regulations.
The motivation for this research is our previous work related to GA based
optimization of slot machine RTP. In this work RTP is optimized again, but
prizes equalization is also included, as s second criteria. As third, less important
criteria, symbols diversity on the reels is also controlled. The source code, used
for this research, is available as open-source project in Github global repository
[4]. The rest of this paper is organized as follows: Section 2 presents the model
proposed. Section 3 is devoted to some experiments and results. Final section 4
concludes and present some ideas for further research.
Modern slot machines are computerized. They have virtual reels with symbols
distributed on them. Stops of the virtual reels are selected by PRNGs. RTP of
the game is directly dependant from symbols distribution on the reels. Usually
symbols (and their positions) are selected manually by the mathematicians. In
practice, slot machine reels are discrete distribution of symbols. Such distribution
can be achieved by discrete optimization, according given constraints like desired
RTP, prizes equalization and symbols diversity. From these three criteria, symbol
diversity is easily calculated without simulation, but RTP and prizes equalization
need Monte-Carlo simulations in order to participate in DDE cost function.
Multi-criteria cost function is converted in single criteria by linear transformation
and coefficients given for each of the criteria. Coefficients are selected by the
decision maker, according his/her personal preferences. In this research 1 were
selected for symbols diversity, 100 for RTP and 10 for prizes equalization. These
numbers are selected in correlation with the importance of each criteria. Symbol
diversity is a parameter related to how many symbols of the same kind are
next to each other in a single reel. Symbol diversity is easily achievable with
simple swaps of symbols which are in inappropriate order. Slot machine reels
are represented as individuals in the DDE optimization. Symbol diversity can
be controlled even before the Monte-Carlo simulation to be executed. The cost
function is preferred for this criteria in order to make solution space exploration
easier.
DDE individuals are presented as 2D arrays of symbols (reels). All symbols are
presented as integer numbers. Each DDE individual is a point into solution space
(discrete finite space). To be valid each reel should have only integer numbers
from the listed (Tab.1). In this research symbols used are from 3 to 12. Symbols
from 0 to 2 are usually reserved for special symbols called wilds. Symbols between
14 and 16 are usually reserved for special symbols called scatters. The currently
presented model of a slot machine does not have wild or scatter symbols.
Free spins were not presented in the model, but a simple bonus game was
added. The bonus game imitates a bingo game. There is a bonus prize for bingo
line and another bonus prize for bingo.
Initialization of the population is done by manually constructed reels. Some
of the individuals are shuffled inside for initial population diversity. The size
of the population is a subject of experimental estimation and may vary from
several individuals to hundreds or thousands of individuals.
The first step of DDE optimization is selecting a target vector, base vector
and two other vectors to be used for weighted difference vector. All of the four
vectors are selected randomly (slightly different than original DE algorithm). As
a second step, s discrete difference vector is calculated. The only valid values
for the discrete difference vector are minus one, zero and plus one. In the third
step, a mutation is done. The mutation sums of the difference vector with the
base vector. Invalid symbol numbers (in this case 2 or 13) are randomly replaced
with valid ones (from 3 to 12). The fourth step is crossover between the base
vector and mutated vector. For this operation binomial crossover is used. The
final fifth step is related to fitness value calculation and decision which vector
to be kept for the next generation (the target vector or the newly recombined
one).
This is a multi-criteria problem. By giving weights of the three criteria they
are used as linear equation and the problem is converted to a single-criteria
problem. The decision maker is responsible for the coefficients selection for each
criteria. In this research 1 is used for symbol diversity, 100 for target RTP and
10 for prizes equalization. Monte-Carlo simulation is used for the target RTP
and prizes equalization estimation. Symbols diversity is calculated directly from
the reels. For better accuracy in Monte-Carlo simulations, 10 times by 1000000
separate slot game runs are executed.
The maximum number of recombinations is used as an optimization termi-
nation criteria. Manual observation/termination of the process is also possible.
The final solution, found by DDE, is an integer matrix. This matrix is directly
applicable as slot machine reels strips. For example, if there is a slot game with
5 reels (visible on the screen as 5 columns and 3 rows), and each reel consists of
63 symbols, the final DDE solution would be an integer matrix of 5x63 values
(refer to [4] for more details).
3 Experiments and Results
All experiments have been done on an open-source slot machine simulator [4]
(5x3 screen) with a particular pay table (Tab.1) and nine winning lines (Tab.2).
SYM03 SYM04 SYM05 SYM06 SYM07 SYM08 SYM09 SYM10 SYM11 SYM12
3 of 250 100 75 50 25 15 9 6 3 1
4 of 500 250 100 75 50 25 15 10 7 3
5 of 750 500 250 150 100 75 50 30 20 10
Table 1. Slot machine pay table. Each column represents the winning of one particular
symbol (10 possible symbols in this game). Each row shows the winning of the symbols
when the combination is of 3, 4 or 5 symbols.
All winning combinations are paid from left to right. The lowest winning is
1 - for a combination of 3 symbols SYM12 (Tab.1). The highest winning is 750
- for a combination of 5 symbols SYM03 (Tab.1). There are 10 symbols, which
form winning patterns on the screen.
*****
*****
*****
* * * **
* * * * *
* * * **
** * *
* * *
* * * *
** * *
Table 2. Slot machine winning lines. There are nine possible lines. On each of these
lines (from left to right) win patterns can appear. Win patterns are formed by 3, 4 or
5 symbols.
All experiments are done with natural elitism rule embedded in DE, pop-
ulation size of 17, maximum number of recombinations 100, and one million
separate simulation game runs, accomplished in ten separate sessions for the
fitness value estimation. The DDE strategy is DE/rand/1/bin. Initial solutions
use handpicked reels.
Two target RTP were selected for the experiments. Fist set of experiments
was done for target RTP of 90, which is the lower legal value for the Bulgarian
gambling market. Three independent runs of the algorithm were done and it
is visible that fast convergence was achieved in the beginning (4-7 generations).
Fig. 1. DDE convergence for target RTP of 90 percent. On the axes: x - number of
generations, y - cost function value.
Fig. 2. DDE convergence for target RTP of 98 percent. On the axes: x - number of
generations, y - cost function value.
Between 40-80 generations finer convergence was obtained (Fig. 1). In the second
set of experiments, fast convergence can be seend between 4-25 generations and
finer convergence between 64-91 generations (Fig. 2). It is visible that DDE con-
vergence is faster in first set of experiments (Fig. 1), because initial handpicked
reels are closer to RTP of 90 than 98 (Fig. 2). Because of the discrete nature of
the process, the optimization is done in separate stairs like steps.
The results were compared with results presented in NMA14 Borovets [11],
which is related to slot machine RTP optimization by GA. DDE convergence is a
little bit faster than convergence achieved by GA. There are common differences
in slot machine models, but the general optimization idea is similar. In the case
of this research the cost function is more complex than the cost function used
in GA implementation.
4 Conclusions
Experiments show that using DDE may be very efficient and improve the slot
games development by better adjustment of RTP, prizes equalization and symbol
diversity. Optimization convergence is related to the probabilistic nature of DDE.
Even thought, DDE converge faster than other heuristics (like GA), slot RTP
estimation is time consuming and slows down the optimization process. Because
of the limited scope of this research, multi-objective approach was not tested.
As further research, it could be interesting for DDE to be implemented as
distributed computing algorithm. Such distributed implementation is efficiently
applicable for the class of evolutionary algorithms in which DDE is. Also, as
described in [10], PicoBlaze FPGAs can be researched for faster Mote-Carlo
simulations.
Acknowledgements
This work was supported by a grant of the Bulgarian National Scientific Fund
under the grants Efficient Parallel Algorithms for Large Scale Computational
Problems and InterCriteria Analysis A New Approach to Decision Making.
References
[1] Inge S.: Electronic gaming device utilizing a random number generator for selecting
the reel stop positions. US 4448419 A, Published 1984-05-15 (1984)
[2] Cooper M.: How slot machines give gamblers the business. The Atlantic Monthly
Group. Retrieved 2008-04-21 (2005)
[3] Casino Observer: How to Play Slots. CasinoObserver.com. Retrieved 2013-03-06,
http://casinoobserver.com/how-to-play-slots.htm (2013)
[4] Balabanov T.: Bingo slot discrete differential evo-
lution optimization of RTP and prizes distribution.
http://github.com/TodorBalabanov/BingoSlotDifferentialEvolutionOptimization/
(2015)
[5] Storn R.: Differential Evolution - A Simple and Efficient Heuristic Strategy for
Global Optimization over Continuous Spaces. Journal of Global Optimization, vol.11,
Dordrecht, 341–359 (1997)
[6] Price K.: An introduction to differential evolution. In David Corne, Marco Dorigo,
and Fred Glover, editors, New Ideas in Optimization, Mc Graw-Hill, UK, 79-108
(1999)
[7] Goldberg D.: Genetic Algorithms in Search, Optimization and Machine Learning.
Addison-Wesly Publishing Co., Reading, Massachusetts (1989)
[8] Hans-Paul Schwefel, editor: Evolution and Optimization Seeking. John Wiley and
Sons, New York (1995)
[9] Mezura-Montes E., Velazquez-Reyes J., Coello C.: Modified Differential Evolution
for Constrained Optimization. IEEE Congress on Evolutionary Computation, Van-
couver, 25–32 (2006)
[10] Ivanov V.: On the approach for automatic generation of small embedded PicoBlaze
system. Proceedings of the 13th International Conference on ACSD, Barcelona, 257–
260 (2013)
[11] Balabanov T., Zankinski I., Shumanov B.: Slot Machines RTP Optimization with
Genetic Algorithms. Lecture Notes in Computer Science Volume 8962, 55–61 (2015)