Consider a slot game machine with
Suppose we have stored the symbols that occurred in Reels
Additionally, we have computed the total amount of times any symbol occurred in reel
We used the Excel function COUNTIF to count the occurrence of a given value in a certain column and then considered the sum of all occurrences.
A payline has a hit if there is a sequence of
The total number of times the paylines hit a prize corresponds to total hits, and each sequence size has a different prize given by a prize table.
We represent the total hits associated with a sequence of size
Note that by the total hits associated with a sequence of size
$k$ and symbol$n$ , we mean the different ways of seeing exactly$k$ symbols displayed in a row.
Since each reel can spin independently of each other, the following reasoning can be easily generalized to any symbol in the set
For simplicity, let's consider the symbol
For example, to compute the total amount of times the payline hits a prize corresponding to a sequence of size five for the symbol
Similarly, for a sequence of size four, there are two possibilities:
Note that the amount of times
$0$ doesn't land in the$p_{th}$ reel is equal to the amount of times any other symbol may land there, that is$(\Sigma_{th} - 0_{th})$ .
For a sequence of size three, there are three different possibilities:
Similarly, for sequences of size two and one, there are five and three possibilities, respectively. The computations follow a similar pattern.
I found that performing these calculations in Excel was exhausting, so I wrote a Python script using dictionaries and for loops to simplify the process.