pauloalves86 / go_dino

AI written in Python for Google Chrome's Dinosaur game
GNU General Public License v3.0
24 stars 7 forks source link

Can't find the game #1

Closed jeffrydane closed 6 years ago

jeffrydane commented 6 years ago

in dino_api.py line 59, screenshotter.monitors[1:-1] return [ ] so the program can't play the dino game

in previous commit i try to change screenshotter.monitors[1:-1] to screenshotter.monitors[1:], somehow it works

but not in this commit.

can you give step-by-step how to setting to exactly run this program?

pauloalves86 commented 6 years ago

I've just committed a fix for this, let me know if it works. If it does not work, could you tell me your OS?

Previously one should run the game on the main monitor, but it is not the case anymore.

marianpavel commented 6 years ago

Hi, I am getting Cannot find the game, I run on OS X. Any help would be appreciated

pauloalves86 commented 6 years ago

Hi @marianpavel, do you use multiple monitor? If so, is the game running on the main monitor? If not, could you try running the game on it?

marianpavel commented 6 years ago

Hi @pauloalves86 , no, I am not using 2 monitors, only the MacBook. I use pycharm, installed all the requirements. Trying to run trainer.py with the chrome original game marked as offline in another corner visible. Also tried other online games, none of them are detected.

pauloalves86 commented 6 years ago

@marianpavel, can you confirm if the fix works?

marianpavel commented 6 years ago

@pauloalves86 doesn't work, will try to set up it on windows to see if it works.

I don't know the cv2 library how is working, I don't think it can find the game.

pauloalves86 commented 6 years ago

@marianpavel, put this code image.save('monitor_{:.2f}.jpg'.format(threshold)) after line 60 at _dinoapi.py and tell me if it creates two images and the dino appear on both of them, please.

marianpavel commented 6 years ago

@pauloalves86 it creates only 1 image and the dyno appear in it. monitor_0 70