Program that learns to play OpenAI Gym games using a TFLearn Neural Network in Python
The goal in making general game playing algorithms is to
create a program that is able to successfully learn to play
as many different kinds of games as possible. My approach is
modeled after one published by sentdex (linked below). On a
general level, it plays a large number of random games. From
this population, it uses data from games that meets a
certain score threshold to create a neural network that maps
attributes of the current environment (ie user position,
pole angle, cart velocity, etc) to the expected value of
possible moves (ie move right, move left, etc).
The gifs below are screencaptures of sample runs of an agent
playing different games with random moves (left side) vs a
trained neural network agent playing the same games (right
side). The pictures following those gifs show the scores of
sample runs of a trained neural network agent. The first
(left) is from CartPole with possible scores ranging from 0
(worst) to 500 (best). Next (middle) is MountainCar, -500
(worst) to 0 (best). Finally (right) Acrobot, -500 (worst) to
0 (best).
Further details including my initial goal for the project,
stumbling points, shortcomings and successes are provided in
my project write-up (linked below). Apologies for the chaos
and general messiness of this site, it was all thrown together
on limited time and webdev experience!
Goal: Balance stick on cart for as long as possible
Goal: Get car to top of hill as quickly as possible
Goal: Raise robotic arm to threshold elevation as quickly as possible