SkillAgentSearch skills...

Slotmath

Tools for calculating expected payouts for single and multi-line reel casino slot games. Not well-documented but includes Python, C, and CUDA implementations.

Install / Use

/learn @jhurt/Slotmath
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

These scripts can be used to calculate payouts for 5 reel single and multiline slot machines.

reelmath calculates the expected value using the probability of each payout and multiplying it by the payout amount. bruteforcereelmath does the same thing but in a brute force manner, mostly as a test for the correctness of reelmath multilinebruteforcemath calculates the expected value for all lines, in this case 9 lines. It can be extended to any number of lines. ; reel_layout.csv contains a list of symbols and their weight for each reel, change this as you wish for different slot configurations. payouts.csv contains a list of symbol combinations and their respective payouts, which you can also alter. Together, these files can be used to verify your expected payout. In Las Vegas, the minimum payouts for slots are .75, but to really make the game fun for players you should keep it in the .9 - 1.0 range. You can also add in bonus games to improve the payout. For multilinebruteforcemath you should run permutatereels first to generate a reels_weights_shuffled.csv which proposes an ordering of reel symbols to use. The expected value of multiline weighted slots is dependent on the ordering of the weighted reels.

I recommend using pypy (http://pypy.org/) when running any of the bruteforce scripts. On my machine I was seeing a 6x-7x speedup from this.

This software is Open Source under the BSD license, see LICENSE.txt for details.

View on GitHub
GitHub Stars20
CategoryDevelopment
Updated2mo ago
Forks16

Languages

Python

Security Score

90/100

Audited on Jan 21, 2026

No findings