Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AIDojoCoordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ async def _process_reset_game_action(self, agent_addr: tuple, reset_action:Actio
# add reset request for this agent
self._reset_requests[agent_addr] = True
# register if the agent wants to randomize the topology
self._randomize_topology_requests[agent_addr] = reset_action.parameters.get("randomize_topology", False)
self._randomize_topology_requests[agent_addr] = reset_action.parameters.get("randomize_topology", True)
if all(self._reset_requests.values()):
# all agents want reset - reset the world
self.logger.debug(f"All agents requested reset, setting the event")
Expand Down
3 changes: 2 additions & 1 deletion AIDojoCoordinator/docs/Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ ActionType is unique Enum that determines what kind of action is agent playing.
### List of actions
- **JoinGame**, params={`agent_info`:AgentInfo(\<name\>, \<role\>)}: Used to register agent in a game with a given \<role\>.
- **QuitGame**, params={}: Used for termination of agent's interaction.
- **ResetGame**, params={`request_trajectory`:`bool`}: Used for requesting reset of the game to it's initial position. If `request_trajectory = True`, the coordinator will send back the complete trajectory of the previous run in the next message.
- **ResetGame**, params={`request_trajectory`:`bool`(default=`False`), `randomize_topology`:`bool` (default=`False`)}: Used for requesting reset of the game to it's initial position. If `request_trajectory = True`, the coordinator will send back the complete trajectory of the previous run in the next message.
If `randomize_topology=True`, the agent requests randomization of IPs for the next episode. NOTE: randomization takes place only if all playing agents request it.
---
- **ScanNetwork**, params{`source_host`:\<IP\>, `target_network`:\<Network\>}: Scans the given \<Network\> from a specified source host. Discovers ALL hosts in a network that are accessible from \<IP\>. If successful, returns set of discovered \<IP\> objects.
- **FindServices**, params={`source_host`:\<IP\>, `target_host`:\<IP\>}: Used to discover ALL services running in the `target_host` if the host is accessible from `source_host`. If successful, returns a set of all discovered \<Service\> objects.
Expand Down
1 change: 1 addition & 0 deletions AIDojoCoordinator/docs/Coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Coordinator, having the role of the middle man in all communication between the
`self.agents`: information about connected agents {`agent address`: (`agent_name`,`agent_role`)}
`self._agent_steps`: step counter for each agent in the current episode
`self._reset_requests`: dictionary where requests for episode reset are collected (the world resets only if **all** active agents request reset)
`self._randomize_topology_requests`: dictionary where requests for topology randomization are collected (the world randomizes the topology only if **all** active agents request reset)
`self._agent_observations`: current observation per agent
`self._agent_starting_position`: starting position (with wildcards, see [configuration](../README.md#task-configuration)) per agent
`self._agent_states`: current GameState per agent
Expand Down
2 changes: 1 addition & 1 deletion AIDojoCoordinator/netsecenv_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ env:
# random_seed: 42
scenario: 'scenario1'
use_global_defender: False
use_dynamic_addresses: True
use_dynamic_addresses: False
use_firewall: True
save_trajectories: False
required_players: 1
Expand Down