3.3 Training Model Establishment
According to the rules set out in 3.2, we should conduct two trainings in succession.
First, determine the Atk and Def values for each unit regardless of the terrain factor.
Let Obs ¼ O 1 ; O 2 ; O 3 ; . . .; O c
ð
Þ denote a training set with a sample size of C, which
is a data set of C battles conducted through SparCraft. The i-th element O i in Obs
represents the winner of the i-th battle (i.e., X or Y).
Assume the two-dimensional matrix Vec ¼ node
j
i
À
Á
, where node
j
i represents the jth feature value of the i-th unit. Then, Vec is the characteristic matrix composed of the
eigenvalues of all M arms. The initial value is the basic value of each unit in the game.
For example, the damage characteristic value is the attack power of the unit in the
game, and the vital sign value is the life value of the unit in the game.
Based on the above two data sets Obs and Vec, we can combine the model proposed in 3.2 and propose the Bayesian Formula (3.5).
P Obs; Vec
ð
Þ¼P Vec
ð
Þ
Y
i
P O i jVec
ð
Þ
ð3:5Þ
Based on this, we can estimate the parameters of the parameter set Vec by the
maximum posterior probability estimation (MAP). It should be noted that the distribution of Ack and Def values between individual arms can be independent of each
other without considering the group augmentation skills. Therefore, for P O i jVec
ð
Þ, we
can do the split like (3.6).
P O i jVec
ð
Þ¼P O i jnode
1
1 ; node
2
1 ; . . .
À
Á ¼
Y
i;j
P O i jnode
j
i
À
Á
ð3:6Þ
In order to facilitate the calculation, we use the method of training in batches, and
for each eigenvalue, it is regarded as a random variable satisfying N(l, r). Initially, we
consider l as the initial value of node
j
i . Then, the posterior probability distribution
function can be obtained by formula (3.7).
h ¼
f ObsjVec
ð
Þ f Vec
ð
Þ
R
h f xjVec
0
ð
Þf Vec
0
ð
Þdh
0 #
ð3:7Þ
When the maximum value is obtained, the value of Vec is the desired value.
Then, it is considered to add terrain factors to the model. Let # ¼ d
j
i
À Á
, where d
j
i
represents the terrain correction factor corresponding to the j-th feature value of the i-th
arm. Equation 3.5 can be rewritten as (3.8).
P Obs; #
ð
Þ¼P Vec
ð
Þ
Y
i
P O i j#
ð
Þ
ð3:8Þ
Battle Prediction System in StarCraft Combined with Topographic …
127
Précédent

- 139/679

Suivant