• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    Jupyter Notebook
  • Created over 7 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reinforcement Learning with Goals

Reinforcement Learning with Goals

This repo hosts the code associated with my O'Reilly article, "Reinforcement Learning for Various, Complex Goals, Using TensorFlow," published on DATE.

This the code in this repository contains implementations of Deep Q-Network, and Learning to Act by Predicting the Future.

Requirements and installation

In order to run this notebook, you'll need to install:

There are two easy ways to install these libraries and their dependencies:

Option A: use the provided Dockerfile configured for this notebook

  1. Download and unzip this entire repo from GitHub, either interactively, or by entering

    git clone https://github.com/awjuliani/dfp.git
  2. Open your terminal and use cd to navigate into the top directory of the repo on your machine

  3. To build the Dockerfile, enter

    docker build -t dfp_dockerfile -f dockerfile .

    If you get a permissions error on running this command, you may need to run it with sudo:

    sudo docker build -t dfp_dockerfile -f dockerfile .
  4. Run Docker from the Dockerfile you've just built

    docker run -it -p 8888:8888 -p 6006:6006 dfp_dockerfile bash

    or

    sudo docker run -it -p 8888:8888 -p 6006:6006 dfp_dockerfile bash

    if you run into permission problems.

  5. Launch Jupyter and Tensorboard both by using tmux

    tmux
    
    jupyter notebook

    CTL+B, C to open a new tmux window, then

    cd './dfp'
    tensorboard --logdir=worker_0:'./train_0',...worker_n:'./train_n'
    

    Where n depends on number of workers used in async training.

    Once both jupyter and tensorboard are running, using your browser, navigate to the URLs shown in the terminal output (usually http://localhost:8888/ for Jupyter Notebook and http://localhost:6006/ for Tensorboard)

Option B: install Anaconda Python, TensorFlow, and other requirements

NumPy can be tricky to install manually, so we recommend using the managed Anaconda Python distribution, which includes NumPy, Matplotlib, and Jupyter in a single installation. The Docker-based method above is much easier, but if you have a compatible NVIDIA GPU, manual installation makes it possible to use GPU acceleration to speed up training.

  1. Follow the installation instructions for Anaconda Python. We recommend using Python 3.6.

  2. Follow the platform-specific TensorFlow installation instructions. Be sure to follow the "Installing with Anaconda" process, and create a Conda environment named tensorflow.

  3. If you aren't still inside your Conda TensorFlow environment, enter it by typing

    source activate tensorflow
  4. Install other requirements by entering

    pip install requirements.txt
  5. Download and unzip this entire repo from GitHub, either interactively, or by entering

    git clone https://github.com/awjuliani/dfp.git
  6. Use cd to navigate into the top directory of the repo on your machine

  7. Launch Jupyter and Tensorboard both by using tmux

    tmux
    
    jupyter notebook

    CTL+B, C to open a new tmux window, then

    cd './dfp'
    tensorboard --logdir=worker_0:'./train_0',...worker_n:'./train_n'
    

    Where n depends on number of workers used in async training.

    Once both jupyter and tensorboard are running, using your browser, navigate to the URLs shown in the terminal output (usually http://localhost:8888/ for Jupyter Notebook and http://localhost:6006/ for Tensorboard)

More Repositories

1

DeepRL-Agents

A set of Deep Reinforcement Learning Agents implemented in Tensorflow.
Jupyter Notebook
2,231
star
2

TF-Tutorials

A collection of deep learning tutorials using Tensorflow and Python
Jupyter Notebook
523
star
3

Meta-RL

Implementation of Meta-RL A3C algorithm
Jupyter Notebook
401
star
4

oreilly-rl-tutorial

Contains Jupyter notebooks associated with the "Deep Reinforcement Learning Tutorial" tutorial given at the O'Reilly 2017 NYC AI Conference.
Jupyter Notebook
273
star
5

neuro-nav

A library for neuroscience-inspired navigation and decision making research.
Jupyter Notebook
198
star
6

Pix2Pix-Film

An implementation of Pix2Pix in Tensorflow for use with frames from films
Jupyter Notebook
165
star
7

pytorch-diffusion

A basic PyTorch implementation of 'Denoising Diffusion Probabilistic Models'
Python
161
star
8

sound-cnn

A convolutional neural network that classifies sounds
Python
159
star
9

3D-TSNE

A Unity project for visualizing t-SNE data in 3D.
C#
73
star
10

RL-CC

Web-based Reinforcement Learning Control Center
Jupyter Notebook
64
star
11

successor_examples

Tutorials on learning and using successor representations.
Jupyter Notebook
49
star
12

ML-Tools

Variety of machine learning algorithms written in python
Python
42
star
13

DNN-Sentiment

Convolutional and recurrent deep neural networks for text sentiment analysis.
Python
32
star
14

NeuralDreamVideos

A deep learning model for creating video sequences
Jupyter Notebook
24
star
15

cognition-course

Slides used in Cognitive Psychology course taught during summer 2015 at the University of Oregon
6
star
16

synescape

Sound visualization app for musicians and music fans.
C#
5
star
17

interaction-grounded-learning

A simple PyTorch implementation of the ideas presented in the paper Interaction Grounded Learning (IGL) from Xie et al., 2021.
Jupyter Notebook
4
star
18

serotonin-ebm

Python
1
star