This website is designed to teach a neural network to play the arcade game asteroids. 10 ships spawn in and gain points by staying alive, moving, and shooting asteroids, which break into smaller asteroids. The game restarts with new AI's after all ships are destroyed.
Run python -m SimpleHTTPServer
within the source folder.
Visit the page outputted. Add ?player=true
to play as the red fighter.
Asteroids are worth the same amount of points at all sizes.
Property | Value |
---|---|
Max Velocity | 220 |
Bullets cost the ship points when they hit nothing.
Property | Value |
---|---|
Speed | 600 |
The spaceship's brain has 8 input neurons, which recieve the distance to the closest asteroid in each direction.
The spaceship has 6 neurons in its hidden layer, and 4 in the output layer:
- accelerates when greater than 0.5 and coasts otherwise
- fires a bullet when greater than 0.5 and holds fire otherwise
- rotates the ship when greater than 0.5 and maintains orientation otherwise
- rotates left when greater than 0.5 and right otherwise
Spaceships are rewarded for moving, as it is sometimes to their advantage to stay put, but that behavior is boring.