Giter VIP home page Giter VIP logo

deeprl_collabcompet_tennis's Introduction

Deep RL Collaboration and Competition Tennis

Udacity Deep Reinforcement Learning Nanodegree, third project "Collaboration and Competition".

Project 3: Collaboration and Competition.

The learning algorithm to solve the task was a DDPG controlling both players and trained via self-play and shared replay buffer, for details see the report.

Environment

In this project the Tennis environment is solved. The goal of both agents playing against each other is to keep the ball in play.

Trained Agent

Rewards

In this environment, two agents control rackets to bounce a ball over a net. If an agent hits the ball over the net, it receives a reward of +0.1. If an agent lets a ball hit the ground or hits the ball out of bounds, it receives a reward of -0.01.

The task is episodic, and in order to solve the environment, your agents must get an average score of +0.5 (over 100 consecutive episodes, after taking the maximum over both agents).

States and Actions

The observation space consists of 24 dimensions corresponding to the position and velocity of the ball and racket. Each agent receives its own, local observation. Two continuous actions are available, corresponding to movement toward (or away from) the net, and jumping.

Files in this Repository

.
├── checkpoint_actor_64x64.pth            # stored weights for trained actor network (2 hidden 64 unit layers)
├── checkpoint_actor.pth                  # latest stored weights for trained actor network
├── checkpoint_critic_64x64.pth           # stored weights for trained critic network (2 hidden 64 unit layers)
├── checkpoint_critic.pth                 # latest stored weights for trained critic network
├── ddpg_agent.py                         # agent to interact and learn from environment
├── model.py                              # neural network model (in Pytorch)
├── Report.pdf                            # report of the implementation and details of the learning algorithm
├── Tennis.ipynb                          # main code for training and testing the agent
└── README.md

Python Packages

  • collections
  • copy
  • matplotlib
  • numpy
  • pandas
  • random
  • torch
  • unityagents

Note: The Unity environment did not work on Mac OS for Python version 3.7 and higher. Python version 3.6 worked well.

Downloading the Environment

  1. Download the environment from one of the links below. You need only select the environment that matches your operating system:

    (For AWS) If you'd like to train the agent on AWS (and have not enabled a virtual screen), then please use this link to obtain the "headless" version of the environment. You will not be able to watch the agent without enabling a virtual screen, but you will be able to train the agent. (To watch the agent, you should follow the instructions to enable a virtual screen, and then download the environment for the Linux operating system above.)

Instructions

Follow the instructions in Tennis.ipynb to get started with training your own agent!

deeprl_collabcompet_tennis's People

Contributors

isgeles 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.