Coder Social home page Coder Social logo

chrome_dino_rl's Introduction

Reinforced Learning Dino Chrome

A reinforced learning AI model for chrome Dino game using Python and Deep learning

Model

For the model i used a DQN (Deep Q-Network) algorithm with a CnnPolicy on my game environment from stable_baselines3 library for a total of 10000 steps. Optimal models were saved every 1000 steps so in the end i had a total of 10 trained models.

Steps

  • Created a WebGame class environment with step, render, reset, close, get_observaion and a get_done functions for each of the Dino game needs
  • Tested the environment functionality and run it on 10 games
  • Created a CallBack function for saving the model on specific steps i chose
  • Created the DQN model and trained it with 10000 steps (10 total models)

Results

**This project was done for educational purposes and getting intoduced to reinforced machine learning methods. That means that for optimal results alot more training steps are required but with this sample it is still visible that there is a significant improvement.

Before training

untrained
giving us an average 5 runs score of: 31.6

After training

trained
giving us an average 5 runs score of: 91.2

Requirements

  • stable_baselines3
  • pyautogui
  • pytesseract
  • cv2
  • mss
  • gym

chrome_dino_rl's People

Contributors

arcaneirvine avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.