Click the green flag, and just watch the neural network learn the best way to insure that the green ball DOES NOT touch the bottom. Hooray! For all of you nerds I have comments in the code explaining how everything works!
↓ ↓ Read in case you don't know how this works ↓ ↓ _____________________________________________ A neural network works by giving the input layer a bunch of information about its environment. The input layer passes the information down to a hidden layer (this one has 1 hidden layer, some have multiple), and the hidden layer(s) compute (think) about what the information means, what to do about it, etc. Once the "thinking" process is done, the hidden layer(s) pass down their processed data to the output layer, which is basically what the neural network's choices (Psst... this neural network has 2 inputs: the x and y difference between the paddle and the ball. It has 1 hidden layer with 3 nodes. Finally, it has 2 outputs, one is to go left and the other is to go right.)