Git Product home page Git Product logo

curious-rl's Introduction

Curious RL

Re-implementation of the 2017 paper "Curiosity-driven Exploration by Self-supervised Prediction" by Deepak Pathak et al. (arXiv link). This was a class project for the course EE556 at University of Southern California.

Original imlementation by the author can be found here: https://github.com/pathak22/noreward-rl

In this implementation the ICM module is added to the A2C algorithm, instead of A3C in the original paper. Here curious agent solves environment "VizdoomMyWayHome-v0":

In under 100M frames the curious agent was able to solve "VizdoomMyWayHomeVerySparse-v0", which vanilla A2C fails to solve even after training on 500M frames.

If the hyperparameters are not right the curious agent can get stuck in funny local optima, e.g. in this case the learning rate of the predictive model was too low, and the agent was forever curious about this wall with the bright texture.

Installation

This repository uses pipenv, a tool that manages both virtualenvs and Python dependencies. Install it if you don't have it:

pip install pipenv

clone the repo and create a virtualenv with all the packages, activate the env:

git clone https://github.com/alex-petrenko/curious-rl.git
cd curious-rl
pipenv sync
pipenv shell

run tests:

python -m unittest

Experiments

Train curious agents in different environments. Use tensorboard to monitor the training process, stop when necessary:

python -m algorithms.curious_a2c.train_curious_a2c --env=doom_basic
python -m algorithms.curious_a2c.train_curious_a2c --env=doom_maze
python -m algorithms.curious_a2c.train_curious_a2c --env=doom_maze_sparse
python -m algorithms.curious_a2c.train_curious_a2c --env=doom_maze_very_sparse

tensorboard --logdir ./train_dir

The latest model will be saved periodically. After training to desired performance you can examine agent's behavior:

python -m algorithms.curious_a2c.enjoy_curious_a2c --env=doom_maze_sparse

It may take a long time to train the agent on mazes, be patient. The detailed PDF project report is available.

If you have any questions about this repo please feel free to reach me: [email protected]

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.