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.
Before running the AI-DINO-GAME project, make sure you have the following prerequisites:
- Python (>=3.11)
- Libraries listed in
requirements.txt
-
Clone the repository:
git clone https://github.com/jsmatias/AI-DINO-GAME.git
-
Navigate to the project directory:
cd AI-DINO-GAME
-
Install the required dependencies:
pip install -r requirements.txt
-
Use the set-environment.ipynb to dynamically set the region of the screen to be scanned.
-
Use the main.ipynb to run the main loop with the settings predefined on the step above.
-
Watch as the neural network learns to play the Dino Game in your Google Chrome browser.
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.
This project is licensed under the MIT License.
This code was based and adapted from SaralTayal123