/DeepQLearning-A.I-learns-to-balance-a-pole

Using Deep Q Learning, The Reinforcement 'Q' learning model is used along with a Neural Network to provide optimal 'q' function values i.e the optimal 'Actions' for the 'Agent' to undergo at a given time to balance a pole. The Deep-Q-Network is created using Pytorch. This is a base model which is to be improved upon.

Primary LanguageJupyter Notebook

DeepQLearning A.I learns to balance a pole:

Using Deep Q Learning, The Reinforcement 'Q' learning model is used along with a Neural Network to provide optimal 'q' function values i.e the optimal 'Actions' for the 'Agent' to undergo at a given time to balance a pole. The Deep-Q-Network is created using Pytorch. This is a base model which is to be improved upon. The DQN model is implemented using DeepMind's paper.

Balancing Pole:

pole

The Neural Network:

NN

We feed a lesser Resolution of a number of successive snapshots of the states into the Neural Network

NonProcessed

Processed

Discounted Rate of Return:

discount

The Algorithm:

  • DeepMind's paper:

    DeepMind

  • Algorithm:

    algo

  • Code Implementation:

    code

ε-greedy strategy and Exponential decay:

ε-Greedy

decay

Calculating Loss:

loss