Solution to Project 2 of Udacity Deep Reinforcement Learning Nanodegree
MIT License
This model is developed as a solution to Project 2 of Udacity Deep Reinforcement Learning Nanodegree
Image from official repo
Install the package requirements for this repository
pip install -r requirements.txt
In this environment, a double-jointed arm can move to target locations. A reward of +0.1 is provided for each step that the agent's hand is in the goal location. Thus, the goal of your agent is to maintain its position at the target location for as many time steps as possible.
The observation space consists of 33 variables corresponding to position, rotation, velocity, and angular velocities of the arm. Each action is a vector with four numbers, corresponding to torque applicable to two joints. Every entry in the action vector should be a number between -1 and 1.
Two separate versions of the Unity environment are provided:
The second version is useful for algorithms like PPO, A3C, and D4PG that use multiple (non-interacting, parallel) copies of the same agent to distribute the task of gathering experience.
Download your specific environment and unpack it into the ./env_unity/
folder in this repo:
Version 1: One (1) Agent
Version 2: Twenty (20) Agents
For training the agent on the single-agent version of the environment, the model can be run by using one of the following (only tested on windows!):
python main.py --environment env_unity/Reacher_singleAgent/Reacher.exe --memory per
python main.py --environment env_unity/Reacher_singleAgent/Reacher.exe
For training the agent on the 20-agent version of the environment, the following can be used (opnly tested on windows!):
python main.py --environment env_unity/Reacher_multipleAgents/Reacher.exe --memory per
python main.py --environment env_unity/Reacher_multipleAgents/Reacher.exe
Once the agent has been trained, it can be run as follows:
python main.py --environment env_unity/Reacher_multipleAgents/Reacher.exe --test --checkpoint_actor logs/weights_actor_multipleAgents_per.pth --checkpoint_critic logs/weights_critic_multipleAgents_per.pth