Neural nets learn to play pong using the genetic algorithm.
SCREENSIZE
(tuple): The size of the screen (w,h)PADDLESIZE
(tuple): The default paddle dimensionsPLAYERSPEED
(number): The maximum speed the paddles can travel atHIDDENNODES
(int): The number of hidden nodes each player's neural net containsBALLRADIUS
(number): The radius of the ballsDEFAULT_BALLSPEED
(number): The base speed the balls start atDIFFICULTY_RATE
(number): The rate at which the ball speed increases each framePOPULATION_SIZE
(number): The size of the populationMUTATION_RATE
(number): The rate at which the organisms mutateFPS_CAP
(number): The maximum FPS to run at. -1 for no max
- Use
alt
to show the neural net of the winner of the previous generation - Use
shift
to kill every organism in the current generation - Hold
w
to only show the previous generation's best player