https://github.com/mahyaret/navigation
Deep Q-Network (DQN) for Unity ML-Agents
https://github.com/mahyaret/navigation
deep-learning deep-q-learning deep-reinforcement-learning reinforcement-learning
Last synced: 3 months ago
JSON representation
Deep Q-Network (DQN) for Unity ML-Agents
- Host: GitHub
- URL: https://github.com/mahyaret/navigation
- Owner: mahyaret
- License: apache-2.0
- Created: 2019-06-17T19:33:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T00:06:49.000Z (over 3 years ago)
- Last Synced: 2025-10-23T22:25:01.210Z (9 months ago)
- Topics: deep-learning, deep-q-learning, deep-reinforcement-learning, reinforcement-learning
- Language: Python
- Homepage:
- Size: 83.6 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Navigation
DQN agent

### Introduction
For this project, an agent is trained to navigate and collect objects in a square world. A reward of +1 is provided for collecting a yellow object, and a reward of -1 is provided for collecting a blue object. Thus, the goal of the agent is to collect as many yellow objects as possible while avoiding blue objects.
The task is episodic, and the environment is considered to be solved, when the agent gets an average score of +13 over 100 consecutive episodes.
#### State-Action Represenation
- Observation space type: continuous
- Observation space size (per agent): 37, corresponding to:
- velocity of agent
- ray-based perception of objects around agent's forward direction
- Action space type: discrete
- Action space size (per agent): 4, corresponding to:
- 0: move forward
- 1: move backward
- 2: turn left
- 3: turn right
### Getting Started
1. conda create --name navigation python=3.6
2. conda activate navigation
3. conda install jupyter
4. pip install gym
(make sure that pip is acting in your environment "type pip")
5. conda install pytorch=0.4.0 -c pytorch
6. cd C:\Users\YOUR_USERNAME\Documents\GitHub\Navigation\python
7. pip install .
8. install XQuartz from here: https://www.xquartz.org
(remember to restart your mac)
9. Download the pre-compiled Unity Environment to "data" folder:
- Linux: [click here](https://s3-us-west-1.amazonaws.com/udacity-drlnd/P1/Banana/Banana_Linux.zip)
- Mac OSX: [click here](https://s3-us-west-1.amazonaws.com/udacity-drlnd/P1/Banana/Banana.app.zip)
- Windows (32-bit): [click here](https://s3-us-west-1.amazonaws.com/udacity-drlnd/P1/Banana/Banana_Windows_x86.zip)
- Windows (64-bit): [click here](https://s3-us-west-1.amazonaws.com/udacity-drlnd/P1/Banana/Banana_Windows_x86_64.zip)
10. Follow the instructions in `Navigation.ipynb` to get started!