Ludomancy, all parts
Ludomancy, part 4 of 12 12 min read

Ludomancy 4: Belief: the value the player follows

RTP and volatility read only the end of a round. Belief reads each step of the round. Three laws show what a mechanic can change and what it cannot change.

Part 4 of 12 in Ludomancy. Each part stands on its own: it explains the test game and defines the terms it uses.

In short

  • Belief is the fair value of the round after each step. You calculate it from the books and the weights.
  • Law 1: no step is good news on average.
  • Law 2: the paytable and the weights set the total variance. A mechanic sets only the time of its release.
  • Law 3: more steps give the same travel or more travel. Travel, letdown, delight and tingle measure the feel.

The test game. This series uses one test game. It is not a real product. It has 5 reels and 3 rows. Three scatters start 10 free spins, about 1 time in 151 spins. In the free spins, a multiplier grows by 2.29 after each winning spin.

What belief is

A player does not see the payout immediately. The player sees events: a reel stops, a scatter lands, a multiplier grows. After each event, the round has a fair value. This series calls that value belief.

μₜ = E[ X | all events up to step t ] dₜ = μₜ − μₜ₋₁X is the payout of the round. μ₀ is the RTP × the price of the round. The last belief is the payout. dₜ is the news of step t.
In plain words

Stop the round at one moment. Find all the books that agree with what the player saw up to that moment. The mean payout of these books is the belief. The news of a step is the belief after the step minus the belief before it.

Example. In the first spin of Figure 1, belief is 0.54× before reel 4 stops. The second scatter lands on that reel, and belief is 5.98×. The news of this step is +5.44×.

# belief after step t of one round, from the books and the weights
same = [b for b in books if b.seen(t) == this_round.seen(t)]
belief = sum(b.weight * b.payout for b in same) / sum(b.weight for b in same)
news = belief - belief_before

Use it. Record the belief after each step of each simulated round. All the metrics of this post come from this record.

Belief is a property of the books and the weights. It is not a guess about psychology. It is the average payout of all books that agree with the events up to that step. The sounds and the pictures of the game tell the player that belief moved. A real player does not know the exact value. But the player follows its direction and its size.

Part 3 gives the evidence. The dopamine cells of the brain signal the change of the expected reward at each step. If the expectation is correct, this signal is the news dₜ.

How to calculate belief

A base spin needs the reel strips. A feature needs a value table.

  1. Calculate the expected payout before the spin. This is μ₀.
  2. After each reel stop, calculate the expected payout again from the reels that still spin.
  3. For the feature, make a value table V(spins left, multiplier).
  4. Fill the table from the last free spin back to the first free spin.
  5. In the feature, add the money won so far to V. The sum is the belief.

If you have only books and weights, use the program in the box above. seen(t) must be a short list of the facts that matter to the player. Use the number of scatters, the free spins that remain, the multiplier and the win so far. Do not use the full screen. With the full screen, each group has 1 book, and the belief is the payout of that book.

0.5×1×2×5×10×20×50×100×startR1R2R3R4R5reel stopsbelief μ, × stakefeature startsblank tease0100200300400500600700800024681012free spins7×38×144×805×
Figure 1. Left: 2 teased base spins of the test game, with belief after each reel stop on a log scale. In the first spin, the second scatter lands on reel 4, belief goes to 5.98×, and then the feature starts at 64.8×. In the second spin, belief goes to 5.98× and the round pays 0.00×. Right: 4 features, with belief after each free spin and the final win at the end of each line.

Law 1: no step is good news on average

Let Fₜ be all events that the player saw up to step t.

Claim
For each step t, E[ dₜ | Fₜ₋₁ ] = 0. Belief is a martingale.
In plain words

Take all the rounds that look the same up to now. At the next step, belief goes up in some of them and down in the others. The moves up and the moves down have the same total. Good news for one round is bad news for a different round.

Example: belief is 2×. The next reel gives 5× with a chance of 1 in 4, and 1× with a chance of 3 in 4. The mean is 0.25 × 5 + 0.75 × 1 = 2×.

Proof (you can skip it)
  1. The definition gives μₜ = E[ X | Fₜ ].
  2. The player forgets nothing: Fₜ contains all of Fₜ₋₁.
  3. The tower property of the conditional expectation gives E[ E[X | Fₜ] | Fₜ₋₁ ] = E[ X | Fₜ₋₁ ].
  4. The left side is E[ μₜ | Fₜ₋₁ ]. The right side is μₜ₋₁.
  5. Subtract μₜ₋₁ from the two sides. The result is E[ dₜ | Fₜ₋₁ ] = 0.
∎

One step can be good news in one round. But the average news of each step is 0. No mechanic can make belief climb on average.

Law 2: the variance budget

Claim
Var(X) = Σₜ E[ dₜ² ]. The variance of the payout is the sum of the variance of the news of each step.
In plain words

A round contains a fixed quantity of surprise. The pay table and the weights set this quantity. A mechanic can only move surprise from one step to a different step.

Example: the variance of the payout is 100. If the first step releases 80, all the later steps together release 20.

Proof (you can skip it)
  1. The last belief is the payout. As a result, X − μ₀ = Σₜ dₜ.
  2. The first belief is the mean: μ₀ = E[X]. As a result, Var(X) = E[ (Σₜ dₜ)² ].
  3. Expand the square: Σₜ E[dₜ²] + 2 · Σ E[dₛ dₜ], where the second sum has all pairs with s < t.
  4. At step t − 1 the player knows dₛ. As a result, E[dₛ dₜ] = E[ dₛ · E[dₜ | Fₜ₋₁] ].
  5. Law 1 gives E[dₜ | Fₜ₋₁] = 0. Each cross term is 0.
  6. Only Σₜ E[dₜ²] remains. The win cap keeps all these values finite.
∎
Check with numbers

The table shows the 11 small belief models of Part 6. The simulation ran 200,000 rounds for each model. All values are in units of μ₀. The two variance columns agree. The last column is the mean of X − μ₀, and Law 1 says that it is 0. The small differences come from the finite number of simulated rounds, and they are largest for the window model, which has rare, large results.

Belief modelVar(X)Σ E[dₜ²]Mean of X − μ₀
Baseline12.68912.689-0.005
Reveal34.82435.125-0.011
Gate30.63730.5200.016
Fuse0.4150.417-0.002
Ratchet0.5600.5590.003
Chain reaction1.0671.0690.001
Lens1.7701.768-0.001
Bank0.9480.945-0.001
Mutation0.0700.0700.000
Window4.1124.705-0.004
Valve18.63518.5490.014

The paytable and the weights set the total variance of a round. A mechanic cannot add variance, and it cannot remove variance. A mechanic decides only the time and the shape of the release.

The paytable sets how much news a round contains. The mechanic sets when the news comes.

Baselinesteps: one spinpeak step 1: 100%Revealsteps: land, hold, revealpeak step 6: 76%Gatesteps: reel stopspeak step 5: 52%Fusesteps: respinspeak step 1: 53%Ratchetsteps: free spinspeak step 10: 12%Banksteps: spinspeak step 10: 30%Chain reactionsteps: spins and cascadespeak step 11: 6%Mutationsteps: rewritespeak step 9: 7%Windowsteps: size, then reelspeak step 6: 36%
Figure 2. The share of the total variance of a round that each step releases, for 9 belief models. Each bar is one step. A plain spin releases all the variance in one step. A reveal holds most of it until the last step. A mutation spreads it across all steps.

Law 3: more steps, more travel

Travel is the total distance that belief moves in a round: travel = Σₜ |dₜ|.

Claim
In each round, travel ≥ |X − μ₀|. If you divide one step into two steps, travel does not decrease.
In plain words

Add the size of each move of belief in a round, up and down. If the game shows the same result in more steps, this sum stays the same or grows.

Example: one step from 1× to 3× has a travel of 2. Two steps, from 1× to 5× and then from 5× to 3×, have a travel of 4 + 2 = 6. The payout is the same.

Proof (you can skip it)
  1. The news adds up to the result: X − μ₀ = Σₜ dₜ.
  2. The triangle inequality gives |Σₜ dₜ| ≤ Σₜ |dₜ|.
  3. As a result, travel ≥ |X − μ₀|. A round with one step has travel = |X − μ₀|.
  4. Divide a step d into two steps a and b with a + b = d. Then |a| + |b| ≥ |d|.
  5. As a result, a presentation with more steps has the same travel or more travel for the same payout.
∎
Check with numbers

Part 1 shows the same 10 free spins in two presentations. With 1 step, the mean travel is 0.66 × μ₀. With 10 steps, the mean travel is 1.31 × μ₀. The presentation with 10 steps has 2.0 times the travel of the presentation with 1 step. The payouts are the same.

Four feel metrics

A tease is a spin that shows 2 scatters before the last reel stops. In the base game of the test game, 4.4% of spins are teases. The feature starts in 15.1% of them.

Travel4.25 stakes for each base round, feature included
travel = Σₜ |dₜ| (for each round, in stakes)

Travel is the quantity of news that the player gets in a round. It is the base material of excitement. Part 9 and Part 10 divide travel by time and by money.

In plain words

Add the size of each move of belief in the round. A move up and a move down count the same.

travel = sum(abs(news) for news in round.news)

Use it. A spin with no event has almost no travel. If the travel for each minute is low, the game feels flat: add steps that show information (Part 7).

Letdown and delight1.31 · 0.34 for each base round
letdown = max(0, highest μ before the end − X) delight = max(0, X − highest μ before the end)

Letdown is the fall from the best belief of the round to the payout. Delight is the part of the payout that is above the best belief before the end.

In plain words

Find the highest belief before the last step. If the payout is below it, the difference is letdown. If the payout is above it, the difference is delight.

Example. In the second spin of Figure 1, belief went to 5.98× and the round paid 0.00×. The letdown is 5.98×, and the delight is 0.

peak = max(round.belief[:-1])          # the best belief before the end
letdown = max(0, peak - round.payout)
delight = max(0, round.payout - peak)

Use it. Much letdown with little delight shows a game that makes promises and does not keep them.

Tingle0.59 base · 0.46 ante
tingle = Σ delight ÷ Σ letdown (teased rounds only)

Tingle compares delight with letdown in the teased rounds. A value above 1 means that the teases give more delight than letdown. A value much below 1 means that most teases end in letdown. In the base game of the test game, tingle is 0.59: the teases give less delight than letdown. The ante mode has 2.6 times the tease rate, and its tingle is lower: 0.46.

In plain words

Use only the rounds with a tease. Add their delight. Add their letdown. Divide the first sum by the second sum.

teased = [r for r in rounds if r.has_tease]
tingle = sum(r.delight for r in teased) / sum(r.letdown for r in teased)

Use it. If tingle is much below 1, decrease the rate of teases or increase the chance of the feature in a tease.

Blank teases3.5% of base spins
P( the round has a tease and it pays less than the stake )

A blank tease shows the feature to the player and then pays less than the stake. In the base game, 80% of the teases are blank teases. A limit on blank teases is a good constraint for an optimiser.

In plain words

Count the spins that show a tease and then pay less than the stake. Divide by the number of all spins.

blank = [r for r in rounds if r.has_tease and r.payout < stake]
rate = len(blank) / len(rounds)

Use it. Set a maximum for this rate before you start the optimiser.

Belief metrics are not linear in the weights

Each Level 0 and Level 1 metric is a weighted average of the books. An optimiser can use these metrics as linear constraints. Belief metrics are different.

Claim
Belief is not a linear function of the weights.
In plain words

A change of one weight changes the belief in each round that looks like that book at some step. Old belief values are wrong after a change of the weights. Calculate belief again each time the weights change.

Proof (you can skip it)
  1. Let Bₜ be the set of books that agree with the events up to step t.
  2. Then μₜ = Σ wᵢ xᵢ ÷ Σ wᵢ, where the two sums have the books in Bₜ only.
  3. This is a ratio of two sums of weights. A ratio is not linear.
  4. Example: two books agree at step 1. They pay 0 and 10. Each has the weight 1. Then μ₁ = 5.
  5. Multiply the second weight by 2. Then μ₁ = 20 ÷ 3, which is not 10.
∎

A change of one weight changes the belief in each round that can contain that book. As a result, an optimiser cannot use tingle or travel as a linear constraint. Calculate the belief metrics again after each pass of the optimiser.

Do it with an AI agent

You do not write the calculation. You give the instructions, and you read the checks. The checks are the laws of this post: a correct record of belief obeys them.

Give this to your AI agent
  1. Read my books and my weights. For each round, record the belief after each step. Belief is the weighted mean payout of all books that show the same facts to the player up to that step. Use these facts: the number of scatters, the free spins that remain, the multiplier, the win so far.

    You get. A list of belief values for each round. The first value is the RTP × the price of the round. The last value is the payout.

  2. Test the record with 2 laws. Law 1: the mean news of each step is 0. Law 2: the mean of the sum of the squared news is equal to the variance of the payout. Print the two differences.

    You get. Two numbers near 0. In this post, the two variance columns of the table agree. If your numbers are not near 0, a group of books is too small or a fact is missing.

  3. Calculate travel, letdown, delight, tingle and the rate of blank teases for each bet mode. Print one table.

    You get. The feel of each bet mode in 5 numbers. For comparison, the base game of the test game has a tingle of 0.59 and 3.5% blank teases.

Next: Part 5. No free delight: six levers on the thrill.