Spaces:
Running
Running
Commit
·
5558ad1
1
Parent(s):
92a23e7
add map crunch
Browse files- .DS_Store +0 -0
- dev_geoguessr_bot.ipynb +0 -0
- geoguessr_bot.py +1 -1
- main_single_player.py +15 -0
- map_chrunch.txt +1 -0
- screen_regions.yaml +16 -16
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
dev_geoguessr_bot.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
geoguessr_bot.py
CHANGED
|
@@ -168,7 +168,7 @@ class GeoBot:
|
|
| 168 |
# pyautogui.moveTo(self.screen_w-50, self.screen_h-80, duration=1.5)
|
| 169 |
# print(self.screen_w-50, self.screen_h-80)
|
| 170 |
print('finish moving')
|
| 171 |
-
sleep(
|
| 172 |
|
| 173 |
# Clicking on the predicted location
|
| 174 |
pyautogui.click(x, y, duration=0.5)
|
|
|
|
| 168 |
# pyautogui.moveTo(self.screen_w-50, self.screen_h-80, duration=1.5)
|
| 169 |
# print(self.screen_w-50, self.screen_h-80)
|
| 170 |
print('finish moving')
|
| 171 |
+
sleep(0.5)
|
| 172 |
|
| 173 |
# Clicking on the predicted location
|
| 174 |
pyautogui.click(x, y, duration=0.5)
|
main_single_player.py
CHANGED
|
@@ -37,7 +37,22 @@ def play_turn(bot: GeoBot, plot: bool = False):
|
|
| 37 |
pyautogui.press(" ")
|
| 38 |
sleep(2)
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
def main(turns=5, plot=False):
|
| 42 |
if "screen_regions.yaml" not in os.listdir():
|
| 43 |
screen_regions = get_coords(players=1)
|
|
|
|
| 37 |
pyautogui.press(" ")
|
| 38 |
sleep(2)
|
| 39 |
|
| 40 |
+
def play_turn_with_mapcrunch(bot: GeoBot, plot: bool = False):
|
| 41 |
+
# TODO finish here
|
| 42 |
+
multiturn = True
|
| 43 |
+
# read one line form file : map_chrunch.txt
|
| 44 |
|
| 45 |
+
# open the url and do javascript stuff to hide off street name
|
| 46 |
+
|
| 47 |
+
# screen shot the map and get answer
|
| 48 |
+
|
| 49 |
+
if multiturn:
|
| 50 |
+
# we can play computer use agent by click the arrow in the env
|
| 51 |
+
pass
|
| 52 |
+
|
| 53 |
+
# compare to the golden label in url
|
| 54 |
+
|
| 55 |
+
sleep(1)
|
| 56 |
def main(turns=5, plot=False):
|
| 57 |
if "screen_regions.yaml" not in os.listdir():
|
| 58 |
screen_regions = get_coords(players=1)
|
map_chrunch.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
http://www.mapcrunch.com/p/47.398717_8.495763_340.08_11.71_0
|
screen_regions.yaml
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
confirm_button_1:
|
| 2 |
-
-
|
| 3 |
-
-
|
| 4 |
hobart_1:
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
kodiak_1:
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
map_bot_right_1:
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
map_top_left_1:
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
next_round_button:
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
screen_bot_right:
|
| 20 |
-
-
|
| 21 |
-
-
|
| 22 |
screen_top_left:
|
| 23 |
-
-
|
| 24 |
-
-
|
|
|
|
| 1 |
confirm_button_1:
|
| 2 |
+
- 1201
|
| 3 |
+
- 1080
|
| 4 |
hobart_1:
|
| 5 |
+
- 1609
|
| 6 |
+
- 937
|
| 7 |
kodiak_1:
|
| 8 |
+
- 1181
|
| 9 |
+
- 773
|
| 10 |
map_bot_right_1:
|
| 11 |
+
- 1686
|
| 12 |
+
- 1049
|
| 13 |
map_top_left_1:
|
| 14 |
+
- 1137
|
| 15 |
+
- 658
|
| 16 |
next_round_button:
|
| 17 |
+
- 1066
|
| 18 |
+
- 1029
|
| 19 |
screen_bot_right:
|
| 20 |
+
- 1717
|
| 21 |
+
- 1112
|
| 22 |
screen_top_left:
|
| 23 |
+
- 492
|
| 24 |
+
- 157
|