Artificial Intelligence: Reinforcement Learning in Python

Complete guide to artificial intelligence and machine learning, prep for deep reinforcement learning

Register for this Course

$19.00 $180.00 USD 89% OFF!

Login or signup to register for this course

Have a coupon? Click here.

Course Data

Lectures: 98
Length: 09h 48m
Skill Level: All Levels
Languages: English
Includes: Lifetime access, 30-day money back guarantee

Course Description

When people talk about artificial intelligence, they usually don’t mean supervised and unsupervised machine learning.

These tasks are pretty trivial compared to what we think of AIs doing - playing chess and Go, driving cars, and beating video games at a superhuman level.

Reinforcement learning has recently become popular for doing all of that and more.

Much like deep learning, a lot of the theory was discovered in the 70s and 80s but it hasn’t been until recently that we’ve been able to observe first hand the amazing results that are possible.

In 2016 we saw Google’s AlphaGo beat the world Champion in Go.

We saw AIs playing video games like Doom and Super Mario.

Self-driving cars have started driving on real roads with other drivers and even carrying passengers (Uber), all without human assistance.

If that sounds amazing, brace yourself for the future because the law of accelerating returns dictates that this progress is only going to continue to increase exponentially.

Learning about supervised and unsupervised machine learning is no small feat. To date I have over SIXTEEN (16!) courses just on those topics alone.

And yet reinforcement learning opens up a whole new world. As you’ll learn in this course, the reinforcement learning paradigm is more different from supervised and unsupervised learning than they are from each other.

It’s led to new and amazing insights both in behavioral psychology and neuroscience. As you’ll learn in this course, there are many analogous processes when it comes to teaching an agent and teaching an animal or even a human. It’s the closest thing we have so far to a true general artificial intelligence.

What’s covered in this course?

  • The multi-armed bandit problem and the explore-exploit dilemma
  • Ways to calculate means and moving averages and their relationship to stochastic gradient descent
  • Markov Decision Processes (MDPs)
  • Dynamic Programming
  • Monte Carlo
  • Temporal Difference (TD) Learning
  • Approximation Methods (i.e. how to plug in a deep neural network or other differentiable model into your RL algorithm)
  • Project: Apply Q-Learning to build a stock trading bot

If you’re ready to take on a brand new challenge, and learn about AI techniques that you’ve never seen before in traditional supervised machine learning, unsupervised machine learning, or even deep learning, then this course is for you.

See you in class!

Suggested Prerequisites:

  • calculus
  • object-oriented programming
  • probability
  • Python coding: if/else, loops, lists, dicts, sets
  • Numpy coding: matrix and vector operations, loading a CSV file
  • linear regression
  • gradient descent



  1. Introduction (03:14) (FREE preview available)
  2. Where to get the Code (02:41)
  3. Strategy for Passing the Course (05:56)

High Level Overview of Reinforcement Learning and Course Outline

  1. What is Reinforcement Learning? (08:09)
  2. On Unusual or Unexpected Strategies of RL (06:10)
  3. Course Outline (04:43)
  4. Defining Some Terms (07:02)

Return of the Multi-Armed Bandit

  1. Problem Setup and The Explore-Exploit Dilemma (03:55)
  2. Applications of the Explore-Exploit Dilemma (08:00)
  3. Epsilon-Greedy (01:48)
  4. Updating a Sample Mean (01:22)
  5. Designing Your Bandit Program (04:09)
  6. Comparing Different Epsilons (04:06)
  7. Optimistic Initial Values (02:56)
  8. UCB1 (04:56)
  9. Bayesian / Thompson Sampling (09:52)
  10. Thompson Sampling vs. Epsilon-Greedy vs. Optimistic Initial Values vs. UCB1 (05:11)
  11. Nonstationary Bandits (04:51)
  12. Bandit Summary, Real Data, and Online Learning (06:29)

Build an Intelligent Tic-Tac-Toe Agent

  1. Naive Solution to Tic-Tac-Toe (03:50)
  2. Components of a Reinforcement Learning System (08:00)
  3. Notes on Assigning Rewards (02:41)
  4. The Value Function and Your First Reinforcement Learning Algorithm (16:33)
  5. Tic Tac Toe Code: Outline (03:16)
  6. Tic Tac Toe Code: Representing States (02:56)
  7. Tic Tac Toe Code: Enumerating States Recursively (06:14)
  8. Tic Tac Toe Code: The Environment (06:36)
  9. Tic Tac Toe Code: The Agent (05:48)
  10. Tic Tac Toe Code: Main Loop and Demo (06:02)
  11. Tic Tac Toe Summary (05:25)
  12. Tic Tac Toe: Exercise (03:20)

Markov Decision Proccesses

  1. Gridworld (02:13)
  2. The Markov Property (04:36)
  3. Defining and Formalizing the MDP (04:10)
  4. Future Rewards (03:16)
  5. Value Function Introduction (12:03)
  6. Value Functions (09:15)
  7. Bellman Examples (22:24)
  8. Optimal Policy and Optimal Value Function (04:09)
  9. MDP Summary (01:35)

Dynamic Programming

  1. Intro to Dynamic Programming and Iterative Policy Evaluation (03:06)
  2. Gridworld in Code (05:47)
  3. Designing Your RL Program (05:00)
  4. Iterative Policy Evaluation in Code (06:24)
  5. Policy Improvement (02:51)
  6. Policy Iteration (02:00)
  7. Policy Iteration in Code (03:46)
  8. Policy Iteration in Windy Gridworld (04:57)
  9. Value Iteration (03:58)
  10. Value Iteration in Code (02:14)
  11. Dynamic Programming Summary (05:14)

Monte Carlo

  1. Monte Carlo Intro (03:10)
  2. Monte Carlo Policy Evaluation (05:45)
  3. Monte Carlo Policy Evaluation in Code (03:35)
  4. Policy Evaluation in Windy Gridworld (03:38)
  5. Monte Carlo Control (05:59)
  6. Monte Carlo Control in Code (04:04)
  7. Monte Carlo Control without Exploring Starts (02:58)
  8. Monte Carlo Control without Exploring Starts in Code (02:51)
  9. Monte Carlo Summary (03:42)

Temporal Difference Learning

  1. Temporal Difference Intro (01:42)
  2. TD(0) Prediction (03:46)
  3. TD(0) Prediction in Code (02:27)
  4. SARSA (05:15)
  5. SARSA in Code (03:38)
  6. Q Learning (03:05)
  7. Q Learning in Code (02:13)
  8. TD Summary (02:34)

Approximation Methods

  1. Approximation Intro (04:11)
  2. Linear Models for Reinforcement Learning (04:16)
  3. Features (04:02)
  4. Monte Carlo Prediction with Approximation (01:54)
  5. Monte Carlo Prediction with Approximation in Code (02:58)
  6. TD(0) Semi-Gradient Prediction (04:22)
  7. Semi-Gradient SARSA (03:08)
  8. Semi-Gradient SARSA in Code (04:08)
  9. Course Summary and Next Steps (08:38)

Stock Trading Project with Reinforcement Learning

  1. Stock Trading Project Section Introduction (05:13)
  2. Data and Environment (12:22)
  3. How to Model Q for Q-Learning (09:37)
  4. Design of the Program (06:45)
  5. Code pt 1 (07:59)
  6. Code pt 2 (09:40)
  7. Code pt 3 (04:28)
  8. Code pt 4 (07:16)
  9. Stock Trading Project Discussion (03:37)


  1. What is the Appendix? (02:48)
  2. Windows-Focused Environment Setup 2018 (20:20)
  3. How to install Numpy, Scipy, Matplotlib, Pandas, IPython, Theano, and TensorFlow (17:22)
  4. Is this for Beginners or Experts? Academic or Practical? Fast or slow-paced? (22:04)
  5. How to Code Yourself (part 1) (15:54)
  6. How to Code Yourself (part 2) (09:23)
  7. Proof that using Jupyter Notebook is the same as not using it (12:29)
  8. What order should I take your courses in? (part 1) (11:18)
  9. What order should I take your courses in? (part 2) (16:07)
  10. Python 2 vs Python 3 (04:38)
  11. How to Succeed in this Course (Long Version) (10:24)
  12. Where to get discount coupons and FREE deep learning material (05:31)