This is the code for my experiments with Mr Nibbles and Machine Learning.
Read more about this and follow along on my series A Game Developer Learns Machine Learning.
Make sure you download and install the TensorSharp lib: https://s3.amazonaws.com/unity-agents/0.2/TFSharpPlugin.unitypackage