utay / dino-ml

🦎 Simple AI to teach Google Chrome's offline dino to jump obstacles
48 stars 23 forks source link

I am getting an error "game not found!" #4

Closed jimhoggey closed 5 years ago

jimhoggey commented 6 years ago

what does this mean and how can I fix it? I have terminal to one side and google chrome of the other with the offline dino game on it. what am I doing wrong

NeliocmSampaio commented 6 years ago

I got the same error, so I changed the color code from (83, 83, 83, 255) to (84, 84, 84) and it worked.

rsohlot commented 6 years ago

I have changed it to (83,83,83) and it worked for me

jimhoggey commented 6 years ago

I have tried both 84,84,84 and 83,83,83 but sadly none of them worked for me ;-(( what is your set up like where is your command line and dino game? screen shot 2018-07-10 at 11 28 41 am can someone plz help it would be great ;-))

rsohlot commented 6 years ago

@jimhoggey have you checked the screen capturing by the command. and try to debug it by printing every pixel scanned in a file or on the terminal.

utay commented 6 years ago

Hey @jimhoggey, it's certainly not a pixel color issue (google 404 page is the same for everyone, right? :)) but rather that your screen hasn't the same size than mine at the time I developed the AI. I hard coded the screen size (https://github.com/utay/dino-ml/blob/master/dino-ml/scanner.py#L27) and you may want to change those values to get it working :+1:

ChathurangiShyalika commented 5 years ago

I am getting the same error "Game not found!". I have set the screen resolution as the screen size in here. image = screenshot(0, 0, 1600, 900)

My setup is as follows. I ran the ai.py and the chrome in the same screen.

ScreenCapture

Can someone please help!

rsohlot commented 5 years ago

@ChathurangiShyalika Don't start the game. It will be started by the program. Try to change the capture area of the image, basically, it is checking for the colour (83, 83, 83, 255) in every pixel read (in scanner.py, line 33). keep the chrome in full screen or reduce the skipping limit in for loop, from 10 to 5 or 4...

utay commented 5 years ago

That's it, thanks @rsohlot! Hope it will help you @ChathurangiShyalika, I'm gonna close this issue but feel free to open a new one if something isn't clear :)