Skip to content

OpenAI gym for the Google Chrome dino game.

License

Notifications You must be signed in to change notification settings

rey-allan/gym-chrome-dino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gym-chrome-dino

OpenAI gym for the Google Chrome Dino game.

Installation

git clone https://github.com/mattstruble/gym-chrome-dino.git
cd gym-chrome-dino
pip install -e .

Usage

import gym
import gym_chrome_dino
env = gym.make('ChromeDino-v0')

State, Actions, and Rewards

  • The state is a RGB numpy array with shape of (150, 552, 3).
  • The available actions are 0: do nothing, 1: jump, and 2: duck.
  • A positive reward 1 is given when the dinosaur is alive; a negative penalty -10 is given when the dinosaur hits an obstacle.

WebDriver

gym-chrome-dino runs the game via selenium in order to monitor and control the game.

Ensure you have the latest ChromeDriver that matches your chrome installation.

Add the full path to chromedriver to your system:

Windows:

Add a new system environment PATH equal to: CHROME_DRIVER_PATH=path\to\chromedriver.exe.

Linux:

Add the following to your ~/.bash_profile (or ~/.zshrc, or whatever profile you use):

export CHROME_DRIVER_PATH=path/to/chromedriver

About

OpenAI gym for the Google Chrome dino game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%