OpenAI gym for the Google Chrome Dino game.
git clone https://github.com/mattstruble/gym-chrome-dino.git
cd gym-chrome-dino
pip install -e .
import gym
import gym_chrome_dino
env = gym.make('ChromeDino-v0')
- 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.
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:
Add a new system environment PATH equal to: CHROME_DRIVER_PATH=path\to\chromedriver.exe
.
Add the following to your ~/.bash_profile
(or ~/.zshrc
, or whatever profile you use):
export CHROME_DRIVER_PATH=path/to/chromedriver