https://www.opendatascience.com/blog/learning-reinforcement-learning-with-code-exercises-and-solutions/?utm_source=Open+Data+Science+Newsletter&utm_campaign=63677c26f2-EMAIL_CAMPAIGN_2016_12_13&utm_medium=email&utm_term=0_2ea92bb125-63677c26f2-245860601



Open Data Science
Toggle navigation
Learning Reinforcement Learning (With Code, Exercises and Solutions)


By Denny Britz, Deep Learning Specialist - Google Brain | 12/14/2016
Tags: Algorithms

Skip all the talk and go directly to the Github Repo with code and exercises.

WHY STUDY REINFORCEMENT LEARNING

Reinforcement Learning is one of the fields I’m most excited about. Over the past few years amazing results like learning to play Atari Games from raw pixels and Mastering the Game of Go have gotten a lot of attention, but RL is also widely used in Robotics, Image Processing and Natural Language Processing.

Combining Reinforcement Learning and Deep Learning techniques works extremely well. Both fields heavily influence each other. On the Reinforcement Learning side Deep Neural Networks are used as function approximators to learn good representations, e.g. to process Atari game images or to understand the board state of Go. In the other direction, RL techniques are making their way into supervised problems usually tackled by Deep Learning. For example, RL techniques are used to implement attention mechanisms in image processing, or to optimize long-term rewards in conversational interfaces and neural translation systems. Finally, as Reinforcement Learning is concerned with making optimal decisions it has some extremely interesting parallels to human Psychology and Neuroscience (and many other fields).

With lots of open problems and opportunities for fundamental research I think we’ll be seeing multiple Reinforcement Learning breakthroughs in the coming years. And what could be more fun than teaching machines to play Starcraft and Doom?

HOW TO STUDY REINFORCEMENT LEARNING

There are many excellent Reinforcement Learning resources out there. Two I recommend the most are:

David Silver’s Reinforcement Learning Course
Richard Sutton’s & Andrew Barto’s Reinforcement Learning: An Introduction (2nd Edition) book.
The latter is still work in progress but it’s ~80% complete. The course is based on the book so the two work quite well together. In fact, these two cover almost everything you need to know to understand most of the recent research papers. The prerequisites are basic Math and some knowledge of Machine Learning.

That covers the theory. But what about practical resources? What about actually implementing the algorithms that are covered in the book/course? That’s where this post and the Github repository comes in. I’ve tried to implement most of the standard Reinforcement Algorithms using Python, OpenAI Gym and Tensorflow. I separated them into chapters (with brief summaries) and exercises and solutions so that you can use them to supplement the theoretical material above. All of this is in the Github repository.

Some of the more time-intensive algorithms are still work in progress, so feel free to contribute. I’ll update this post as I implement them.

TABLE OF CONTENTS

Introduction to RL problems, OpenAI gym
MDPs and Bellman Equations
Dynamic Programming: Model-Based RL, Policy Iteration and Value Iteration
Monte Carlo Model-Free Prediction & Control
Temporal Difference Model-Free Prediction & Control
Function Approximation
Deep Q Learning (WIP)
Policy Gradient Methods (WIP)
Learning and Planning (WIP)
Exploration and Exploitation (WIP)
LIST OF IMPLEMENTED ALGORITHMS

Dynamic Programming Policy Evaluation
Dynamic Programming Policy Iteration
Dynamic Programming Value Iteration
Monte Carlo Prediction
Monte Carlo Control with Epsilon-Greedy Policies
Monte Carlo Off-Policy Control with Importance Sampling
SARSA (On Policy TD Learning)
Q-Learning (Off Policy TD Learning)
Q-Learning with Linear Function Approximation
Deep Q-Learning for Atari Games
Double Deep-Q Learning for Atari Games
Deep Q-Learning with Prioritized Experience Replay (WIP)
Policy Gradient: REINFORCE with Baseline
Policy Gradient: Actor Critic with Baseline
Policy Gradient: Actor Critic with Baseline for Continuous Action Spaces
Deterministic Policy Gradients for Continuous Action Spaces (WIP)
Deep Deterministic Policy Gradients (DDPG) (WIP)
Asynchronous Advantage Actor Critic (A3C) (WIP)
Originally posted at www.wildml.com/

WHAT IS OPEN DATA SCIENCE?

Username *

Email *

Password *

Repeat Password *
Get Newsletter & Full Access
 
LATEST POSTS
Scikit-learn Tutorial: Statistical-Learning for Scientific Data Processing
12/14/2016

Learning Reinforcement Learning (With Code, Exercises and Solutions)
12/14/2016

Visualizing the Relationship Between Infant Mortality Rates & Resource Availability
12/14/2016

 
POPULAR POSTS
Riding on Large Data with Scikit-learn
   9997 views

R or Python for data science?
   9841 views

huh Understanding Convolutional Neural Networks for NLP
   9252 views

RELATED POSTS
Introducing Dask distributed #1
09/13/2016

An Introduction to Contextual Bandits
09/06/2016

Jester Dataset: What make’s You laugh?
08/09/2016

Topnotch Theano Tutorial
02/05/2016

Single-Layer Neural Networks and Gradient Descent
09/10/2016

Ad Hoc Distributed Random Forests
09/17/2016

R-BLOGS
New Course: Data Visualization in R
Posted 14 December 2016 | 6:59 pm
R Jobs for R users – 17 jobs from around the world (2016-12-14)
Posted 14 December 2016 | 6:57 pm
One Page R: A Survival Guide to Data Science with R
Posted 14 December 2016 | 5:44 pm
Visualizing taxi trips between NYC neighborhoods with Spark and Microsoft R Server
Posted 14 December 2016 | 5:40 pm
Hierarchical Clustering exercises (beginner)
Posted 14 December 2016 | 5:00 pm
TAGS
Artificial Intelligence
Cyber Security
Analytics
Sports Analytics
Notebooks
Open Source
ipython
Anomaly Detection
Data Journalism
Computer Vision
Data Science Careers
Julia
ODSC London 2016
Data Science Jobs
Pandas
Open Data Science
Tutorial
Interview
Natural Language Processing
Politics
statistics
Meetup
NLP
Data Science for Good
Jupyter
Spark
Bayes
Data Mining
AI
Algorithms
Data analysis
IoT
Predictive Analytics
Intro
BDF 2015
Deep Learning
Scikit-learn
Open Data
Data Visualization
Neural Networks
Big Data
Speaker Talk
R
ODSC East 2016
ODSC West 2015
Speaker Slides
Python
Data Science
Machine Learning
ODSC East 2015
Copyright © 2016 Open Data Science. All rights reserved.
Privacy-policy
Code of conduct
FOLLOW US:
Posted by uniqueone
,