Giter Club home page Giter Club logo

sgm's Introduction

Sparse Graphical Memory (SGM)

Sparse Graphical Memory (SGM) is a data structure for reinforcement-learning agents to solve long-horizon, sparse-reward navigation tasks. This codebase is a TensorFlow implementation of SGM accompanying the paper Sparse Graphical Memory for Robust Planning.

To install:

  1. Create a new conda environment: conda create -n sgm python=3.6
  2. Activate the conda environment: conda activate sgm
  3. Install the requirements: pip install -r requirements.txt
  4. Install the package: pip install -e .

To launch the experiments:

  1. To launch SGM experiments, run all the cells in notebooks/SGM in Thinned FourRooms.ipynb
  2. To launch SoRB experiments, run all the cells in notebooks/SoRB in Thinned FourRooms.ipynb

To visualize the results:

  1. Call sgm/plot.py with the directories of the logs produced by the experiments followed by the --returns_v_cleanup_steps flag, e.g., python sgm/plot.py logs/thinned_fourrooms_sgm logs/thinned_fourrooms_sorb --returns_v_cleanup_steps
  2. Find the visualized results in the plots directory, e.g., in plots/returns_v_cleanup_steps

Commands you may find useful

Enable rendering of environments when there is no display, e.g., on a server: xvfb-run -s "-screen 0 1400x900x24" jupyter notebook https://stackoverflow.com/questions/40195740/how-to-run-openai-gym-render-over-a-server

Create tunnel from local machine to remote machine: ssh -N -f -L localhost:8888:localhost:8888 [email protected]

Run Jupyter notebook with no time limit on cell execution and replace the notebook's contents with the new output: jupyter nbconvert --ExecutePreprocessor.timeout=-1 --execute --to notebook --inplace <notebook.ipynb> https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal

Credits

This code was built upon the code released by Eysenbach et al. under the Apache License, Version 2.0.

Reference

@inproceedings{laskin2020sparse,
  Author = {Emmons, Scott and Jain, Ajay and
  Laskin, Michael and Kurutach, Thanard
  and Abbeel, Pieter and Pathak, Deepak},
  Title = {Sparse Graphical Memory
  for Robust Planning},
  Booktitle = {Neural Information Processing
  Systems},
  Year = {2020}
}

sgm's People

Contributors

scottemmons avatar

Watchers

 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.