Giter Club home page Giter Club logo

dinorl's Introduction

Dino Game Reinforcement Learning Project

Overview

This repository is dedicated to solving the Google Chrome Dino game using reinforcement learning techniques. By leveraging advanced machine learning models and architectures, we provide a technical solution that allows a trained agent to play and navigate the game efficiently.

Technical Approach

  1. Object Detection: We use YoloV8 with fine-tuning to detect objects within the game's images. YoloV8 was selected for its training speed, crucial for the iterative nature of reinforcement learning.

  2. Feature Extraction: From the object detection process, features such as the distance to the nearest obstacle, its height, and its bounding box are extracted. Additionally, the altitude of the Dino and its position in the previous frame are also considered. This detailed information is crucial for making real-time decisions in the game. The use of a multi-layer perceptron architecture aids in rapid inference, a key factor in the time-sensitive environment of the game.

  3. Deep Q-Network (DQN): The implementation includes enhancements like Prioritized Replay Buffer and Noisy Layers for effective exploration, along with a Dueling network architecture to separately assess the value of states and the advantage of actions.

Installation

To install and run the project, follow these steps:

Prerequisites

  • An Anaconda distribution of Python installed on your machine. CUDA with a Nvidia GPU for tensorRT.

Setup Environment

  1. Clone the repository:

    git clone https://github.com/peduajo/DinoRL.git
    cd DinoRL
  2. Create a Conda environment using the provided environments.yml file:

    conda env create -f environments.yml
  3. Activate the newly created environment:

    conda activate dino_rl

Training

To start training the DQN model, ensure that your computer’s internet connection is turned off (to prevent unwanted updates or interruptions), and run the following command:

python train_dqn.py

Contribution

Contributions are welcome. Please submit pull requests or open an issue if you have suggestions or find bugs. Let's make the Dino game AI better together!

dinorl's People

Contributors

peduajo avatar

Watchers

 avatar Kostas Georgiou 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.