Asteroids

Asteroids is a space-themed multidirectional shooter arcade game where the player controls a single spaceship in an asteroid field which is periodically traversed by flying saucers. The object of the game is to shoot and destroy the asteroids and saucers, while not colliding with either. Though in this case the saucer is omitted.


Each spaceship contains a unique brain called a Neural Network which takes a predetermined series of inputs and processes them to obtain a series of outputs. The values of these outputs determine which of these four actions the spaceship takes: move forward, turn left, turn right or shoot.


Based on each spaceship's performance each game, the top performers are selected and reproduced in a process that is based off of real life evolution called Neuroevolution. Each top performer produces offspring with minor mutations in their "genetic" code. Because these mutations are random, they are mostly bad and can lead to offspring performing worse. However, with a large enough population, every once in a while a good mutation will occur, which will result in that network becoming dominant and produce offspring of their own.


This app has 3 sections:

  1. Evolution - This is where you can watch the Neural Networks train and evolve. I would recommend fast-forwarding through at least the first few generations and then using the replay section to view the top performers. Because the mutations are random and can have effects ranging from catastrophically bad to a mild improvement, you can basically ignore everything except the top performers. It also shows some statistics about the current evolutionary state of the population.
  2. Replay - This is where you go to choose a replay to watch. You can choose the top performer based on either their game score, or their fitness score (a background calculation that can be changed in settings). Use the charts to see which generations did well and seem interesting.
  3. Settings - There are a number of settings here that can alter the way the neural network evolves. Change a few settings around and see what happens! You can also disable the view of the Neural Network and Sensors here.

Evolution

The Neural Networks of the spaceships are categorized into a number of species which help protect innovative mutations and give them time to reach their full potential. A combination of factors such as how many of nodes they have in common, how the nodes are connected and the strength of those connections help determine how different networks are from each other. The threshold where networks are considered different species is known as the Compatibility Threshold. Here it auto adjusts to maintain between 3 and 20 species.

When an entire population of spaceships have completed their games and reproduced, they have completed a single generation. As more generations take place, the Neural Networks will grow to be more complex and are able to produce more sophisticated behaviors.

Replays

Use this replay feature to observe the behaviour of the top performing networks for each generation.

Type:

Settings