TensorFlow experiment trying to teach AI to play a simple game.
Video of 40 minutes of training data playing the game
Blog post explaining the experiment
After tinkering with python environment, you should run Endless Flighter game in your browser. Make an setup, in which you can position the game in the same exact location of the screen, as this uses screen capture.
Then adjust these (collect_data.py and run_model.py):
screen = np.array(ImageGrab.grab(bbox=(20,220, 420, 450)))
to match your environment.
Note: keyboard capturing probably works only on OS X.
collect_data.py
balance_the_data.py
train_model.py
run_model.py
and set focus to browser running the gameThis experiment is based mostly on excellent Python Plays: Grand Theft Auto V video series.