Playing Atari Breakout with Deep Q-learning

In this section, we'll implement an agent playing Atari Breakout (https://en.wikipedia.org/wiki/Breakout_(video_game)). In this game, the player can use a ball to knock down the eight rows of bricks, located at the top of the screen. The game is won when all bricks are knocked down and lost if the ball reaches the bottom of the screen. The ball can ricochet off the screen walls.

The player can prevent the ball from falling by navigating a pad (located at the bottom) left or right. Each knocked down brick carries a reward of 1:

Atari Breakout
Due to the nature of RL, this example might take a long ...

Get Python Deep Learning - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.