Giter Club home page Giter Club logo

deep-rl-collaboration's Introduction

Deep Reinforcement Learning for Multi-Agent Environments

Train agents to hit a ball back and forth in the Tennis environment from Unity ML-Agents using a multi-step variant of deep deterministic policy gradients (DDPG).

Watch a full video of the trained agents here: https://youtu.be/RLc08qHuOp4

GIF animation of trained agent in Reacher environment

The Environment

The Tennis environment in Unity ML-Agents features a tennis court with a net, ball, and two rackets. Agents control the rackets, which have two continuous action dimensions between -1 and 1. One action dimension controls position toward and away from the tennis net. The other action dimension controls vertical movement through a jump action. The observation space has eight variables respresenting position and velocity of the racket and the ball. Each state stacks three consecutive observations to help track movement.

Agents receive a positive reward of +0.1 for hitting the ball over the tennis net and a negative reward of -0.01 for letting the ball hit the ground or out of bounds. Solving the environment requires a max score between the two agents of 0.5 averaged over 100 subsequent episodes. Episodes end when the ball hits the ground or out of bounds, so the agents are incentivized to rally the ball back and forth.

Installation

  1. Create and activate a Python 3.6 environment. Choose an environment name in place of my_env.
conda create -n my_env python=3.6
source activate my_env
  1. Create an IPython kernel for your new environment.
python -m ipykernel install --user --name my_env --display-name "my_env"
  1. Clone this repository and install dependencies in the python/ folder, which comes from the Udacity Deep Reinforcement Learning repository. These dependencies will include PyTorch and Unity ML-Agents Toolkit.
git clone https://github.com/supercurious/deep-rl-collaboration.git
cd python
pip install .
  1. Download the Unity environment and unzip the file.

Usage

  1. Open the Jupyter notebook REPORT.ipynb for implementation and results.
jupyter notebook REPORT.ipynb
  1. From the top menu bar, click on "Kernel", navigate to "Change kernel" and select the new environment you created during installation.

deep-rl-collaboration's People

Contributors

supercurious avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.