Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.62 KB

README.md

File metadata and controls

32 lines (25 loc) · 1.62 KB

Reinforcement Learning Agent for Chrome Dino Game

This is my project for Reinforcement Learning class that I took in University of Pompeu Fabra. Project created using Python.

Table of contents

General info

The aim of this project is train a Reinforcement Learning Agent which will play epic Chrome Dino game that everybody played at least once in a life. I created a custom Gym environment for the DinoGame, designed for training reinforcement learning agents to conquer the hurdles of this popular offline game and DQN RL agent which trained on this environment.

Environment Info

  • Observation Space: Grayscale image (1, 83,100) representing the game screen.
  • Action Space: Discrete actions - 0 for Jump, 1 for Down, and 2 for No action.
  • Rewards: +1 for actions Jump, -100 if the game is done, and +3 for No action.
  • Rendering: Visual representation using OpenCV.

Technologies

Project is created with Python. The main packages used:

  • gym, gymnasium (Environment)
  • Numpy (Matrix operations)
  • Matplotlib (Data visualization)
  • OpenCV (Picture manipulation)
  • Pytesseract (Image to string, OCR)
  • PyautoGUI (Keyboard inputs)

Visualization

Picture manipulation from raw input to the desired form. Black and white picture shows raw input other picture shows last form of the picture which used while training the model.

Ekran Resmi 2024-06-25 13 28 33