Skip to content

spaceuniverse/DRL-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DRL

DRL is an implementation of the deep reinforcement learning algorithm, described in Playing Atari with Deep Reinforcement Learning paper by DeepMind.

The DRL project is based on the TNNF - Tiny Neural Net Framework, which uses Theano library for GPU computing. Despite the fact that DRL shows better performance on GPU rather than on CPU, it can be launched on CPU (but for learning purposes such approach is not recommended due to low learning speed).

DRL was tested on Ubuntu 14.04 and CentOS 7 on GPU and CPU (for CPU - only playback).

Games: Breakout (video) and Space Invaders

Installation

To install DRL on Ubuntu, please, perform the next steps:

sudo apt-get install python-pil python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git libsdl1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev python-matplotlib libyaml-dev
sudo pip install -U numpy
sudo pip install -U pillow==2.7.0
sudo pip install Theano

Now install pylearn2:

cd ~/ # Or any other directory where you want the pylearn2 project to be stored
git clone https://github.com/lisa-lab/pylearn2.git
cd ./pylearn2
sudo python setup.py develop
sudo chown -R $USER ~/.theano # to run the demo without sudo

To install CUDA, please, follow the instructions on the CUDA installation webpage.

Then navigate to the DRL directory and run:

cd DRL
bash ./install.sh

To launch the learning process, run the following command from src directory:

bash gpuRun.sh main_exp.py

Trying other ROMs

First

To change the game for DRL Agent training, navigate to src\DRL-master\src\ale directory and open ale.py on editing Change destination "*.bin" for def init(ale_game_ROM) (default is '../emulators/ale_0_4/roms/breakout.bin', Example: '../emulators/ale_0_4/roms/all/space_invaders.bin')

Next

Navigate to *src\DRL-master\src* directory and open play.py on editing. Change the Model to be used by changing self.n_net.loadModel in def init(self). (Example: Change ('./models/AS.model.weights.NN.NMem.1') to ('./models/AS.model.weights.NN.NMem.2'), You may also change the path here if needed)

Attention! For Space Invaders Game change ale(frames_to_skip) to 5 (instead of 6) in play.py , main_exp.py and human_play.py files.

For the detailed instructions and descriptions, please, navigate to the DRL website and download the project documentation.

About

Deep Reinforcement Learning Agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.1%
  • Prolog 17.6%
  • TeX 6.2%
  • Python 4.5%
  • C 4.4%
  • Makefile 2.2%