Deep Reinforcement Learning
Deep Reinforcement Learning
Reinforcement Learning Architecture Recap
Reinforcement learning (RL) is a framework where an agent learns to interact with a complex environment by trial and error. The agent receives a state s (a measurement of the environment), selects an action a according to a policy π, and then receives a reward r from the environment. The goal is to maximize cumulative future rewards.
The policy is probabilistic: π(a∣s) gives the probability of taking action a in state s. This handles stochastic environments. A value function Vπ(s) estimates how valuable it is to be in state s when following policy π. The discount rate γ∈[0,1] weights near‑future rewards more than distant ones, reflecting that rewards are often sparse and delayed.
Key idea: The agent optimizes its policy to maximize expected discounted return Rt=∑k=0∞γkrt+k.
Deep Neural Networks in Reinforcement Learning
Classic RL often uses tabular or linear representations for the policy or value function. Deep reinforcement learning replaces these with deep neural networks, which can represent much more complex functions. The policy becomes πθ(a∣s), where θ are the network weights. The same idea applies to value functions and Q‑functions.
These networks learn by backpropagation using the reward signal. The biological inspiration is Hebbian learning – “neurons that fire together, wire together.” When the network’s activity leads to a good action and a reward, the connections that produced that action are strengthened.
Q‑Learning and Deep Q‑Networks (DQN)
The Q‑function (or quality function) Qπ(s,a) combines policy and value: it tells how good it is to take action a in state s, assuming optimal behavior thereafter.
Once the optimal Q‑function Q∗ is learned, the agent simply picks the action with the highest Q‑value for its current state: a∗(s)=argmaxaQ∗(s,a).
Deep Q‑Networks (DQN) use a deep neural network to approximate Q∗(s,a). This is natural because Q can be a highly nonlinear function of state and action. DQN gained fame with the 2015 Nature paper “Human‑level control through deep reinforcement learning” (Mnih et al., DeepMind).
The DQN algorithm uses convolutional layers to process raw game pixels as input, then fully connected layers to output Q‑values for each possible joystick action.
The Atari Breakthrough
The 2015 DeepMind paper demonstrated that a single DQN architecture could achieve superhuman performance on many classic Atari 2600 games. The network was trained solely on game pixels and the score (reward). No game‑specific knowledge was provided.
Breakout example: After a few hours of training, the agent discovered a strategy that only expert human players ever find: tunneling through one side of the bricks so that the ball ricochets behind the wall and clears all bricks automatically.
Performance across games: The agent reached above‑human level on most of the 49 tested games. A few games (e.g., Montezuma’s Revenge) remained below human level due to sparse rewards and long‑term planning challenges.
Limitations
The same trained network cannot transfer to a different game without complete retraining.
The agent learns each game independently, whereas humans use prior knowledge from one game to learn another faster. This highlights the transfer learning and general AI challenges still unsolved in RL.
From Simulation to Real‑World Robotics
Deep RL has shown remarkable results in simulated physical environments, where agents learn to walk, run, swim, or fly using a control policy from scratch.
Bipedal walkers: Generations of RL agents evolve stable walking gaits, learning to keep the torso upright and legs coordinated.
Quadrotor and helicopter maneuvers: Researchers at Stanford and ETH Zurich used RL to train aggressive, high‑performance flight maneuvers in real drones, though transitioning from simulation to reality remains difficult.
Industry examples: One early real‑world application of RL was elevator scheduling in large skyscrapers – a combinatorially hard problem where RL learned near‑optimal policies to minimize waiting times.
AlphaGo and AlphaGo Zero
AlphaGo (2016) became the first computer program to defeat a world champion Go player, Lee Sedol. It used a convolutional neural network trained with human reward shaping – expert players provided intermediate rewards to guide learning, making the reward structure denser.
AlphaGo Zero (2017) improved dramatically by learning entirely through self‑play, with no human features or reward shaping. It used a Residual Network (ResNet) architecture with skip connections that ease training via backpropagation. AlphaGo Zero surpassed the original AlphaGo and all human players.
Both systems are narrow AI – they can only play Go. They cannot transfer knowledge to other tasks.
The success of ResNet in AlphaGo Zero helped popularize that architecture for many other deep learning problems.
The Credit Assignment Problem
In RL, rewards are often received only at the end of an episode (e.g., winning or losing a chess game). This makes it difficult to determine which specific actions contributed to the outcome – the credit assignment problem.
Reward shaping is a common technique: providing intermediate rewards based on expert intuition to make the reward signal denser and speed up learning. However, if a human designs the rewards, it may cap the ultimate performance of the agent because it relies on human knowledge. Self‑play methods (like AlphaGo Zero) avoid this by exploring autonomously.
Tools and Resources
OpenAI Gym is an open‑source toolkit that provides a wide variety of RL environments (Atari games, robotics simulations, continuous control tasks like pendulum and walker). It allows researchers to rapidly prototype and benchmark new algorithms. The availability of such frameworks has accelerated progress in deep RL.
Other recommended YouTube channels for learning RL:
Two Minute Papers
Arxiv Insights
Brian Douglas (MathWorks series on RL for control)
Challenges and the Road Ahead
Despite impressive advances, deep RL still faces several major hurdles:
Sample efficiency: RL agents often require millions or billions of interactions (e.g., game episodes) to learn, whereas humans can learn much faster.
Transfer and generalization: A human who learns tic‑tac‑toe can apply that knowledge to checkers and then to chess. Current RL systems cannot reuse learned policies across different tasks. This is the central open problem in general artificial intelligence.
Real‑world deployment: Transitioning from simulation to physical robots is difficult due to modelling errors, safety constraints, and hardware limitations. Physically based control (e.g., Boston Dynamics) still relies heavily on classical control and manual tuning, not pure RL.
The field is still in its early days. Developing agents that learn faster, generalize across tasks, and interact safely in the real world will be a “lifetimes of research” problem – but that also makes it an exciting time to contribute.
Summary
Deep reinforcement learning combines RL with deep neural networks to represent policies, value functions, or Q‑functions.
Deep Q‑Networks achieved superhuman performance on Atari games by learning directly from pixels.
AlphaGo and AlphaGo Zero used CNNs and ResNets, with AlphaGo Zero learning entirely via self‑play.
Real‑world applications include elevator scheduling and drone flight control, but the gap between simulation and reality remains large.
The biggest unsolved challenge is transfer learning – building agents that can use knowledge from one problem to solve another, a key step toward general AI.

Ask anything
We've read this whole study set, so questions about it get the best answers.