We will be using numpy, gym, matplotlib, keras, and tensorflow package in this segment of the exercise. Here, Tensorflow will be used as the backend for Keras. You can install these packages with pip.
import random
import numpy as np
import matplotlib.pyplot as plt
from keras.layers import Dense, Dropout, Activation
from keras.models import Sequential
from keras.optimizers import Adam
from keras import backend as k
from collections import deque
import gym
Deque - Is a list-like container with fast appends and pops on either end.