The test game. The examples use one small game. It is not a real product. Three scatters start 10 free spins, and a multiplier grows during the free spins.
In a round, the player sees events one after the other: a reel stops, a symbol lands, a free spin pays. Each visible event is a step. After each step, the round has a fair value. That value is the average payout of all results that are still possible. This series calls it belief. The change of belief at a step is the news of that step.
μₜ = E[ X | the events up to step t ] dₜ = μₜ − μₜ₋₁
E[ dₜ | the past ] = 0 Var(X) = Σₜ E[ dₜ² ]X is the payout of the round. μ₀ is the start value: the belief before the round starts. dₜ is the news of step t.Belief is the mean payout of all the rounds that look the same up to this step. The news of a step is the belief after the step minus the belief before it. In rounds that look the same, the news of the next step has a mean of 0. For each round, square the news of each step and add the squares. The mean of this sum is the variance of the payout: the mean squared distance between the payout and the start value.
Example. In Figure 1, the thick line of the gate model starts at 1.00. All values are in start values. At step 1, belief goes up to 3.69: the news is +2.69. At step 2, belief goes down to 2.16: the news is −1.53.
news = [after - before for before, after in zip(round.belief, round.belief[1:])]
# law 1, for each step t: the mean news of all rounds is near 0
mean_news = sum(r.news[t] for r in rounds if t < len(r.news)) / len(rounds)
# law 2: the mean of the sum of the squared news is the variance of the payout
variance = sum(sum(d * d for d in r.news) for r in rounds) / len(rounds)Use it. Record the belief after each step of each simulated round. To change the feel of a round, move news from one step to a different step. To change the total, change the pay table or the weights.
The news of each step has a mean of 0. The squares of the news add up to the variance of the payout. Part 4 of this series gives the proofs. The pay table sets the variance, and no mechanic can change the total. A mechanic only sets the time and the form of the release.
Why shapes
Game makers give many names to mechanics. A grid that lets symbols fall and a reel that drops blocks have different art. But the two move belief in the same way. For the mathematics, they are one mechanic.
A shape is a pattern in the path of belief during a round. It is a schedule for the release of the variance. Each shape in this post has a small model with exact belief, and each model played 8,000 rounds.
13 signatures
A signature is one number that you calculate from the news of many rounds. Each signature answers one question about a mechanic. You can measure the signatures on the books of a real game when you know belief at each step.
| Signature | Formula | What it tells you | Defines |
|---|---|---|---|
| Amplitude | SD(X) / μ₀ | The usual distance between the payout and the start value. | all shapes |
| News steps | (Σ dₜ²)² / Σ dₜ⁴ | The number of steps that carry most of the news. The value 1 tells you that one step decides the round. | Baseline, Mutation |
| Evenness | news steps ÷ steps before the last news | Near 1, all steps have the same importance. Near 0, a small number of steps decide the round. | Mutation |
| News timing | Σ t·dₜ² / (n·Σ dₜ²) | The mean time of the news. The value 0 is the start of the round and the value 1 is the end. | Baseline |
| Silent steps | steps with no news ÷ steps between the first news and the last news | The part of the middle of the round where belief does not move. The player waits and learns nothing. | Reveal |
| Runs | corr( 1[dₜ > 0], 1[dₜ₊₁ > 0] ) | A positive value tells you that a good step follows a good step. | Chain reaction |
| Self-feeding | corr( number of good steps before t, size of good step t ) | A positive value tells you that each good step makes the next good step larger. | Gate, Ratchet |
| Extension | corr( number of good steps, number of steps ) | A positive value tells you that good news makes the round longer. | Fuse, Chain reaction |
| Cliff share | Σ dₜ² of decreases larger than 2μ₀ ÷ Σ dₜ² of all decreases | The part of all bad news that comes as one large and sudden decrease. | Gate |
| Forfeit | value shown and not paid ÷ value shown | The part of the value on the screen that the player sees and then loses. | Bank |
| Lens gain | SD(X) ÷ SD(X without the mechanic) | The increase of the spread when the same books play with the mechanic. The value 1 tells you that the mechanic adds no spread. | Lens |
| Band shift | (change of width − change of centre) ÷ SD(X), at step 1 | A positive value tells you that step 1 changes the width of the possible results more than their centre. | Window |
| Price | price of a round ÷ stake | The price of one round in a bet mode. A higher price moves the start value up. | Valve |
In the formulas, corr is the correlation, SD is the standard deviation and n is the number of steps. A good step has dₜ > 0.
Each row is one number that you calculate from the news of many rounds. You can give the column "Formula" to an AI agent as it is. The column "Defines" names the shapes that this signature identifies.
SD(X)- The standard deviation of the payout: the usual distance between the payout and its mean.
corr( a, b )- The correlation, a number from −1 to 1. Near 1, a is high where b is high. Near 0, a tells you nothing about b. Below 0, a is high where b is low.
1[ dₜ > 0 ]- 1 if step t is a good step. If not, 0.
dₜ² and dₜ⁴- The square is dₜ × dₜ, and it has no sign. The fourth power is the square × the square.
n- The number of steps in the round.
a / b- a divided by b, the same as a ÷ b.
Example. Take the row "News steps" and a round with the news +3, 0 and 0. The squares add up to 9, and the fourth powers add up to 81. The result is 9 × 9 ÷ 81 = 1: one step decides the round. A round with the news +1, −1, +1 and −1 gives 4 × 4 ÷ 4 = 4: all 4 steps have the same size.
# the row "News steps" for one round
squares = sum(d ** 2 for d in round.news)
fourths = sum(d ** 4 for d in round.news)
news_steps = squares ** 2 / fourthsUse it. Calculate the 13 signatures for one mechanic of your game. Compare the values with the rows of the second table. The black cells show the values that define each shape.
The 11 shapes
Each entry gives the definition of the shape, its model, and the values of the signatures that define it.
One step shows the full result of the round. The round releases all of its variance at that step.
The model is one spin with a pay table.
The game decides the result early and shows it late. After the first step, belief does not move until the last step.
In the model, mystery symbols land, 4 steps give no news, and then the game shows the symbol behind them.
The payout depends on a count that must reach a threshold. Each step toward the threshold makes the next step larger. The last step is a large jump or a cliff.
In the model, scatters land reel by reel, and 3 scatters start a feature in 1 of 70 rounds.
A counter shows the number of chances that remain. A blank step decreases belief a small amount. A hit increases belief a large amount and resets the counter, so a good round is a long round.
The model has 15 cells and 3 lives. Each new coin stays in its cell and sets the lives to 3 again.
A state moves in one direction only during the round, for example a multiplier. Each good step makes all later good steps larger.
The model has 10 free spins and a multiplier that increases by 1 after each winning spin.
A good step increases the probability of a good step immediately after it. Good steps come in runs, and a decrease ends each run.
The model has 10 spins. A win starts a cascade: the win symbols go away and new symbols fall. Each cascade pays more than the cascade before it.
The mechanic multiplies each win by a random number. The number does not depend on the time of the win. The news comes at the same steps, but each step is larger.
The model has 10 free spins, and each win gets a random multiplier with a mean of 1.
The game shows value on the screen before it pays that value. The player can lose a part of the value that the screen shows.
In the model, coins land during 10 spins. A collector symbol pays all coins on the screen. The player loses the coins that stay at the end.
The screen changes many times after the reels stop. Each change moves belief a small amount, and no single step decides the round.
The model makes 14 small changes. Each change goes up or down with the same probability.
The first step sets the size of the screen. That step does not move belief, but it changes the width of the possible results.
The model selects a small screen or a large screen with the same mean payout. Then 5 reels stop.
A bet mode sets a different price for a round and different odds. The RTP stays the same, so the start value increases with the price.
The model is the gate model with an ante of 2 stakes. The feature starts in 1 of 28 rounds, not in 1 of 70.
| Shape | Amplitude | News steps | Evenness | News timing | Silent steps | Runs | Self-feeding | Extension | Cliff share | Forfeit | Lens gain | Band shift | Price |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Baseline | 3.49 | 1.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 1.00 |
| Reveal | 5.23 | 1.32 | 0.22 | 0.78 | 1.00 | -0.09 | 0.37 | 0.00 | 0.75 | 0.00 | 1.00 | 0.51 | 1.00 |
| Gate | 5.62 | 1.48 | 0.32 | 0.89 | 0.00 | -0.01 | 0.66 | 0.00 | 0.79 | 0.00 | 1.00 | 0.57 | 1.00 |
| Fuse | 0.62 | 1.54 | 0.19 | 0.32 | 0.00 | -0.13 | -0.25 | 0.89 | 0.00 | 0.00 | 1.00 | 0.00 | 1.00 |
| Ratchet | 0.75 | 5.77 | 0.58 | 0.58 | 0.00 | -0.01 | 0.38 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 1.00 |
| Chain reaction | 1.02 | 9.46 | 0.48 | 0.57 | 0.00 | 0.25 | 0.40 | 1.00 | 0.00 | 0.00 | 1.00 | 0.00 | 1.00 |
| Lens | 1.38 | 1.30 | 0.13 | 0.57 | 0.00 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | 1.80 | 0.00 | 1.00 |
| Bank | 0.98 | 1.96 | 0.20 | 0.75 | 0.00 | 0.03 | 0.23 | 0.00 | 0.00 | 0.52 | 1.00 | 0.00 | 1.00 |
| Mutation | 0.26 | 13 | 0.93 | 0.54 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 1.00 |
| Window | 2.58 | 1.83 | 0.30 | 0.81 | 0.00 | 0.02 | 0.12 | 0.00 | 0.74 | 0.00 | 1.00 | 0.70 | 1.00 |
| Valve | 8.75 | 1.75 | 0.38 | 0.85 | 0.00 | 0.00 | 0.74 | 0.00 | 0.89 | 0.00 | 1.00 | 0.45 | 2.00 |
All signature values for all shapes. The black cells define each shape. The signature Self-feeding has the weakest separation: the ratchet has 0.38, but the gate has 0.66.
Proof: a lens adds variance and keeps the mean
Let Y be the payout of a round with no lens. Let M be a random multiplier with a mean of 1. The lens pays X = M·Y.
E[M] = 1, then Var(X) ≥ Var(Y). The two are equal only if M is constant.Take a random multiplier with a mean of 1 that does not depend on the payout. It keeps the mean payout, but it makes the variance larger: the results spread wider. Only a multiplier that is always 1 keeps the variance.
Example: a round pays 0 or 2 stakes, each with a chance of 1 in 2. The mean is 1, and each payout is 1 away from the mean: the variance is 1 × 1 = 1. A multiplier of 0 or 2, each with a chance of 1 in 2, gives 4 stakes in 1 round of 4. All other rounds pay 0, so the mean is 1 again. The variance is 0.25 × 3 × 3 + 0.75 × 1 × 1 = 3.
E[X] = E[M]·E[Y] = E[Y], because M does not depend on Y.E[X²] = E[M²]·E[Y²], for the same reason.- The means are equal. As a result,
Var(X) − Var(Y) = E[X²] − E[Y²] = (E[M²] − 1)·E[Y²]. E[M²] − 1 = Var(M), becauseE[M] = 1.Var(M)·E[Y²] ≥ 0. The product is 0 only ifVar(M) = 0, and then M is constant.
A lens does not change the RTP. It changes only the volatility.
The model gives each win its own multiplier. The claim is for one multiplier for the full round, so the formula is a guide. The measured value is the fact: the lens gain is 1.80. The multiplier makes the standard deviation of the payout 1.80 times larger, and the mean stays the same.
Proof: a gate feeds itself and ends with a cliff
Take a gate with 5 reels. Each reel shows a scatter with the probability s. Three scatters start a feature with the value B. All other rounds pay b on average, and b is small.
If scatters are rare, each scatter makes the step of the next reel larger, up or down. With 2 scatters before the last reel, that reel decides all. A scatter starts the feature, and a blank reel removes all the value that the scatters promised.
Example: each reel shows a scatter with a chance of 1 in 10. The feature has a value of 100 stakes, and all other rounds pay 0. With 1 scatter before the last 2 reels, belief is 1 stake, and the next reel moves it up by 9 or down by 1. With 2 scatters before the last reel, belief is 10 stakes, and that reel moves it up by 90 or down by 10.
- Let
P(r, k)be the probability that the count reaches 3, after r reels with k scatters. Thenμ(r, k) = b + (B − b)·P(r, k). - The next reel shows a scatter with the probability s. As a result,
P(r, k) = s·P(r+1, k+1) + (1 − s)·P(r+1, k). - One more scatter changes the result only if the m reels after the next reel show exactly
2 − kscatters. Let Q be that probability:Q = C(m, 2−k)·s^(2−k)·(1−s)^(m−2+k). - From steps 1 to 3, a scatter moves belief up by
(1 − s)·(B − b)·Q. A blank reel moves belief down bys·(B − b)·Q. - For the same m,
Q(k+1) / Q(k) = (2 − k)/(m − 1 + k) · (1 − s)/s. For a small s, this ratio is larger than 1, and the steps grow. - Before the last reel,
m = 0. Withk = 2,Q = 1, and a blank reel removess·(B − b). That is all of the value above b.
In the model, s = 0.12 and the feature has a value of 46 start values. With 2 reels after the next reel, Q for 2 scatters is 3.7 times Q for 1 scatter. With 2 scatters before the last reel, a blank reel decreases belief by 5.5 start values. The limit for a cliff is 2 start values. The measured self-feeding is 0.66 and the measured cliff share is 0.79.
A real game is a sum of shapes
The base spin of the test game is a baseline with a gate. The wins on the reels are the baseline: the reels stop and the player knows the win. The scatters are the gate: 3 scatters start the feature in 1 of 151 spins.
The feature of the test game is a fuse with a ratchet. A retrigger adds 5 free spins, so good news makes the round longer. The multiplier increases by 2.29 after each winning spin, so each win makes the later wins larger.
Each design change moves a known signature:
- A larger multiplier step increases self-feeding and amplitude.
- A higher probability of a retrigger increases extension.
- A slow, separate stop of the last reel makes that stop a step of its own. It increases the cliff share and moves the news timing toward the end.
The space of mechanics
The same method applies to a full catalogue of 252 mechanics. The study removed 4 groups:
- 35 operators. Operators are the basic parts of mechanics, for example a spin or a cascade.
- 21 mechanics that wait for a decision of the player. A book cannot describe a decision.
- 32 mechanics that keep a state between rounds. A table of books has no memory.
- 4 items that do not change a round, for example the format of the stake.
160 mechanics stayed, in 74 families. A family holds the mechanics that move belief in the same way. Each family has one shape and a position on 9 axes. You can calculate each axis from books.
| Axis | Measured by | Level |
|---|---|---|
| Pace | Travel of belief for each minute | Level 2 (belief) |
| Tease | Rate of teases, and the number of reels that stop after a tease starts | Level 1 (events) |
| Tingle | Delight divided by letdown, in rounds with a tease | Level 2 (belief) |
| Compounding | Length elasticity: the change of the feature value for a change of the feature length | Model |
| Back-loading | Payout centroid: the mean time of the money in a feature | Level 1 (events) |
| Tail | Part of the RTP that comes from wins of 100× or more | Level 0 (payout) |
| Blank exposure | Rate of blank rounds, blank teases and blank free spins | Level 0 (payout) and Level 1 (events) |
| Drain | Loss for each minute, and the bankroll half-life | Level 0 (payout) and Level 3 (sessions) |
| Rhythm | Number of events in a round, and the length of chains | Level 1 (events) |
Travel is the sum of the sizes of all news in a round. Letdown is the fall from the highest belief to the payout. Delight is the rise of the payout above the highest belief before the end.
Use the map to go from a target feel to a design:
- Write the target feel as values on the 9 axes.
- Find the region of the map that is nearest to the target, and select families from it.
- Read the shape of each family. The shape tells you which signature the family moves.
- Set the dial of each family. The dial is the parameter that sets the strength of the mechanic.
- Simulate the game and measure the signatures.
The positions on the map are estimates. A person gave each family a score from −2 to +2 on each axis. Measured signatures must replace these scores. The map also adds the effects of families, but real effects do not always add.
Do it with an AI agent
You do not write the calculations. You give the instructions, and you read the checks. A real game is a sum of shapes. For this reason, give the 3 instructions for one part of your game, for example the free spins. Then do the same for the next part.
Read my books and my weights. Use only this part of my game: [name the part, for example "the free spins"]. For each round, record the belief after each step of this part. Belief is the weighted mean payout of all books that show the same facts up to that step.
Divide each belief by the belief before the first step, so that each round starts at 1. The news of a step is the belief after the step minus the belief before it.You get. A list of belief values for each round, in start values. The first value of each list is 1. The first formula of this post gives the check: the mean news of each step is near 0.
Calculate these 13 signatures from the news of all rounds. All amounts are in start values, so the start value is 1. A good step has news above 0. SD is the standard deviation, corr is the correlation, and n is the number of steps of the round.
Amplitude: SD(X) / μ₀
News steps: (Σ dₜ²)² / Σ dₜ⁴
Evenness: news steps ÷ steps before the last news
News timing: Σ t·dₜ² / (n·Σ dₜ²)
Silent steps: steps with no news ÷ steps between the first news and the last news
Runs: corr( 1[dₜ > 0], 1[dₜ₊₁ > 0] )
Self-feeding: corr( number of good steps before t, size of good step t )
Extension: corr( number of good steps, number of steps )
Cliff share: Σ dₜ² of decreases larger than 2μ₀ ÷ Σ dₜ² of all decreases
Forfeit: value shown and not paid ÷ value shown
Lens gain: SD(X) ÷ SD(X without the mechanic)
Band shift: (change of width − change of centre) ÷ SD(X), at step 1
Price: price of a round ÷ stake
For News steps, Evenness, News timing and Silent steps, calculate one value for each round. Then take the mean of all rounds, with the sum of the squared news of the round as the weight. For each correlation, put the pairs of all rounds in one list. If you cannot calculate a signature from my data, tell me which data you need.You get. One row of 13 numbers for this part of your game. For a check, give the agent a spin with one step. Its row must show News steps 1.00 and News timing 1.00, the values of the Baseline row in the second table.
Compare my 13 values with these 10 shapes. Each line gives the signatures that define one shape, with the value of its model. The value of the Baseline, a spin with one step, is in brackets.
Reveal: Silent steps 1.00 (Baseline 0.00)
Gate: Cliff share 0.79 (Baseline 0.00), Self-feeding 0.66 (Baseline 0.00)
Fuse: Extension 0.89 (Baseline 0.00)
Ratchet: Self-feeding 0.38 (Baseline 0.00)
Chain reaction: Runs 0.25 (Baseline 0.00), Extension 1.00 (Baseline 0.00)
Lens: Lens gain 1.80 (Baseline 1.00)
Bank: Forfeit 0.52 (Baseline 0.00)
Mutation: Evenness 0.93 (Baseline 0.00), News steps 13 (Baseline 1.00)
Window: Band shift 0.70 (Baseline 0.00)
Valve: Price 2.00 (Baseline 1.00)
A shape is present if each of my values is nearer to its model than to the Baseline. Print one table with my value, the value of the model, and the result for each line. If no shape is present, the answer is Baseline.You get. A first list of the shapes of this part of your game. More than one shape can be present, because a real game is a sum of shapes. The rule is a first test, and it can name one shape too many: examine the belief paths before you decide. For a check, a spin with one step must give the answer Baseline. For comparison, this post finds a fuse and a ratchet in the feature of the test game.
Next: Part 7. Cues: how a game shows the news.