You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Coordinator.md
+11-29Lines changed: 11 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,17 @@ Coordinator, having the role of the middle man in all communication between the
14
14
15
15
1.`Actions queue` is a queue in which the agents submit their actions. It provides N:1 communication channel in which the coordinator receives the inputs.
16
16
2.`Answer queue` is a separeate queue **per agent** in which the results of the actions are send to the agent.
17
-
3.
17
+
3.`World action queue` is a queue used for sending the acions from coordinator to the AI Dojo world
18
+
4.`World response queue` is a channel used for wolrd -> coordinator communicaiton (responses to the agents' action)
`self._actions_queue`: asycnio queue for agent -> aidojo_world communication
23
-
`self._answers_queue`: asycnio queue for aidojo_world -> agent communication
23
+
`self._actions_queue`: asycnio queue for agents -> coordinator communication
24
+
`self._answer_queues`: dictionary of asycnio queues for coordinator -> agent communication (1 queue per agent)
25
+
`self._world_action_queue`: asycnio queue for coordinator -> world queue communication
26
+
`self._world_response_queue`: asycnio queue for world -> coordinator queue communication
27
+
`self.task_config`: Object with the configuration of the scenario
24
28
`self.ALLOWED_ROLES`: list of allowed agent roles [`Attacker`, `Defender`, `Benign`]
25
29
`self._world`: Instance of `AIDojoWorld`. Implements the dynamics of the world
26
30
`self._CONFIG_FILE_HASH`: hash of the configuration file used in the interaction (scenario, topology, etc.). Used for better reproducibility of results
@@ -33,33 +37,11 @@ Coordinator, having the role of the middle man in all communication between the
33
37
### Agent information components
34
38
`self.agents`: information about connected agents {`agent address`: (`agent_name`,`agent_role`)}
35
39
`self._agent_steps`: step counter for each agent in the current episode
36
-
`self._reset_requests`: dictionary where requests for episode reset are collected (the world resets only if ALL agents request reset)
40
+
`self._reset_requests`: dictionary where requests for episode reset are collected (the world resets only if **all** active agents request reset)
37
41
`self._agent_observations`: current observation per agent
38
42
`self._agent_starting_position`: starting position (with wildcards, see [configuration](../README.md#task-configuration)) per agent
39
43
`self._agent_states`: current GameState per agent
40
-
`self._agent_statuses`: status of each agent. One of following options:
41
-
- `playing`: agent is registered and can participate in current episode. Can't influence the episode termination
42
-
- `playing_active`: agent is registered and can participate in current episode. It has `goal` and `max_steps` defined and can influence the termination of the episode
43
-
- `goal_reached`: agent has reached it's goal in this episode. It can't perform any more actions until the interaction is resetted.
44
-
- `blocked`: agent has been blocked. It can't perform any more actions until the interaction is resetted.
45
-
- `max_steps`: agent has reached it's maximum allowed steps. It can't perform any more actions until the interaction is resetted.
46
-
47
-
44
+
`self._agent_last_action`: last Action per agent
45
+
`self._agent_statuses`: status of each agent. One of AgentStatus
48
46
`self._agent_rewards`: dictionary of final reward of each agent in the current episod. Only agent's which can't participate in the ongoing episode are listed.
49
-
`self._agent_trajectories`: complete trajectories for each agent in the ongoing episode
50
-
51
-
## The format of the messages to the agents is
52
-
{
53
-
"to_agent": address of client,
54
-
"status": {
55
-
"#players": number of players,
56
-
"running": true or false,
57
-
"time": time in game,
58
-
} ,
59
-
"message": Generic text messages (optional),
60
-
"state": (optional) {
61
-
"observation": observation_object,
62
-
"ended": if the game ended or not,
63
-
"reason": reason for ending
64
-
}
65
-
}
47
+
`self._agent_trajectories`: complete trajectories for each agent in the ongoing episode
0 commit comments