• Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AI research environment for the Atari 2600 games πŸ€–.

Atari

Research Playground built on top of OpenAI's Atari Gym, prepared for implementing various Reinforcement Learning algorithms.

It can emulate any of the following games:

['Asterix', 'Asteroids', 'MsPacman', 'Kaboom', 'BankHeist', 'Kangaroo', 'Skiing', 'FishingDerby', 'Krull', 'Berzerk', 'Tutankham', 'Zaxxon', 'Venture', 'Riverraid', 'Centipede', 'Adventure', 'BeamRider', 'CrazyClimber', 'TimePilot', 'Carnival', 'Tennis', 'Seaquest', 'Bowling', 'SpaceInvaders', 'Freeway', 'YarsRevenge', 'RoadRunner', 'JourneyEscape', 'WizardOfWor', 'Gopher', 'Breakout', 'StarGunner', 'Atlantis', 'DoubleDunk', 'Hero', 'BattleZone', 'Solaris', 'UpNDown', 'Frostbite', 'KungFuMaster', 'Pooyan', 'Pitfall', 'MontezumaRevenge', 'PrivateEye', 'AirRaid', 'Amidar', 'Robotank', 'DemonAttack', 'Defender', 'NameThisGame', 'Phoenix', 'Gravitar', 'ElevatorAction', 'Pong', 'VideoPinball', 'IceHockey', 'Boxing', 'Assault', 'Alien', 'Qbert', 'Enduro', 'ChopperCommand', 'Jamesbond']

Check out corresponding Medium article: Atari - Reinforcement Learning in depth πŸ€– (Part 1: DDQN)

Purpose

The ultimate goal of this project is to implement and compare various RL approaches with atari games as a common denominator.

Usage

  1. Clone the repo.
  2. Go to the project's root folder.
  3. Install required packagespip install -r requirements.txt.
  4. Launch atari. I recommend starting with help command to see all available modes python atari.py --help.

DDQN

Hyperparameters

* GAMMA = 0.99
* MEMORY_SIZE = 900000
* BATCH_SIZE = 32
* TRAINING_FREQUENCY = 4
* TARGET_NETWORK_UPDATE_FREQUENCY = 40000
* MODEL_PERSISTENCE_UPDATE_FREQUENCY = 10000
* REPLAY_START_SIZE = 50000
* EXPLORATION_MAX = 1.0
* EXPLORATION_MIN = 0.1
* EXPLORATION_TEST = 0.02
* EXPLORATION_STEPS = 850000

Model Architecture

Deep Convolutional Neural Network by DeepMind

* Conv2D (None, 32, 20, 20)
* Conv2D (None, 64, 9, 9)
* Conv2D (None, 64, 7, 7)
* Flatten (None, 3136)
* Dense (None, 512)
* Dense (None, 4)

Trainable params: 1,686,180

Performance

After 5M of steps (~40h on Tesla K80 GPU or ~90h on 2.9 GHz Intel i7 Quad-Core CPU):

SpaceInvaders

Training:

Normalized score - each reward clipped to (-1, 1)

Testing:

Human average: ~372

DDQN average: ~479 (128%)


Breakout

Training:

Normalized score - each reward clipped to (-1, 1)

Testing:

Human average: ~28

DDQN average: ~62 (221%)

Genetic Evolution

Atlantis

Training:

Normalized score - each reward clipped to (-1, 1)

Testing:

Human average: ~29,000

GE average: 31,000 (106%)

Author

Greg (Grzegorz) Surma

PORTFOLIO

GITHUB

BLOG

More Repositories

1

style_transfer

CNN image style transfer 🎨.
Jupyter Notebook
272
star
2

image_generator

DCGAN image generator πŸ–ΌοΈ.
Jupyter Notebook
214
star
3

face_generator

DCGAN face generator πŸ§‘.
Jupyter Notebook
200
star
4

image_classifier

CNN image classifier implemented in Keras Notebook πŸ–ΌοΈ.
Jupyter Notebook
178
star
5

cartpole

OpenAI's cartpole env solver.
Python
143
star
6

text_predictor

Char-level RNN LSTM text generatorπŸ“„.
Python
113
star
7

slitherin

AI research environment for the game of Snake 🐍 .
Python
90
star
8

jetson

Self-driving AI toy car πŸ€–πŸš—.
Jupyter Notebook
80
star
9

metal_camera

iOS metal camera with GPU shaders.
Swift
73
star
10

pixelizator

Swift/Python image pixelizer πŸ–ΌοΈ.
Swift
68
star
11

deep_traffic

MIT DeepTraffic top 2% solution (75.01 mph) πŸš—.
JavaScript
56
star
12

password_cracker

Char-level RNN LSTM password cracker πŸ”‘πŸ”“.
55
star
13

stereo_depth_estimator

Stereo depth estimation for self-driving cars πŸš—
Python
49
star
14

edge_detector

HED real-time iOS edge detector.
Swift
43
star
15

deep_dream

DeepDream psychodelic image generator.
Python
39
star
16

sliding_puzzle

Swift implementation of the Sliding Puzzle game with Iterative Deepening A* AI Solver.
Swift
35
star
17

street_lanes_finder

Street lanes finder for self-driving carsπŸš—.
Jupyter Notebook
34
star
18

gsurma.github.io

Greg's Portfolio 🌎.
HTML
31
star
19

digit_recognizer

CNN digit recognizer implemented in Keras Notebook, Kaggle/MNIST (0.995).
Jupyter Notebook
30
star
20

meta_intelligence

AI research environment for program generation.
Python
27
star
21

histopathologic_cancer_detector

CNN histopathologic tumor identifier.
Jupyter Notebook
27
star
22

mono_depth_estimator

Mono depth estimation for self-driving cars πŸš—
Jupyter Notebook
24
star
23

image_tagger

CNN multi-label image classifier πŸ–ΌοΈ.
Jupyter Notebook
20
star
24

twitter_data_parser

Python scripts that download metadata and tweets for given users.
Python
18
star
25

prison_escape

Prisoner's Dilemma research environment.
Jupyter Notebook
16
star
26

cnn_explainer

Making CNNs interpretable.
Jupyter Notebook
15
star
27

newstagram

Simple iOS news feed app where you can customize categories and regions.
Swift
15
star
28

diffie_hellman_key_exchange

Swift implementation of classic cryptographic key exchange method.
Swift
15
star
29

prime_numbers_generator

Eratosthenes Sieve based prime numbers generator written in Swift.
Swift
11
star
30

sleepless_mac

Status bar app that prevents your mac from sleeping.
Swift
10
star
31

rpi_lcd_system_monitoring

Python scripts that display sytem data on i2c LCD screen.
Python
7
star
32

pong

iOS implementation of the classic Atari Pong game.
Swift
6
star
33

xcode_project_cleaner

Shell script that quickly cleans up xcode project.
Shell
6
star
34

game_of_life

NetLogo implementation of Conway's Game Of Life.
NetLogo
6
star
35

github_feed

Visually simple yet powerful github feed app.
Swift
4
star
36

stellar

Astronomy Photo of the Day πŸš€.
Swift
4
star
37

gsurma

3
star