Skip to content

Software Description

Tønnes edited this page May 14, 2018 · 1 revision

The software

Pong

The first part of the software, is a pong game. The pong game is just a basic implementation of the classic pong game. Where you bounce a ball with a paddle from left to right, right to left.

Pong with Neural Network

Pong

Neural Network

The second part is a implementation of Neuroph's multilayer perceptron neural network. This neural network, learns and plays the game at a almost too high rate.

Live View

The third and final part of the software handels the second frame. The live view frame. It's implementet so that the user can see what inputs the neural network get, and what outputs it generates. Albeit it's might be a bit hard to read, because it updates every 15 millisecond...

Live view

Live view

Class description

Description of the different classes used by the program.

Package Class Description
Pongnnreborn Pong Main class, handels the pong aspect of the program.
Pongnnreborn Paddle Creates "Paddle" objects used in the pong game.
Pongnnreborn Ball Creates a "Ball" object used in the game. In addition to gathering data for NN.
Pongnnreborn Rendering Renders the Pong frame.
Neural_Network Neural_Network Neural Network class. Creates, learns, and uses the neural network to play pong.
Neural_Network Neural_View Handles the Neural network live view frame.
Neural_Network Neural_View_Rendering Renders the live view frame.

Architecture

For more information about the architecture of the software, check out the wiki.

Versioning

Current version: 2.1.2

Checkout the wiki for changelogs: wiki

We use SemVer for versioning.

The Neural Network

Data

Inputs:

1. Paddle1.y: Y cordinates of the paddle.
2. Ball.y: Y cordinates of the ball.
3. Desired Output: 0, 0.5, or 1. Created by checking if the ball is above, below, or at the paddle position. 

Outputs:

1. Output 1: Number beetwen 0-1. Uses to see if the neural network needs to go up or down.