Giter Club home page Giter Club logo

drl's Introduction

DRL

This repo is a fork of original repo, copied for experiments. All actual development is going in original repo (Soft Serve SAG / 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.

drl's People

Contributors

spaceuniverse avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.