Skip to content

RitwikSaikia/drlnd_p3_colab_compete

Repository files navigation

This repo is a solution to Udacity Deep Reinforcement Learning Nano Degree project Colab and Compete

Project Details

Interestingly the agent has discovered the dexterity of a double shot in Tennis.

  • Environment: Two agents control rackets to bounce a ball over a net.
  • Goal: Each agent should keep the ball in play.
  • Reward:
    • +0.1: When an agent hits the ball over the net.
    • -0.01: When an agent lets a ball hit the ground or hits the ball out of bounds.
  • State space: 8*3 variables corresponding to position and velocity of the ball and racket. Each agent receives its own, local observation.
  • Action space: 2 continuous values, corresponding to movement toward (or away from) the net, and jumping.
  • Solved: When agents gets an average score of +0.5 (over 100 consecutive episodes, after taking the maximum over both agents).

Getting Started

Installation

1. Setup Python 3
MacOS
brew install python3 swig && \
    brew install opencv3 --with-python && \
    pip3 install --upgrade pip setuptools wheel
Ubuntu
sudo apt-get install swig python3 python3-venv
2. Setup Virtual Environment
python3 -m venv .venv && \
    source .venv/bin/activate && \
    pip install -r requirements.txt

Unity environments

  1. Download "Tennis" environment based on your machine.
  2. Place the file in the env directory, and unzip the file.

Usage

1. Switch to Virtual Environment
source .venv/bin/activate
2. Train the Agent
python3 train.py
3. Watch the Agent

Required checkpoints are already available in checkpoints/ directory.

python3 test.py

About

Udacity DRLND P3 Colab and Compete

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published