[PYTHON] [Pachislot] Anata's Otto !?

Introduction

image.png It was Unit 6's "Ha-desu"! I like AT and hit it a little. So, this stand has a considerable difference in the appearance of "Right-up Yellow Seven", but I would like to try the program to see how many rotations it takes to determine. image.png

In addition, whether the setting is even or odd can be guessed by other factors, so I divided it into odd numbers and investigated it.

plot

I divided it into settings 1,3,5 and 2,4,6 and executed 2000, 4000, 6000, 8000 rotations 20 times each. If the odd number is (1,3) or 5, it seems that it can be identified by 2000 rotations. If the even number is (2,6) or 4, it seems that it can be identified at 4000 rpm.

2000 rotations (left odd, right even)

image.png

4000 rotations (left odd, right even)

image.png

6000 rotations (left odd, right even)

image.png

8000 rotations (left odd, right even)

image.png

Box plot

2000 rotations (left odd, right even)

image.png

4000 rotations (left odd, right even)

image.png

6000 rotations (left odd, right even)

image.png

8000 rotations (left odd, right even)

image.png

Source

I'm sorry, I'm studying python, so I'm sorry. orz

#Import what you need
import numpy as np
import matplotlib.pyplot as plt
import math

#Fixed random numbers
np.random.seed(10)

#Number of trials
T = 20 

#Number of times
N = 4000

#"Probability of yellow rising 7 occurrence" by setting
PROP = np.array([ 1 / 99.9, 1 / 95.7, 1/ 90.0, 1 / 86.2, 1 / 77.3, 1 / 99.9 ])
COLORS = ['blue', 'green', 'red']

odds = [0, 2, 4]
evens = [1, 3, 5]

fig, axes = plt.subplots(nrows=8, ncols=2, figsize=(10,40), sharex=False)

for i, n in enumerate([2000, 4000, 6000, 8000]):
    for even in [0, 1]:
        if even == 0:
            temp = odds
        else:
            temp = evens
        # plot
        yarray = []
        for j, s in enumerate(temp):
            x = np.full(T, s + 1)
            y = done(n, T, PROP[s])
            yarray.append(y)
            axes[i,even].scatter(x, y, color=COLORS[j])
            x = np.array([0.9, 6.1])
            y = np.full(2, PROP[s])
            axes[i,even].plot(x, y, color=COLORS[j])

        #Box plot
        axes[i + 4,even].boxplot(yarray)
        if even == 0:
            axes[i + 4,even].set_xticklabels(['1', '3', '5'])
        else: 
            axes[i + 4,even].set_xticklabels(['2', '4', '6'])

        for j, s in enumerate(temp):
            x = np.array([0.9, 6.1])
            y = np.full(2, PROP[s])
            axes[i + 4,even].plot(x, y, color=COLORS[j])


def done(N, t, p):
    ret = np.array([])
    for n in range(t): #t trials
        a = np.random.rand(N)  #N rotation
        ret = np.append(ret, len(np.where(a < p)[0]) / N)
    return ret

Finally

Personally, I think it's better to look at the "God Rush Winning Probability from the Chance Zone" rather than judging by "Right Up Yellow 7".

Recommended Posts

[Pachislot] Anata's Otto !?