Skip to content

Deep Q-Learning implementation with Keras and Tensorflow on OpenAI-Gym environments

License

Notifications You must be signed in to change notification settings

BrunoBSM/Deep-Q-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Deep-Q-Learning

Deep Q-Learning implementation with Keras and Tensorflow on OpenAI-Gym environments

Based on the DQN paper

Requirements

Usage

This implementation is of a Deep Q-Learning for image input, in order to change the Environment, make sure it is compatible. This means it must have an image as state/observation and a discrete action space such as all ATARI 2600 environments. In order to choose a different Environment, simply change the following "Breakout-v0" to the name of the environment you'd like to test.

env = gym.make("Breakout-v0")

To change the learning parameters and the size for the Replay Memory maxlen, change these lines:

self.memory = deque(maxlen=200000)
# learning parameters
self.gamma = 0.99 # discount rate/factor
self.epsilon = 1.0 # exploration rate. Will be decreased over time
self.epsilon_min = 0.1
self.epsilon_decay = 0.9995
self.learning_rate = 0.00025 # alpha

For learning purposes I encourage you to test different parameters and compare performances.

Useful Links

Tutorials and explainations for DQN

https://becominghuman.ai/lets-build-an-atari-ai-part-1-dqn-df57e8ff3b26

https://towardsdatascience.com/welcome-to-deep-reinforcement-learning-part-1-dqn-c3cab4d41b6b

https://keon.io/deep-q-learning/

Vlad Mnih's lecture on DQN

About

Deep Q-Learning implementation with Keras and Tensorflow on OpenAI-Gym environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages