I’m trying to automate the google dinosaur game but cannot seem to detect the obstacles
As part of a course I’m on, one of the tasks is to make a program that automatically plays the google dino game. I have tried to check if the pixels are white or not in certain areas of each screenshot that is taken regularly, if they are not white I know there is an obstacle so I want the player to jump by pressing space.
However, the dinosaur only sometimes detects an object and jumps.
How can I get the program to detect the obstacles more consistently?
I’ve tried checking more pixels and have changed the values many times.