Cody Smith. 2019
Most of the code is in main.js or connections.js . Also, index.html has some user interface code.
This is written in javascript and can be run from the web page https://m0ose.github.io/cs362_neuralNIM/index.html .
Download/unzip the files to a directory and then open index.html. You may be able to just double click the index.html file. Otherwise, in chrome go to file->open->[directory]/index.html . Note: I have only tested this in the Chrome browser.
This is a hand trained neural network that can play an optimal move in nim. If no optimal move is found then it's output is not defined. It might not even play a valid move at that point.
It required designing a few XOR layers a difference layers and some if-then-else layers out of weighted edges, a tedious but rewarding task.
This uses numeric.js for a matrix representaion and a dot product