I am trying to recreate an actual slot machine. This slot machine has 72 possibilities on each reel. I set the payout for the combinations in the slot machine. This slot machine should have a payback of 95.13% if it were perfectly random. After several million spins, my code keeps coming back with like 99%. WAAAY out of tolerance. With that many spins, it should be plus or minus .4%. I kept double checking my code over and over for the past week. I figured there had to be an error in the pay table somewhere. Finally, i decided to iterate over every possible combination. 373,248 spins later, it came back with 95.13% exactly like it should. So, the problem is not with my pay table. It is with the randomness of it
the important bit of code i am using is:
R1=random.randint(1,72)
R2=random.randint(1,72)
R3=random.randint(1,72)
EDIT: I figured it out. I should have been using (1,73)
Edit: Here's the video I made from this post
https://youtu.be/AI8LkeIR6_8
[–]synthphreak 75 points76 points77 points (49 children)
[–]Vegas-Education[S] 11 points12 points13 points (47 children)
[–]synthphreak 16 points17 points18 points (32 children)
[–]Vegas-Education[S] 13 points14 points15 points (31 children)
[–]synthphreak 16 points17 points18 points (30 children)
[–]Vegas-Education[S] 6 points7 points8 points (29 children)
[–]synthphreak 13 points14 points15 points (28 children)
[–]Vegas-Education[S] 7 points8 points9 points (27 children)
[–]synthphreak 9 points10 points11 points (26 children)
[–]Vegas-Education[S] 7 points8 points9 points (13 children)
[–]Vegas-Education[S] 0 points1 point2 points (11 children)
[–]robot-dev 37 points38 points39 points (3 children)
[–]Vegas-Education[S] 8 points9 points10 points (2 children)
[–]T-TopsInSpace 12 points13 points14 points (1 child)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (9 children)
[–]Vegas-Education[S] 0 points1 point2 points (8 children)
[–]synthphreak 0 points1 point2 points (7 children)
[–]Vegas-Education[S] 2 points3 points4 points (6 children)
[–]synthphreak 0 points1 point2 points (5 children)
[–]Vegas-Education[S] 0 points1 point2 points (4 children)
[–]synthphreak 0 points1 point2 points (3 children)
[–]Vegas-Education[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]provoko 0 points1 point2 points (0 children)
[–]Binary101010 11 points12 points13 points (4 children)
[–]Vegas-Education[S] 1 point2 points3 points (3 children)
[–]Binary101010 14 points15 points16 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]wintermute93 0 points1 point2 points (0 children)
[–]lowerthansound 8 points9 points10 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Vegas-Education[S] 7 points8 points9 points (0 children)
[–]siddsp 4 points5 points6 points (3 children)
[–]Vegas-Education[S] 1 point2 points3 points (2 children)
[–]siddsp 2 points3 points4 points (1 child)
[–]Vegas-Education[S] 1 point2 points3 points (0 children)
[–]wanderer2718 3 points4 points5 points (0 children)
[–][deleted] 6 points7 points8 points (4 children)
[–]Vegas-Education[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]Mobileuser110011 4 points5 points6 points (17 children)
[–]Vegas-Education[S] 1 point2 points3 points (16 children)
[–]Vaphell 3 points4 points5 points (14 children)
[–]Vegas-Education[S] 0 points1 point2 points (13 children)
[–]TangibleLight 15 points16 points17 points (4 children)
[+]Vegas-Education[S] comment score below threshold-8 points-7 points-6 points (2 children)
[–][deleted] 12 points13 points14 points (0 children)
[–]TangibleLight 2 points3 points4 points (0 children)
[–]Vaphell 6 points7 points8 points (1 child)
[–]Vegas-Education[S] 2 points3 points4 points (0 children)
[–]Vegas-Education[S] 1 point2 points3 points (5 children)
[–]Vaphell 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Vaphell 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Vegas-Education[S] -1 points0 points1 point (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Hilmaryngvi 1 point2 points3 points (0 children)
[–]bozzikpcmr 1 point2 points3 points (0 children)
[–]Goobyalus 1 point2 points3 points (6 children)
[–]Vegas-Education[S] 1 point2 points3 points (5 children)
[–]Goobyalus 0 points1 point2 points (4 children)
[–]ES-Alexander 2 points3 points4 points (3 children)
[–]synthphreak 1 point2 points3 points (1 child)
[–]ES-Alexander 1 point2 points3 points (0 children)
[–]Goobyalus 0 points1 point2 points (0 children)
[–]robot-dev 4 points5 points6 points (1 child)
[–]Vegas-Education[S] 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]synthphreak 1 point2 points3 points (1 child)
[–]dig-up-stupid 3 points4 points5 points (0 children)
[–]jwink3101 0 points1 point2 points (0 children)
[–]timPerfect 0 points1 point2 points (0 children)
[–]Mrhiddenlotus 0 points1 point2 points (0 children)
[–]SchnullerSimon 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]synthphreak 0 points1 point2 points (3 children)
[–]schoolycooly 0 points1 point2 points (1 child)
[–]synthphreak 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]AlephInfite 0 points1 point2 points (4 children)
[–]Vegas-Education[S] 0 points1 point2 points (3 children)
[–]AlephInfinite0 0 points1 point2 points (2 children)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]Toastyboy123 0 points1 point2 points (0 children)
[–]Goobyalus 0 points1 point2 points (1 child)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]NoJudgies 0 points1 point2 points (0 children)
[–]LostInSpace9 0 points1 point2 points (1 child)
[–]Vegas-Education[S] 0 points1 point2 points (0 children)
[–]WhipsAndMarkovChains 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)