/DinoRunTutorial

Accompanying code for Paperspace tutorial "Build an AI to play Dino Run"

Primary LanguageJupyter NotebookMIT LicenseMIT

Dino Run Tutorial

If you want train the model, please follow steps firstly Download and build the envInstall baselinesDownload chromedriverTraining&Predicting

You can button the key that ctrl+c to stop the training. It will still train the model at the next training time.

If it gets a object_error at pickle, please follow step at object_error

Video Sample

Download and build the env

git clone https://github.com/leeivan1007/DinoRunTutorial.git
cd DinoRunTutorial
conda env create --file environment.yaml
source activate dino_rl

Install baselines

Open_AI reinforcement learning

git clone hhttps://github.com/openai/baselines.git
cd baselines
pip install -e .

Download chromedriver

You can access this link https://chromedriver.chromium.org/,select the version(Latest stable release), and get the version of your OS

After download the file, decompress the file as the specified path.

If you follow the step. The chromedriver will be place at the same level with the repo's folder.

root_home/
         chromedriver
         DinoRunTutorial

Or you can revision the var of the path (chrome_driver_path).

Training&Predicting

When the dino is running, it will train the model at a cycle time.

python unit5_dino.py

object_error

If it has a error when pickle file load the object. Or you want to remove the trained file. Please run the code below.

python clear_objects.py 

Original reference

Accompanying code for Paperspace tutorial "Build an AI to play Dino Run"