-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathagent.py
41 lines (30 loc) · 860 Bytes
/
agent.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import pyautogui
class Agent():
@property
def position(self):
return self.calculate_position()
@property
def weight(self):
return self.calculate_weight()
@staticmethod
def capture(*args, **kwargs):
return pyautogui.screenshot(*args, **kwargs)
def calculate_position(self):
image = self.__class__.capture()
def calculate_weight(self):
image = self.__class__.capture(region=())
@property
def action(self):
return self.get_current_action()
def get_current_acction(self):
return None
@property
def next_action(self):
action_set = (
self.position,
self.weight,
self.action
)
return self.send_to_cnn(action_set)
def send_to_cnn(self):
return None