Giter Club home page Giter Club logo

chrometrex-ml's Introduction

ChromeTrex-ML

We used supervised learning and developed a reinforcement learning approach to learn the Chrome TRex game at very high speeds that a human player would find difficult.

This gif is the final product: an actual run in the advanced difficulty mode of the game generated from the best predictions from the highest performing ML algorithm. The highest accuracy achieved was a 97% obstacle clearance rate at the normal game speed and 89.8% at very high speeds. The video is not sped up.

Alt Text

A paper describing this project is here: https://www.dropbox.com/s/2fv6wsfxtymz5fr/Team%2022%20Final%20Paper.pdf?dl=0

The paper explains the problem we were attempting to solve, feature representations tested, the various ML algorithms that were tested, and outlines a pseudocode for the reinforcement learning approach.

The file 'main_auto_new_multiple.py' is an automated version of the Chrome game where the dinosaur makes random guesses for when to jump over an obstacle while running at random speeds, and obstacles of random sizes are generated. All examples of successful jumps are saved to a file with information about the environment and the distance the dinosaur jumped at. These are used for learning.

The file 'algos.py' pre-processes this data for use in a variety of ML algorithms, and each cell runs a different type of model. Then, test data is generated, and predictions are made. These test obstacles and speed, along with their corresponding predictions for jump distances are saved to a file.

The file 'models_dino_multiple.py' extracts the predictions and the corresponding obstacles and speeds and runs the game for 250 obstacles. This will yield the accuracy of the model that was used to generate the predictions.

  • The original pygame version of the game is by Shivam Shekhar: https://github.com/shivamshekhar/Chrome-T-Rex-Rush * We modified it to remove pterodactyles, generate exapmles of good jumps and save this to a spreadsheet, customize random obstacles and speeds, run the testing from the ML predictions, and add additional gameplay information to the display.

chrometrex-ml's People

Contributors

omkarsavant avatar

Watchers

James Cloos 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.