Technology

#Here’s what happened when neural networks took on the Game of Life

#Here’s what happened when neural networks took on the Game of Life

So you’re interested in AI? Then join our online event, TNW2020, where you’ll hear how artificial intelligence is transforming industries and businesses.

The Game of Life is a grid-based automaton that is very popular in discussions about science, computation, and artificial intelligence. It is an interesting idea that shows how very simple rules can yield very complicated results.

Despite its simplicity, however, the Game of Life remains a challenge to artificial neural networks, AI researchers at Swarthmore College and the Los Alamos National Laboratory have shown in a recent paper. Titled, “It’s Hard for Neural Networks To Learn the Game of Life,” their research investigates how neural networks explore the Game of Life and why they often miss finding the right solution.

Their findings highlight some of the key issues with deep learning models and give some interesting hints at what could be the next direction of research for the AI community.

What is the Game of Life?

British mathematician John Conway invented the Game of Life in 1970. Basically, the Game of Life tracks the on or off state—the life—of a series of cells on a grid across timesteps. At each timestep, the following simple rules define which cells come to life or stay alive, and which cells die or stay dead:

  1. If a live cell has less than two live neighbors, it dies of underpopulation.
  2. If a live cell has more than three live neighbors, it dies of overpopulation.
  3. If a live cell has exactly two or three live neighbors, it survives.
  4. If a dead cell has three live neighbors, it will come to life.

Based on these four simple rules, you can adjust the initial state of your grid to create interesting stable, oscillating, and gliding patterns.

For instance, this is what’s called the glider gun.

game of life glider gun

You can also use the Game of Life to create very complex pattern, such as this one.

game of life complex pattern

Interestingly, no matter how complex a grid becomes, you can predict the state of each cell in the next timestep with the same rules.

With neural networks being very good prediction machines, the researchers wanted to find out whether deep learning models could learn the underlying rules of the Game of Life.

Artificial neural networks vs the Game of Life

There are a few reasons the Game of Life is an interesting experiment for neural networks. “We already know a solution,” Jacob Springer, a computer science student at Swarthmore College and co-author of the paper, told TechTalks. “We can write down by hand a neural network that implements the Game of Life, and therefore we can compare the learned solutions to our hand-crafted one. This is not the case in.”

It is also very easy to adjust the flexibility of the problem in the Game of Life by modifying the number of timesteps in the future the target deep learning model must predict.

Also, unlike domains such as computer vision or natural language processing, if a neural network has learned the rules of the Game of Life it will reach 100 percent accuracy. “There’s no ambiguity. If the network fails even once, then it is has not correctly learned the rules,” Springer says.

In their work, the researchers first created a small convolutional neural network and manually tuned its parameters to be able to predict the sequence of changes in the Game of Life’s grid cells. This proved that there’s a minimal neural network that can represent the rule of the Game of Life.

Then, they tried to see if the same neural network could reach optimal settings when trained from scratch. They initialized the parameters to random values and trained the neural network on 1 million randomly generated examples of the Game of Life. The only way the neural network could reach 100 percent accuracy would be to converge on the hand-crafted parameter values. This would imply that the AI model had managed to parameterize the rules underlying the Game of Life.

But in most cases the trained neural network did not find the optimal solution, and the performance of the network decreased even further as the number of steps increased. The result of training the neural network was largely affected by the chosen set training examples as well as the initial parameters.

Unfortunately, you never know what the initial weights of the neural network should be. The most common practice is to pick random values from a normal distribution, therefore settling on the right initial weights becomes a game of luck. As for the training dataset, in many cases, it isn’t clear which samples are the right ones, and in others, there’s not much of a choice.

“For many problems, you don’t have a lot of choice in dataset; you get the data that you can collect, so if there is a problem with your dataset, you may have trouble training the neural network,” Springer says.

The performance of larger neural networks

convolutional neural network game of life
Close

Please allow ads on our site

Please consider supporting us by disabling your ad blocker!