This project demonstrates the application of the Dueling DQN algorithm for trainning a reinforcement learning agent that can learn how to play Atari 2600 games. This has been a project for my EESC 7v85.001 class Special Topics in Signal Processing: Neural Networks and Deep Learning under Prof. Berrak Sisman.
In this project, we implement the Dueling DQN algorithm as described here.
dqnpolicy.py
is script you want to run. To train the agent, simply run the main()
method. To test a trained policy, you can use the DQNPolicy.play_policy(policy_path, render=True)
method.
To test the already trained policies present in the models
directory, simply select the game you desire from the demo_dict
variable and in the __main__
scope, run the DQNPolicy.play_policy(policy_path, render=True)
command.
I kinda fucked up when uploading the project on GitHub, so I lost the learned policy for Breakout *womp womp*
- dqnpolicy.py - Implementation of the algorithm. Contains the main method
- qnetwork.py - Implementation of the Q-network.
- random_policy.py - Implements a random policy.
- utils.py - Utilities.1
We train this agent on three games - Pong, Breakout and Space Invaders.
Below are the plots for mean training score vs episodes trained for. Training time varies- 6-7 hours for Pong, 10-12 hours for Breakout and ~24 hours for Space Invaders, for the level of performance as described in the plots below.