MariFlow Manual
MariFlow Manual
SethBling
Introduction
This manual explains, roughly, how to install, train and run MariFlow, a recurrent neural network
for playing Super Mario Kart. If you want to try anything but the sample, I recommend learning
about neural networks, theres a lot to know.
Introduction
Installation
Requirements
Placing Files
Requirements
The following software is required to run MariFlow. Ive included the version numbers that I have
installed on my computer. Some of the requirements are stricter than others. See h
ere for more
information on installing TensorFlow.
Python 3.5.0 (64bit)
CUDA Development Tools 8.0.61 (64bit)
CuNN 6 (64bit)
For some reason downloading this requires creating an account.
With the release of Tensorflow 1.4, you may need CuNN 7 instead.
Visual C++ 2015 Redistributable
tensorflow-gpu/tensorflow 1.3 (can be installed with p ip etc.)
pygame (can be installed with pip etc.)
Bizhawk 1.12.2
Super Mario Kart ROM.
Placing Files
Download this zip file: https://www.dropbox.com/s/m59prsodl2t8bec/MariFlow.zip?dl=1
Place the contents of the zip file anywhere youd like. Within your Bizhawk directory, theres a
folder called Lua. Copy the contents of the Lua folder in the zip file into the Lua folder in the
Bizhawk installation. When you start training models, make sure they arent in a Dropbox folder,
or the process will fail.
L and R
L and R are not captured as part of the training data. Instead, pressing L or R will mark those
frames as non-training frames. That is, they will still be seen during the training process, but no
weight will be given to the controller inputs on those frames to improve the neural network. You
can use L or R to intentionally drive the kart into a bad situation in order to create training data
that shows the network how to recover from that bad situation.
+Screen
This will toggle a display of the neural network inputs as theyll be captured to file.
Data Filename List of training file names, one per line (indent additional
lines)
RNN Layer<number> The size of each layer of the RNN. You can have as
many layers as you like, start numbering at 1.
Train DropoutKeep The probability that each nodes output will be kept
during training.
Train NumPasses The number of passes through the training set (this
keeps sequences from always containing the same
training data).
If you dont specify a checkpoint number, it will run the last checkpoint file saved. Otherwise itll
use the checkpoint saved at the batch number specified (this is the number at the end of the
checkpoint file).
It may take several minutes to load the neural network, but once you do itll tell you what
hostname and port its listening on for the emulator. Take note of the hostname, youll need it to
connect with the emulator.