https://github.com/fork123aniket/deep-recurrent-q-networks
Implementation of Deep Recurrent Q-Networks for Partially Observable environment setting in Tensorflow
https://github.com/fork123aniket/deep-recurrent-q-networks
deep-q-learning deep-q-learning-network deep-q-network deep-recurrent-q-network deep-reinforcement-learning gridworld gridworld-environment reinforcement-learning reinforcement-learning-algorithms tensorflow tensorflow-tutorial
Last synced: 3 months ago
JSON representation
Implementation of Deep Recurrent Q-Networks for Partially Observable environment setting in Tensorflow
- Host: GitHub
- URL: https://github.com/fork123aniket/deep-recurrent-q-networks
- Owner: fork123aniket
- License: mit
- Created: 2022-05-16T09:29:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T03:13:51.000Z (over 1 year ago)
- Last Synced: 2025-04-07T16:52:03.606Z (3 months ago)
- Topics: deep-q-learning, deep-q-learning-network, deep-q-network, deep-recurrent-q-network, deep-reinforcement-learning, gridworld, gridworld-environment, reinforcement-learning, reinforcement-learning-algorithms, tensorflow, tensorflow-tutorial
- Language: Python
- Homepage:
- Size: 400 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deep Recurrent Q Networks
This repository demonstrates the implementation of [***Deep Recurrent Q-Networks (DRQN)***](https://arxiv.org/abs/1507.06527) for ***Partially Observable*** environments. Utilizing recurrent blocks with ***Deep Q-Networks*** can actually make the agent receiving single frames of the environment and the network will be able to change its output depending on the temporal pattern of observations it receives. ***DRQN*** does this by maintaining a hidden state that it computes at every time-step. Furthermore, A brief explaination of ***DRQNs*** for ***partial observability*** can be found [here](https://medium.com/@awjuliani/simple-reinforcement-learning-with-tensorflow-part-6-partial-observability-and-deep-recurrent-q-68463e9aeefc#.gi4xdq8pk).
## Requirements
- `tensorflow`
- `numpy`
## Training Environment Used
- `The Spatially Limited Gridworld Environment`In this new version of the `GridWorld`, the agent can only see a single block around it in any direction, whereas the environment itself contains ***9x9*** blocks. Each episode is fixed at *50* steps, there are four green and two red squares, and when the agent moves to a red or green square, a new one is randomly placed in the environment to replace it.
## Usage
- To train a new network : run `training.py`
- To test a preTrained network : run `test.py`
- To see the ***DRQN*** implementation, please check `Model.py`
- Other imperative helper utilities to properly train the ***Deep Recurrent Q-Networks*** can be found in `helper.py` file.
- All hyperparameters to control training and testing of ***DRQNs*** are provided in their respective `.py` files.
## Results
| Gridworld Environment | Gridworld Results |
| ------------------------------ |:-----------------------------:|
|  |  |