← All thoughts
Game Math Ā· Draft

Modelling Hold & Spin with Markov chains

6 min read

This is a sample post showing how an article with an embedded demo will look. The text is placeholder — replace it with your own.

A Hold & Spin feature looks chaotic on screen, but underneath it is a very orderly thing: a state machine. At any moment, the feature is fully described by two numbers — how many positions are held, and how many respins are left.

The state

Write the state as a pair:

s = (h, r)

where h is the number of held symbols and r the respins remaining. Each respin either lands new symbols (h goes up, r resets) or lands nothing (r goes down by one). When r = 0 or the board is full, the feature ends.

Try it

Here's a stripped-down version of the feature. Play a few rounds and watch the state change.

Loads a small playable demo Ā· for fun, no real money
Hold & Spin — simplified 3Ɨ5 demo Open full screen ↗

From states to RTP

Because every transition depends only on the current state, the feature's expected value can be computed recursively, starting from the terminal states and working backwards:

E(h, r) = Ī£ P(s′ | h, r) Ā· E(s′)

Build the transition matrix once, and you get the feature's RTP contribution, its average length, and the probability of filling the board — without simulating a single spin.

Simulation tells you what happened. The Markov model tells you why.

What's next