jeudi 17 mars 2022

randint not random enough. Creating slot machine [closed]

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)



Aucun commentaire:

Enregistrer un commentaire