https://github.com/andi611/dqn-deep-q-network-atari-breakout-tensorflow
Training a vision-based agent with the Deep Q Learning Network (DQN) in Atari's Breakout environment, implementation in Tensorflow.
https://github.com/andi611/dqn-deep-q-network-atari-breakout-tensorflow
agent atari atari-breakout breakout deep-q-learning deep-q-learning-network deep-q-network deep-qlearning-algorithm deep-qnetworks dqn mlds mlds17-machine-learning-course mlds2018spring openai-gym openai-gym-agents openai-gym-environments openai-gym-solutions reinforcement-learning tensorflow tensorflow-models
Last synced: about 2 months ago
JSON representation
Training a vision-based agent with the Deep Q Learning Network (DQN) in Atari's Breakout environment, implementation in Tensorflow.
- Host: GitHub
- URL: https://github.com/andi611/dqn-deep-q-network-atari-breakout-tensorflow
- Owner: andi611
- License: mit
- Created: 2018-11-19T07:36:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T08:18:20.000Z (over 6 years ago)
- Last Synced: 2025-03-27T04:33:13.995Z (2 months ago)
- Topics: agent, atari, atari-breakout, breakout, deep-q-learning, deep-q-learning-network, deep-q-network, deep-qlearning-algorithm, deep-qnetworks, dqn, mlds, mlds17-machine-learning-course, mlds2018spring, openai-gym, openai-gym-agents, openai-gym-environments, openai-gym-solutions, reinforcement-learning, tensorflow, tensorflow-models
- Language: Python
- Size: 50.3 MB
- Stars: 16
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reinforcement Learning: Deeq Q Learning Network (DQN) Agent playing Atari Breakout
* Training a vision-based agent with the Deep Q Learning Network (DQN) in Atari's Breakout environment, implementation in Tensorflow.## Environment
* **< Python 3.7 >**
* **< [OpenAI Gym](https://github.com/openai/gym) >**
- Install the OpenAI Gym Atari environment:
`$ pip3 install opencv-python gym "gym[atari]"`
- Atari environment used: `BreakoutNoFrameskip-v4`
* **< [Tensorflow r.1.12.0](https://www.tensorflow.org/) >**## Implementation
* Deep Q Learning Network with the following improvements:
- **Experience Replay**
- **Fixed Target Q-Network**
- **TD error loss function** with: *Qtarget = reward + (1-terminal) * (gamma * Qmax(s’) )*
* DQN network Settings (in agent_dqn.py):
## File Description
```
.
├── ./
| ├── agent_dqn.py ─────────── DQN model
| ├── atari_wrapper.py ─────── Atari wrapper
| ├── environment.py ───────── Gym wrapper
| ├── runner.py ────────────── Main program for training and testing
| └── Readme.md ────────────── This file
└── model/
├── dqn_learning_curve_compare.png ──────── Figure 1
├── dqn_best_setting.png ────────────────── Figure 2
├── dqn_learning_curve.png ──────────────── Figure 3
├── checkpoint ──────────────────────────── Tensorflow model check point
├── model_dqn-25581.data-00000-of-00001 ─── Tensorflow model data
├── model_dqn-25581.meta ────────────────── Tensorflow model meta
└── model_dqn-25581.index ───────────────── Tensorflow model index
```## Usage
* Traing the DQN Agent: `$ python3 runner.py --train_dqn`
* Testing the DQN Agent: `$ python3 runner.py --test_dqn`
* Testing the DQN Agent with **gameplay rendering**: `$ python3 runner.py --test_dqn --do_render`## Learning Curve
* Single learning curve:

* With different plotting window:
