Giter VIP home page Giter VIP logo

atari-pong-agent-using-openai-gym's Introduction

Deep Reinforcement Learning

Project: Atari Pong Agent Using OpenAI Gym

Project Overview

In this project, you’ll implement a Neural Network for Deep Reinforcement Learning and see it learn more and more as it finally becomes good enough to beat the computer in Atari 2600 game Pong! You can play around with other such Atari games at the OpenAI Gym.

Andrej Karpathy Pong AI using Policy Gradients

By executing this project, you’ll be able to do the following:

  • Write a Neural Network from scratch.
  • Implement a Policy Gradient with Deep Reinforcement Learning.
  • Build an AI for Pong that can beat the computer in less than 250 lines of Python.
  • Use OpenAI Gym.

Sources

Basically, the code and the idea are all based on Dr. Andrej Karpathy’s blog post on Deep Reinforcement Learning. The CNN code is written in keras. The code in atari_pong_agent.py is intended to be a simpler version of pong.py, which was written by Dr. Karpathy.

Prerequisites and Background Reading

You’ll need to know the following:

  • Basic Python
  • Neural Network design and backpropogation
  • Calculus and Linear Algebra

Read the blog post on which all of this project is based, if you want a deeper dive into the project.

Software and Libraries

This project uses the following software and Python libraries:

Project Setup

  1. Follow the instructions for installing OpenAI Gym. This requires installing several more involved dependencies, including cmake and a recent pip version.

  2. Run pip install -e .[atari]

  3. Clone the repository and navigate to the downloaded folder.

git clone https://github.com/adityasaxena26/Atari-Pong-Agent-using-OpenAI-Gym.git
cd Atari-Pong-Agent-using-OpenAI-Gym
  1. Run python atari_pong_agent.py

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.