This repository contains scripts for implementation of DQN created from scratch using Tensorflow 2. Short description of the files:
- DQN.py - RL agent and learning algorithm
- dqn-cart-pole.py - learn agent
- evaluate-cart-pole.py - evaluate agent over many episodes
- record-game-replay.py - run agent and save the replay
The inplemented DQN is a dual DQN. The agent has two neural networks for predicting Q-function. One lags behind and is used for calculating Q values in learning.The video bellow represents the agent learning with progressing epochs.
learing_dqn.mp4
I have conducted some experimets editing the hyper parameters and observing agent performance:
Update - how often the second DQN is updated
The best performance was achived for the update of 10. The values of 100 and 1000 were to big and the newtork didn't learn corret behavior to stabilize the pole.