Research

Computing Return to Player Exactly

DiceGem team · Published

Abstract. Every casino-style game on DiceGem declares the return to player of each bet, and its tests recompute that figure from the game's own rules before the site can be built. This paper describes the declaration, the counting methods for each game family, the conventions behind the numbers, and why some games publish no single figure.

Summary

1. The declaration

Each casino-style game carries a list of its bets with one RTP per bet, rounded to six decimal places. A bet whose figure assumes the best decision at every step is marked optimal play. Games that have no single figure say so with one of four labels instead (section 5).

A test inside the game recomputes every declared figure and compares them. The test fails when:

The site’s catalog step then refuses to build if a casino-style game has no declaration or no test for it, and if a non-casino game declares one. The figures on the fairness page and in the open data files come straight from these declarations.

2. Counting methods by game family

The principle is the same everywhere: list every outcome the rules allow, weight it by its probability, and let the game’s own code decide what each outcome pays.

Wheels and dice

A roulette wheel has a fixed set of pockets, and dice have a fixed set of faces. The calculation passes each pocket or roll through the table’s settlement code and averages the result. Every bet on a dice table must belong to exactly one group of bets with an equal return, otherwise the calculation stops with an error.

Baccarat

For bets that depend only on card values, every possible sequence of card values is counted with its exact probability from the shoe (eight decks unless the game says otherwise, dealt from the top of a fresh shoe) and settled by the table’s own code. Pair bets depend on rank, so their first two cards are counted over all 13 × 13 rank combinations.

Video poker

All 2,598,960 possible deals are counted, and for each deal the best of the 32 possible holds is found by counting every draw. The method is described in the video poker paper.

Slots

Each reel is an independent strip of stops, so the window each reel can show follows from its stops. Line wins come from those window distributions, scatter and pick features from their trigger probabilities, and respin chains from a small set of linear equations over their states. Free spins are played on the same reels, so their value follows from the trigger probability as a geometric series that includes retriggers.

Two slot mechanics have no exact figure: sticky wilds and tumbling reels during free spins. Their state can grow without limit, so the series above does not close. Those games carry the no exact figure label and offer no bet with a published RTP.

Instant games with a cash-out

In ladder games such as Mines, the hazards are placed at random when the round starts, so the square you pick does not change your odds. What a player controls is the number of hazards, the bet and when to stop. Every combination is counted, and the declared figure, marked optimal play, is the best of them.

3. Conventions behind the numbers

A figure is only meaningful with its basis, so every game uses the same ones:

4. Optimal play

Where a bet needs decisions (holding cards, raising, cashing out), the declared figure assumes the best decision every time and is marked optimal play. Mistakes lower the return; nothing in the game raises it. The house edge calculator shows what a figure means over a session.

5. Games without a single figure

Four labels cover games where one number would mislead:

LabelMeaning
Player versus playerYou play against other players or bots for the pot; the house takes no edge.
Depends on your decisionsThe best play cannot be computed exactly from the rules alone. Our blackjack variants are here: their strategy comes from an approximate solver, described in the blackjack solver paper.
Prize poolA fixed share of all stakes goes back as prizes (bingo). The declared share is exact; individual prizes are rounded down, so the realised return is a hair below it.
No exact figureThe mechanics have no closed solution (sticky wilds, tumbling reels).

6. Where to check