liveBook · Manning

Deep reinforcement learning

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

Deep reinforcement learning is reinforcement learning that uses deep neural networks to represent policies, value functions, or related decision-making components.

Deep reinforcement learning (DRL) extends reinforcement learning by using deep learning to solve the Q-equation or other reinforcement-learning functions. Neural networks replace state or Q-tables, making the approach suitable for environments with larger state and action spaces. section 11.2

A deep Q-learning system works as follows:

  • Use a neural network instead of a state table or Q-table. section 11.2
  • Use the Q-learning equation as the check or supervisor for network training. section 11.2
  • Select actions in an environment, observe rewards and state transitions, and evaluate performance across episodes. section 11.2

Exploring Gym environments

A practical experiment creates a Gym environment such as CartPole, Acrobot, MountainCar, or LunarLander, inspects its action and observation spaces, runs episodes, accumulates rewards, and renders the resulting frames as video. section 11.2

Listing 11.11 EDL_11_2_Gym_Setup.ipynb: Creating a virtual display
#@title Setup Environment { run: "auto" }
ENVIRONMENT = "CartPole-v1" #@param ["CartPole-v1", "Acrobot-v1", 
 "CubeCrash-v0", "MountainCar-v0", "LunarLander-v2"]              #1
 
env = gym.make(ENVIRONMENT)                                         #2
 
state = env.reset()
plt.imshow(env.render(mode='rgb_array'))                            #3
 
print("action space: {0!r}".format(env.action_space))               #4
print("observation space: {0!r}".format                             #4
 (env.observation_space))                                         #4

Set up a selectable Gym environment, reset it, render an observation, and inspect its action and observation spaces. section 11.2

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains neural-network substitution and Q-learning supervision, then stops short of a detailed network-training implementation.
Examples
Uses CartPole, Acrobot, MountainCar, LunarLander, Atari games, action spaces, observation spaces, rewards, and rendered episodes.
What it assumes
Assumes familiarity with deep learning while developing understanding of reinforcement learning and evolutionary optimization progressively.
What you can do after
Apply via OpenAI Gym by configuring environments, inspecting spaces, running episodes, collecting rewards, and rendering results.
How it connects
Connects reinforcement learning, deep learning, Q-learning, deep Q-networks, and evolutionary optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.