Giter VIP home page Giter VIP logo

dino-_dash-_ai's Introduction

Dino_Dash_AI: An AI-Powered Chrome Dino Game Bot

Welcome to Dino_Dash_AI! This project showcases an AI-powered bot that plays the popular Chrome Dino Game. Leveraging PyTorch and EfficientNet, this bot can automatically navigate the game and avoid obstacles with precision.

image

Table of Contents

Overview

Dino_Dash_AI uses a deep learning model trained with PyTorch to recognize obstacles in the Chrome Dino Game and make real-time decisions about when to jump. The project demonstrates the power of AI in gaming and provides insights into the training and implementation of an AI game bot.

Features

  • EfficientNet v2_s Architecture: High accuracy with a small number of parameters.
  • Real-Time Decision Making: The bot makes decisions on the fly, ensuring smooth gameplay.
  • Data Augmentation: Enhances training data to improve model generalization.
  • Detailed Documentation: Comprehensive blog post explaining the training process, model architecture, and bot implementation.

Installation

Prerequisites

  • Python 3.8 or higher
  • PyTorch
  • OpenCV
  • NumPy

Steps

  1. Clone the repository:

    git clone https://github.com/Hairul343/Dino_Dash_AI.git
    cd Dino_Dash_AI
  2. Install dependencies:

    pip install -r requirements.txt

Usage

Running the Bot

  1. Start the Chrome Dino Game: Open the Chrome browser and go to chrome://dino.

  2. Run the bot:

    python dino_bot.py

The bot will start playing the game automatically.

Training the Model

To train the model from scratch:

  1. Prepare the Dataset: Collect images from the Chrome Dino Game, labeling obstacles and actions (jump or no jump).

  2. Train the Model:

    python train_model.py --data_path ./data --epochs 50 --batch_size 32
  3. Evaluate the Model:

    python evaluate_model.py --model_path ./models/efficientnet_v2_s.pth --test_data_path ./test_data

Implementation Details

Model Architecture

The bot uses the EfficientNet v2_s architecture, chosen for its balance between accuracy and computational efficiency. The model is trained to recognize obstacles and decide when to jump.

Data Augmentation

Data augmentation techniques such as random cropping, flipping, and color jittering are used to increase the diversity of the training data and improve model generalization.

Real-Time Decision Making

The bot captures the game screen in real-time, processes the image to detect obstacles, and sends jump commands based on the model's predictions.

Results

The bot demonstrates high accuracy in recognizing obstacles and making timely jumps, effectively navigating the Chrome Dino Game. Detailed performance metrics and results are available in the blog post linked below.

Contributing

We welcome contributions! If you'd like to contribute, please fork the repository and submit a pull request with your changes. Ensure all tests pass before submitting your PR.

Guidelines

  • Follow the existing code style.
  • Write clear and descriptive commit messages.
  • Include tests for any new features or bug fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

For any questions or issues, please open an issue on this repository or contact the maintainers.

dino-_dash-_ai's People

Contributors

hairul343 avatar

Stargazers

 avatar

Watchers

 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.