Giter VIP home page Giter VIP logo

feudalnets-pytorch's Introduction

FeUdal Networks for Hierarchical Reinforcement Learning

This repository implements the FuN architecture from Vezhnevets 2017 et al. It works out of the box with the current parameters for Breakout, and probably for most other Atari games too.

Logging is done in two ways: through the cli for basic episodic rewards, and through Tensorboard for a more detailed analysis.

Results

Results shown is for a single run of Pong for 13 million frames and BreakoutNoFrameskip-v4 for 100 million frames. It's quite expensive to run this model for multiple enviroments/seeds, so I am not planning to run additional experiments.

Dependencies

  • PyTorch v1.4.0
  • gym
  • python 3.6+

Usage

Run the following to train for 100 million frames on BreakoutNoFrameskip-v4: python main.py

If instead you would like to test it out on a non-pixel based task such as CartPole, you need to run

python main.py --mlp 1 --env-name CartPole-v0

And you probably want to adjust the number of max_frames.

You can use this repository however you like as long as you cite me somewhere.

Differences in implementation

I have tried to follow this implementation faithfully to the original paper, but there is a slight difference: this specific implementation uses A2C like n-step learning which makes it a bit trickier to time the detaching of LSTMs with the n-step update plus the end of an episode. In this case, we just detach the LSTMs after each n-step, with n=K from the original paper, set to a default value of 400.

Additionally, this implementation does not linearly anneal the learning rate, but instead keeps it as a constant. This might be why the performance for breakout is a bit off, but it could also be a wrong value for alpha, perhaps a higher/lower learning rate, perhaps the value for epsilon should be much higher or much lower.

feudalnets-pytorch's People

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.