Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsmatias/ai-dino-game
A Python project that uses a neural network to learn and play the Google Chrome Dino Game.
https://github.com/jsmatias/ai-dino-game
keras neural-network python tensorflow
Last synced: 16 days ago
JSON representation
A Python project that uses a neural network to learn and play the Google Chrome Dino Game.
- Host: GitHub
- URL: https://github.com/jsmatias/ai-dino-game
- Owner: jsmatias
- Created: 2023-08-03T10:14:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-03T10:44:33.000Z (over 1 year ago)
- Last Synced: 2024-11-13T18:32:52.928Z (3 months ago)
- Topics: keras, neural-network, python, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 251 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI-DINO-GAME
AI-DINO-GAME is a Python project that utilizes a neural network to play the Google Chrome Dino Game. The neural network is trained to scan the screen and make decisions to control the dino's actions, allowing it to learn and improve its performance over time.
## Table of Contents
- [AI-DINO-GAME](#ai-dino-game)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Training](#training)
- [License](#license)
- [Acknowledgement](#acknowledgement)## Getting Started
### Prerequisites
Before running the AI-DINO-GAME project, make sure you have the following prerequisites:
- Python (>=3.11)
- Libraries listed in `requirements.txt`### Installation
1. Clone the repository:
```bash
git clone https://github.com/jsmatias/AI-DINO-GAME.git
```2. Navigate to the project directory:
```bash
cd AI-DINO-GAME
```3. Install the required dependencies:
```bash
pip install -r requirements.txt
```## Usage
1. Use the set-environment.ipynb to dynamically set the region of the screen to be scanned.
2. Use the main.ipynb to run the main loop with the settings predefined on the step above.
3. Watch as the neural network learns to play the Dino Game in your Google Chrome browser.
## Training
The neural network is trained using a combination of reinforcement learning techniques. The module `environment.py` takes screen shots, prepare the data, and control the keyboard to interaction with the dino game. The module `agent.py` contains the neural network and is responsible for the learning process as well as predicting the best actions based on image analysis.
## License
This project is licensed under the [MIT License](LICENSE).
## Acknowledgement
This code was based and adapted from [SaralTayal123](https://github.com/SaralTayal123/ChromeDinoAI)