Clarification on a Neural Net that plays Snake

In this post, I will advise you of:

  • How to map navigational instructions to action sequences with an LSTM
    neural network
  • Resources that will help you learn how to use neural
    networks to accomplish your task
  • How to install and configure neural
    network libraries based on what I needed to learn the hard way

General opinion of your idea:

I can see what you’re trying to do, and I believe that your game idea (of using randomly generated identities of adversaries that control their behavior in a way that randomly alters the way they’re using artificial intelligence to behave intelligently) has a lot of potential.

Mapping navigational instructions to action sequences with a neural network

For processing your game board, because it involves dense (as opposed to sparse) data, you could find a Convolutional Neural Network (CNN) to be useful. However, because you need to translate the map to an action sequence, sequence-optimized neural networks (such as Recurrent Neural Networks) will likely be the most useful for you. I did find some studies that use neural networks to map navigational instructions to action sequences, construct the game map, and move a character through a game with many types of inputs:

General opinion of what will help you

It sounds like you’re missing some basic understanding of how neural networks work, so my primary recommendation to you is to study more of the underlying mechanics behind neural networks in general. It’s important to keep in mind that a neural network is a type of machine learning model. So, it doesn’t really make sense to just construct a neural network with random parameters. A neural network is a machine learning model that is trained from sample data, and once it is trained, it can be evaluated on test data (e.g. to perform predictions).

The root of machine learning is largely influenced by Bayesian statistics, so you might benefit from getting a textbook on Bayesian statistics to gain a deeper understanding of how machine-based classification works in general.

It will also be valuable for you to learn the differences between different types of neural networks, such as Long Short Term Memory (LSTM) and Convolutional Neural Networks (CNNs).

If you want to tinker with how neural networks can be used for classification tasks, try this:

To learn the math:
My professional opinion is that learning the underlying math of neural networks is very important. If it’s intimidating, I give you my testimony that I was able to learn all of it on my own. But if you prefer learning in a classroom environment, then I recommend that you try that. A great resource and textbook for learning the mechanics and mathematics of neural networks is:

Tutorials for neural network libraries

I recommend that you try working through the tutorials for a neural network library, such as:

Leave a Comment