We hypothesize that the connection between rel-
ative features in Fighting game is similar to the re-
lation of neighboring pixels in an image. The nearer
neighboring pixels have strong connections, while the
further neighboring pixels have weaker or no connec-
tion to others. If grouping pixels help to improve the
performance of modeling strong AI then grouping rel-
ative features could also work. Although usual neural
network has the ability to combine these features if
we use multiple layers, we can not control which fea-
ture would combine with others because all neurons
in one layer are fully-connected with next layer. In
those networks, strange connections like ’energy’ and
’size of character’ in the previous example are redun-
dant.
By using CNN, we can reduce the numbers of in-
effective connections, and put features that we need
to a group. This idea can be implemented simply by:
• Represent input feature as a grid
• Find some important features and put them in a
group by using a window
• When sliding the window, make sure the window
always contain such important feature. This leads
us to duplicate the important feature.
4 EXPERIMENTS
4.1 Dataset
We collect 560 games between top 3 players of Fight-
ing AI Competition in 2015. Each game contains
3 rounds, each round last 60 seconds, and there are
60 frames per second. In other words, we have
560x3x60x60 = 6,048,000 pairs of state-action. We
use 70% for training and 30% for validating. From
FightingICE environment, we get information from
our character and the opponent’s character such as
hitpoint, energy, the location of characters, size of
characters, etc. Totally, we have 15 features from our
character and 15 features from the opponent, then we
compute 5 more important relative features such as
distance, difference in hitpoint, difference in energy
and 2 relative positions. Using this dataset, we try to
model the next move of the top 3 strong AIs.
4.2 Experimental Setup and Results
Since FightingICE is written in Java, we have to write
a short description in Java to get the dataset and save
it in CSV format. After that, we build our neuron
networks in Python with supported from two famous
libraries: Numpy and Theano. We also use GPU
GTX970 to run experiments.
In the first experiment, we use a usual neural net-
work setting with 3 layers: one input layer, one hid-
den layer, and one output layer. The input layer has 35
neurons (because we have 35 features), hidden layer
has 100 neurons and output layer has 56 neurons (be-
cause our agent can perform 56 actions). Training this
network, we get a model which can archive an accu-
racy of 19.45% when predicting the next move. Tun-
ing the number of neuron in hidden layer, we get the
highest accuracy is 22.42%.
In the second experiment, we use a usual neu-
ral network setting with 4 layers: one input layer,
two hidden layers, and one output layer. This setting
based on the well-known fact that usual two hidden
layer networks have higher expressiveness than one
hidden layer. Training this network, we get a model
which can archive an accuracy of 25.38% (with 1000
neurons per hidden layer).
In the third experiment, we use a naive Deep CNN
setting: represent 35 features as a 5x7 grid input,
one convolutional layer with 20 filters size 2x2 stride
length 1, one fully-connected layer and one softmax
layer (Figure 3). Training this network, we get a
model which can archive an accuracy of 33.59%. It
is reasonable because the location of features are se-
lect at random. Some features which are grouped to-
gether may have strong relationships. As a result, our
model increased performance slightly compare with
usual NN in Table 1
Figure 3: Naive CNN structure with 5x7 grid input, follow
by one convolutional layer, one fully-connected layer and
one softmax layer.
Figure 4: The structure of CNN in experiment 4. Infor-
mation of our character and opponent’s are separated: our
information is at the top row, opponent’s information is at
the bottom row.
In the fourth experiment, we improve our model
by separating information of our character and op-
ponent’s character (Figure 4). We duplicate all the
ICAART 2017 - 9th International Conference on Agents and Artificial Intelligence
678