Bot Plays Chrome Dinosaur Game - Python

Опубликовано: 27 Июль 2026
на канале: Constant Druon
67
0

I build this bot using Python. I used OpenCV for image processing, PyAutoGui to control my laptop GUI and MSS to take fast screenshots.

So the basic logic of this bot is to mimic how a human plays the game. A human sees the obstacle and tries to time the jump of the Dino to avoid the obstacle. For my bot, I did the same. Basically, here it takes a screenshot of the T-Rex game screen and check the position of a tree or a bird obstacle in that image. If the obstacle is close enough to the Dino, I ask the Dino to jump. That's it!

My code is open source and available on my Github: https://github.com/waraness99/google-dino-...