
Explore reinforcement learning fundamentals and practical policy gradient and actor-critic methods, from Monte Carlo and temporal difference learning to deep reinforcement learning, with real-world robotic and artificial intelligence applications.
Set up python 3 environments and master core language features, then implement deep reinforcement learning with pytorch, numpy, and gym, while understanding calculus basics and gpu hardware requirements.
Prepare for a challenging modern reinforcement learning course by coding deeply, using forums for help, tracing issues to small lines, and studying PyTorch basics, pseudocode, naming, and documentation.
Explore the fundamentals of reinforcement learning, including agents, environments, states, actions, rewards, value functions, Monte Carlo methods, and the Bellman equations governing policy evaluation.
Explore Monte Carlo prediction in blackjack to estimate optimal value functions and policies. Apply first-visit returns and generalized policy iteration for policy evaluation and improvement.
Learn how to solve reinforcement learning control problems using first-visit Monte Carlo with action-value Q in blackjack, employing exploring starts and epsilon-soft policies to improve a stochastic policy.
Explore temporal difference learning, a bootstrapped online model-free method that updates value estimates at each time step, bridging Monte Carlo and dynamic programming for prediction and control.
Explore TD(0) prediction on the cart-pole balance task by discretizing a continuous state space into buckets, evaluating a two-action policy, and updating the value function with alpha and gamma.
Explore Q-learning as an off-policy, model-free method for solving control problems, using epsilon-greedy exploration and a q-value update to approximate the state-action value function for cart-pole.
Explore policy gradient methods that directly parameterize the agent’s policy with a neural network, maximizing performance via gradient ascent. They enable learning in continuous action spaces and outperform value-based methods.
Apply the reinforce policy gradient algorithm to update a neural network policy using Monte Carlo returns and the gradient of the log policy with PyTorch.
Explore the lunar lander environment in OpenAI Gym, where a random agent earns rewards for landing and touching down, with penalties for using the main engine.
Code a policy network for a reinforcement learning agent using PyTorch, with input layer, 128-neuron hidden layer, an output layer sized to actions, Relu activations, and Adam optimizer on GPU.
Implement the policy gradient agent's basic functionality by building the initializer, the choose action function, and reward memory using a policy network, gamma, log probabilities, softmax, and PyTorch's categorical distribution.
Implement the agent's learn function to compute discounted returns for each time step, form the loss as returns times log-probabilities, and update the policy network using PyTorch gradients.
Code the policy gradient main loop with a deep neural network to model the agent's policy, update parameters via returns, and analyze lunar lander episode learning curves.
Combine policy gradients with temporal difference learning to form actor-critic learning, using a shared neural network with actor and critic outputs to bootstrap value estimates.
Design and implement an actor-critic network in torch, with two hidden layers (256, 256), separate policy and value outputs, using an optimizer and device placement.
Code the actor-critic agent to select actions and learn from experiences using single-step temporal-difference updates in PyTorch. Leverage softmax action selection, log probability, and gamma-driven learning in a memory-free setup.
Instantiate and train an actor-critic agent in an OpenAI gym environment, tuning the learning rate and layer sizes to observe learning curves and potential performance cliffs after about 2000 games.
Explore deep q-learning, a value-based off-policy method using replay memory and a target network to stabilize learning with deep networks in discrete action spaces, noting limits for continuous actions.
Adopt a fast, implement-first strategy for reading deep reinforcement learning papers, skim the abstract and introduction, then translate architecture and algorithmic details into code.
The ddpg approach extends deep q-learning to continuous action spaces with a model-free off-policy actor-critic algorithm that uses deterministic policy gradients, replay memory, and a target network.
Analyze the mathematical background of actor-critic reinforcement learning, covering MDPs, off-policy model-free learning, deterministic versus stochastic policies, bellman equations, and deep Q-learning with replay buffers and target networks.
Learn the algorithmic implementation of deep deterministic policy gradients for continuous actions using actor-critic methods, with replay buffers, soft target networks, batch normalization, and Ornstein-Uhlenbeck noise.
Analyze results of deep deterministic policy gradient across low- and high-dimensional inputs, showing target networks and batch normalization improve robust policy learning.
Survey reinforcement learning beyond actor-critic, including deterministic policy gradient with tile coding, linear function approximators, replay buffers, SVG zero, and guided policy search.
Initialize actor and critic networks with their target networks and a replay buffer, use Ornstein-Uhlenbeck noise for exploration, sample minibatches, and update actor and critic with soft target updates.
Implement Ornstein-Uhlenbeck noise for exploration in actor-critic agents using a numpy class. Include mu, sigma, theta, dt, x_naught, reset, and a __call__ method for temporally correlated samples in OpenAI baselines.
Design a fixed-size replay memory buffer that overwrites the oldest memories. Sample uniformly, initialize the buffer, and store transitions with numpy arrays, not tied to PyTorch.
Code the critic network class for deep q learning in actor-critic methods, highlighting a two-hidden-layer model. Configure state input from start and action input to the second layer, with checkpoints.
Learn to code the actor network for reinforcement learning, featuring two hidden layers with relu, a tanh output, layer normalization, and checkpointing with an adam optimizer at 1e-4.
Develop the ddpg agent's basic functions: initialize actor and critic with target networks, implement action selection with noise, store memories, and save/load checkpoints with hard target updates.
Code the DDPG agent's learning function by uniformly sampling the replay memory, computing target y values with the target networks, and optimizing the critic and actor losses.
Code the soft update for actor and critic networks in a deep reinforcement learning agent, syncing target networks with tau, handling named parameters, state dictionaries, and initialization.
Code the main loop to run 1000 games of Lunar Lander with a DDPG agent, resetting noise each episode and plotting a learning curve averaged over the last 100 games.
The lecture highlights overestimation bias in actor-critic methods and how deep neural network approximations introduce accumulating variance that overvalues states, emphasizing core concepts, data structures, and implementable algorithms.
Analyze the TD3 abstract and introduction to reveal how overestimation bias arises in value estimates and how two independent critics, target networks, and delayed policy updates reduce it.
Explore estimation errors in function approximation, focusing on overestimation bias and high variance, and survey remedies like double Q-learning, target networks, and averaging value estimates within an actor-critic framework.
Explore how overestimation bias arises in actor-critic methods with function approximation, and how clipped double Q-learning with two critics and a single actor reduces bias and stabilizes learning.
Tackle variance in actor-critic learning by employing slowly changing target networks, delayed policy updates, and target policy smoothing with noise to stabilize value estimates.
Td3 extends ddpg with two critics, target policy smoothing, and delayed actor updates, training via a replay buffer with exploration noise and outperforming ddpg, ppo, sac, and trpo.
Code a td3 agent with an actor and two critics, plus target networks, replay buffer, and exploration noise, including action clamping and warm-up handling.
Code the TD3 agent's learn function by sampling memory, computing y_i from r_i and gamma with the min of two target critics, using clipped actions and noise.
Implement a soft target update for the actor and two critics using tau to blend online and target weights, with initialization handling and dict-based named-parameter updates.
Code the main loop to train a reinforcement learning agent using the bipedal walker environment, track scores, plot the learning curve, and save the best model across 1500 episodes.
Explore a stochastic actor algorithm for continuous action spaces, building on ideas from Ddpg and Td3. Highlight soft actor critic with maximum entropy to reduce hyperparameter tuning and improve stability.
Explore a new off-policy maximum entropy actor-critic framework, SAC, that boosts exploration and stability for continuous control tasks with sample-efficient learning.
Explore the actor-critic architecture with three networks—actor, critic, and value—off-policy replay, and entropy maximization to boost stability and exploration, comparing ddpg and soft actor critic approaches.
Introduce an entropy-augmented objective for soft actor-critic learning, scaling rewards by 1/alpha to promote stochastic policies and exploration in a replay-based, off-policy framework.
Explore the soft actor-critic algorithm, deriving from maximum entropy policy iteration, with soft evaluation and improvement, dual critics, reparameterization, and a Gaussian policy for continuous actions.
Compare the soft actor critic against other algorithms across OpenAI Gym and humanoid environments to assess sample complexity and stability, highlighting entropy-driven stochastic policy and reward scaling.
Code three neural networks for an actor-critic agent: value function V, critic Q, and policy pi. Incorporate a replay buffer, tanh-bound actions, and the reparameterization trick with PyTorch normal distributions.
Code the soft actor critic basic functionality by implementing the agent initializer, choose action function, memory storage, and network parameter updates for value, target value, two critics, and the actor.
Develop the soft actor critic learning function by sampling memory, converting data to tensors, updating dual critics with target values, and optimizing the policy using the reparameterization trick.
Implement the main loop for a soft actor-critic agent in Pybullet’s inverted pendulum bullet v0, using 250 games, 256 batch size and hidden layers, and plot the learning curve.
Implement a TensorFlow 2 policy gradient network for a reinforce agent, restructure code into networks and agent modules, and convert PyTorch code to Keras with dense layers and softmax output.
This lecture codes a reinforce agent in TensorFlow 2, removes the policy network, and sets up gamma, actions, fc dimensions, and save/load model workflows.
Implement the reinforce main loop and evaluate a Lunar Lander agent in TensorFlow 2, adding memory growth management, checkpointing, and learning-curve plotting.
Transpose the reinforce code to an actor-critic TF2 network by incorporating a value function V alongside the policy pi, adjusting fc1 and fc2 defaults, and updating the call function.
Coding the actor-critic agent in TensorFlow 2 demonstrates converting the policy network to an actor-critic model, implementing temporal difference learning, and computing actor and critic losses with TD error.
Implement the actor-critic main program, manage memory, and run 2000 cart pole games to validate a TensorFlow 2 actor-critic agent, noting rising scores, and preparing for deep deterministic policy gradients.
Shows coding the DDPG networks in TensorFlow 2 with separate actor and critic, handling state-action inputs, and producing mu and Q outputs using tanh and relu activations.
Code the DDPG agent in TensorFlow 2 by building actor and critic networks with target counterparts, a replay buffer, and learning updates from sampled transitions.
Implement the ddpg main program for the lunar lander continuous v2, configure gamma 0.99, alpha 1e-4, beta 1e-3, store transitions, and observe average scores exceeding 200, signaling a successful run.
Code a td3 agent in TensorFlow 2, extending ddpg with twin critics and delayed actor updates, using warmup, update intervals, clipped noise, replay buffer, and target networks for stable learning.
Code the td3 main program for the continuous lunar lander, run 1000 games with fixed learning rates, and show td3 achieves about 223 average score, faster than ddpg.
Build soft actor-critic networks by implementing a value network and an actor network that outputs mu and sigma, then sample from a clipped normal distribution for actions.
Learn to implement SAC in TensorFlow 2 by wiring an actor, two critics, and a value network with a target, including sample normal actions and save/load.
Code the soft actor critic main function for inverted pendulum bullet environment using pybullet and gym, evaluate learning, achieving a 1000 high score and a 770 average across 250 games.
Set up a virtual environment and adapt code for OpenAI Gym’s latest interface changes, handling reset and step outputs, and install compatible packages for reliable agent training.
update the agent implementations to the new gym interface by aligning trunk and terminal handling, observation shaping, and device usage across reinforce, actor-critic, ddpg, and td3.
In this advanced course on deep reinforcement learning, you will learn how to implement policy gradient, actor critic, deep deterministic policy gradient (DDPG), twin delayed deep deterministic policy gradient (TD3), and soft actor critic (SAC) algorithms in a variety of challenging environments from the Open AI gym. There will be a strong focus on dealing with environments with continuous action spaces, which is of particular interest for those looking to do research into robotic control with deep reinforcement learning.
Rather than being a course that spoon feeds the student, here you are going to learn to read deep reinforcement learning research papers on your own, and implement them from scratch. You will learn a repeatable framework for quickly implementing the algorithms in advanced research papers. Mastering the content in this course will be a quantum leap in your capabilities as an artificial intelligence engineer, and will put you in a league of your own among students who are reliant on others to break down complex ideas for them.
Fear not, if it's been a while since your last reinforcement learning course, we will begin with a briskly paced review of core topics.
The course begins with a practical review of the fundamentals of reinforcement learning, including topics such as:
The Bellman Equation
Markov Decision Processes
Monte Carlo Prediction
Monte Carlo Control
Temporal Difference Prediction TD(0)
Temporal Difference Control with Q Learning
And moves straight into coding up our first agent: a blackjack playing artificial intelligence. From there we will progress to teaching an agent to balance the cart pole using Q learning.
After mastering the fundamentals, the pace quickens, and we move straight into an introduction to policy gradient methods. We cover the REINFORCE algorithm, and use it to teach an artificial intelligence to land on the moon in the lunar lander environment from the Open AI gym. Next we progress to coding up the one step actor critic algorithm, to again beat the lunar lander.
With the fundamentals out of the way, we move on to our harder projects: implementing deep reinforcement learning research papers. We will start with Deep Deterministic Policy Gradients (DDPG), which is an algorithm for teaching robots to excel at a variety of continuous control tasks. DDPG combines many of the advances of Deep Q Learning with traditional actor critic methods to achieve state of the art results in environments with continuous action spaces.
Next, we implement a state of the art artificial intelligence algorithm: Twin Delayed Deep Deterministic Policy Gradients (TD3). This algorithm sets a new benchmark for performance in continuous robotic control tasks, and we will demonstrate world class performance in the Bipedal Walker environment from the Open AI gym. TD3 is based on the DDPG algorithm, but addresses a number of approximation issues that result in poor performance in DDPG and other actor critic algorithms.
Finally, we will implement the soft actor critic algorithm (SAC). SAC approaches deep reinforcement learning from a totally different angle: by considering entropy maximization, rather than score maximization, as a viable objective. This results in increased exploration by our agent, and world class performance in a number of important Open AI Gym environments.
By the end of the course, you will know the answers to the following fundamental questions in Actor-Critic methods:
Why should we bother with actor critic methods when deep Q learning is so successful?
Can the advances in deep Q learning be used in other fields of reinforcement learning?
How can we solve the explore-exploit dilemma with a deterministic policy?
How do we get and deal with overestimation bias in actor-critic methods?
How do we deal with the inherent approximation errors in deep neural networks?
This course is for the highly motivated and advanced student. To succeed, you must have prior course work in all the following topics:
College level calculus
Reinforcement learning
Deep learning
The pace of the course is brisk and the topics are at the cutting edge of deep reinforcement learning research, but the payoff is that you will come out knowing how to read research papers and turn them into functional code as quickly as possible. You'll never have to rely on dodgy medium blog posts again.