-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent_interface.py
44 lines (34 loc) · 1.08 KB
/
agent_interface.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
42
43
44
from envs.state import State
class AgentInterface:
"""
The interface of an Agent
This class defines the required methods for an agent class
"""
@staticmethod
def info():
"""
Return the agent's information
This function returns the agent's information as a dictionary variable.
The returned dictionary should contain at least the `agent name`.
Returns
-------
Dict[str, str]
"""
raise NotImplementedError
def decide(self, state: State, actions: list):
"""
Generate a sequence of increasing good actions form the `actions` list
This is a generator function; it means it should have no return
statement, but it should yield a sequence of increasing good actions.
Parameters
----------
state: State
Current state of the game
actions: list
List of all possible actions
Yields
------
action
the chosen `action` from the `actions` list
"""
raise NotImplementedError