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: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,5 +275,25 @@ This will load and run the unit tests in the `tests` folder.
275
275
## Code adaptation for new configurations
276
276
The code can be adapted to new configurations of games and for new agents. See [Agent repository](https://github.com/stratosphereips/NetSecGameAgents/tree/main) for more details.
277
277
278
+
## Function calling diagram
279
+
280
+
```
281
+
_handle_world_responses
282
+
├── _world_response_queue.get() # Called continuously to get a response from the World Response Queue.
283
+
├── _process_world_response # Called to process the response from the world.
284
+
│ ├── _process_world_response_created # Called if agent status is JoinRequested. Processes agent creation.
285
+
│ ├── _process_world_response_reset_done # Called if agent status is ResetRequested. Processes agent reset.
286
+
│ ├── _remove_player # Called if agent status is Quitting. Removes the agent from the world.
287
+
│ └── _process_world_response_step # Called if agent status is Ready, Playing, or PlayingActive. Processes a game step.
288
+
├── _answers_queues[agent_id].put() # Called to place the processed response in the agent's answer queue.
289
+
└── asyncio.sleep() # Called to yield control back to the event loop.
290
+
291
+
_process_world_response
292
+
├── _process_world_response_created # Called if agent status is JoinRequested. Processes agent creation.
293
+
├── _process_world_response_reset_done # Called if agent status is ResetRequested. Processes agent reset.
294
+
├── _remove_player # Called if agent status is Quitting. Removes the agent from the world.
295
+
└── _process_world_response_step # Called if agent status is Ready, Playing, or PlayingActive. Processes a game step.
296
+
```
297
+
278
298
## About us
279
299
This code was developed at the [Stratosphere Laboratory at the Czech Technical University in Prague](https://www.stratosphereips.org/).
if (agent_addrinself._agent_trajectoriesand"trajectory"inself._agent_trajectories[agent_addr] and"actions"inself._agent_trajectories[agent_addr]["trajectory"]):
elifagent_statusin [AgentStatus.FinishedBlocked, AgentStatus.FinishedGameLost, AgentStatus.FinishedGoalReached, AgentStatus.FinishedMaxSteps]:# This if does not make sense. Put together with the previous (sebas)
# We need to copy the list before the copying, so we avoid modifying it when it is returned. Modifycation of passed list is the default behavior in Python
0 commit comments