Skip to content

Atari games learning using reinforcement learning in Python

License

Notifications You must be signed in to change notification settings

johnygomez/AtariRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atari Reinforcement Learning

Aim of this project is to implement simple learning mechanism for Atari 2600 games on ALE Platform (Arcade Learning Environment). As a reinforcement learning technique we use NFQ Learning (see next).

Main Principles of learning:

  • First of all, input image of a game is read by ALE interface (lib/ImgProc)
  • The input image is encoded using Autoencoder in lib/Autoencoder/Encoder.py
  • The extracted features from encoder (and also reward, action selected.. = transition data) are pushed into the NFQ module which saves these transition as a training data for Neural Network learning
  • When enough training data are acquired, the NFQ trains the Q-function, which is used as a predictor of the most suitable move

Find out more about NFQ at link.

Dependencies

Quick Start

make init

which installs all dependencies

cd example/
python PongAgent.py

Pong game example

To run a simple game example, you first need to get a game binary (you can find one in example/ folder). The next step is to train the encoder lib/Autoencoder/Encoder.py for your game using train method. When the encoder is train well enough, you can use this pre-trained NN within initialization of AleAgent after the first required parameter, which is the Game ROM. AleAgent contains 2 more methods, which are train() and play() which first train the Q-function for prediction and then, can play the game using trained network.

About

Atari games learning using reinforcement learning in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published