It is a record when I practiced the numerical calculation library of python based on the experience value necessary for leveling up Dragon Quest Walk. In (1), check the data, and in (2), we will calculate the mathematical model. (I'm currently studying, so I'd be happy if you could point out any mistakes.)
Load the required library. I may not use it this time, but I will use it next time, so read it.
import pandas as pd
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
%matplotlib inline
%precision 3
Transfer the required experience points for each level from the reference URL to a text file.
zsh
% head data.csv
0
9
23
50
105
192
346
599
962
1397
Alright, read_csv ().
df = pd.read_csv('data.csv')
df.head()
*** King "Oh, what's the point of reading data without a header column?" ***
Set header = None in the read_csv () option, or set the column name with names = [].
df = pd.read_csv('data.csv',names=['EXP'])
df.head()
Since the index starts from 0, the experience value required to go from level 0 to level 1 will be 9 if it is left as it is. So add 1 to index.
df.index = df.index+1
df.head()
With this alone, you can know the experience points required to level up, but since you do not know the experience points required to reach that level, calculate the cumulative sum (Cumulative Sum) as well.
df['CUMSUM_EXP'] = df['EXP'].cumsum()
df.head()
plt.plot(df.index,df['EXP'])
plt.xlabel('LEVEL')
plt.ylabel('EXP')
plt.grid(True)
At around level 50, I feel that the model is obviously different.
plt.plot(df['CUMSUM_EXP'],'x')
plt.xlabel('LEVEL')
plt.ylabel('EXP')
plt.grid(True)
I feel that this is a beautiful exponential graph.
Let's check the descriptive statistics value using pandas describe ().
pd.options.display.float_format = '{:.2f}'.format
df.describe()
Immediately, I will put a horizontal line of the quantile in the graph above. Apply the quantiles of cumulative experience points to the graph of experience points required for the next level. (There is something wrong here, but I think it is correct as a result.)
plt.plot(df['EXP'],label = 'EXP')
plt.axhline(df['CUMSUM_EXP'].quantile(0.25), ls = "-.", color = "magenta",label="25%")
plt.axhline(df['CUMSUM_EXP'].quantile(0.50), ls = "-.", color = "green",label="50%")
plt.axhline(df['CUMSUM_EXP'].quantile(0.75), ls = "-.", color = "Orange",label="75%")
plt.xlabel('LEVEL')
plt.ylabel('EXP')
plt.legend()
plt.grid(True)
Hmm? Since the 75% line is in such a place, I will extract levels 50 to 55 and graph them.
plt.plot(df['EXP'][49:55],label = 'EXP')
plt.axhline(df['CUMSUM_EXP'].quantile(0.75), ls = "-.", color = "Orange",label="75%")
plt.xlabel('LEVEL')
plt.ylabel('EXP')
plt.legend()
plt.grid(True)
25% of the experience points required to reach level 55 is almost equal to the experience points required to reach level 54 to 55 ... This is sad news because the senior positions released the other day will not have permanent skills unless they reach level 55.
to be continued
Dragon Quest Walkthrough wiki https://gamerch.com/dq-walk/entry/102321
Recommended Posts