This is the first post. I will write down the material that I have prepared for LT in the company. (I will do my best to continue to output ...)
It's a big title, My hobby is ** Pachislot ** ..
What is pachislot?
It is a slot machine installed in pachinko parlors, and is named "rotary type game machine" by law. It is called a pachislot because it is a slot machine in a pachinko parlor. There is a set of ** 6 stages (*) ** in pachislot, which is manually changed by a pachinko clerk after the store is closed.
- Not all models have 6 levels.
I will explain with a concrete example. "Go Go Juggler KK (Kita Denshi)" (I think many of you know this face.)
The basic specifications of this stand are as follows.
As I explained earlier, there is a setting on the slot base, It is set to approximately ** 6 levels **. And as the setting goes up, the specifications of the machine discount stand also go up.
This setting is ** manually changed by a pachinko parlor clerk every night **.
If you set it manually, Isn't ** law ** born unconsciously ...?
To explain this system insanely about, the composition is as follows. I will explain each step by step.
This system is implemented using Python.
environment Windows10 + Anaconda3
** Library used **
-selenium 3.141.0 (crawling) -Beautifulsoup 4.7.1 (scraping)
** Collection period ** 2019/7/15 - 2019/9/14
** Data actually collected **
Year | Month | Day | 曜Day | Stand | Stand番号 | BIG | REG | Composite probability | Cumulative game |
---|---|---|---|---|---|---|---|---|---|
2019 | 7 | 16 | fire | Hana Hana Ho-Oh EX-30-2 | 1353 | 12 | 7 | 1/199.2 | 3784 |
2019 | 7 | 16 | fire | Hana Hana Ho-Oh EX-30-2 | 1355 | 12 | 8 | 1/121.9 | 2438 |
2019 | 7 | 16 | fire | Hana Hana Ho-Oh EX-30-2 | 1356 | 4 | 1 | 1/338.4 | 1692 |
2019 | 7 | 16 | fire | Hana Hana Ho-Oh EX-30-2 | 1357 | 9 | 9 | 1/176.7 | 3179 |
2019 | 7 | 16 | fire | Hana Hana Ho-Oh EX-30-2 | 1358 | 2 | 1 | 1/148.4 | 445 |
The site where you can see the pachinko ball output information was only accessible from your smartphone.
Specify the device in the chromedriver option ** Resolve **
mobile_emulation = { "deviceName": "Nexus 5" } chrome_options = webdriver.ChromeOptions() chrome_options.add_experimental_option("mobileEmulation", mobile_emulation) driver = webdriver.Chrome("C:/chromedriver.exe", desired_capabilities = chrome_options.to_capabilities()) driver.get("URL of a pachinko parlor")
Use scikit-learn's "Random Forest".
This time, I stopped the data and learned by expanding the juggler. Predict how many settings the platform will have on that day from the trained model! !!
-** Objective variable : Setting - Explanatory variables **: Date, day of the week
Preprocessing that is not smart at all
#After messing around with the messy dataframe, #Guess the setting from the probability (it is called the guess value even though it is the objective variable)...) tmp = line[1][8].split("/") hoge = float(tmp[0]) / float(tmp[1]) if hoge >= my_pro[5]: hoge_np = np.append(hoge_np, 5) elif hoge >= my_pro[4]: hoge_np = np.append(hoge_np, 4) elif hoge >= my_pro[3]: hoge_np = np.append(hoge_np, 3) elif hoge >= my_pro[2]: hoge_np = np.append(hoge_np, 2) elif hoge >= my_pro[1]: hoge_np = np.append(hoge_np, 1) else: hoge_np = np.append(hoge_np, 0) #There are many other mess...
If you mess with it, throw it into the learning model
#Separate for training and evaluation x_train, x_test, y_train, y_test = model_selection.train_test_split(x, y, test_size=0.2) #Learning model = RandomForestClassifier() model.fit(x_train, y_train)
■ Practice day 2019/10/5 (Sat)
■ Location A certain pachinko parlor
When I usually go to hit, I take about three people, Sakichi. I can win this time, so I went to practice with Satoshi! !!
6.TODO Based on the following points of reflection, we will brush up so that we can definitely win.
Reflections
-The explanatory variables are not plausible. -The settings of the previous day and the settings of the left and right stands should be considered. -You should observe the store trends. -The number of data is not large in the first place. -I don't know if there is a tendency. -Even if you can guess the settings, you cannot always win. ** (Darkness of Pachislot) **
Recommended Posts