Skip to content

Commit 7c47bae

Browse files
authored
Merge pull request #355 from stratosphereips/ondra-update-docs
Ondra update docs
2 parents 4ec1b5e + a86f59d commit 7c47bae

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

AIDojoCoordinator/worlds/NSEGameCoordinator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,7 @@ async def reset(self)->bool:
947947
# write all steps in the episode replay buffer in the file
948948
self.logger.info('--- Reseting NSG Environment to its initial state ---')
949949
# change IPs if needed
950+
# This is done ONLY if it is (i) enabled in the task config and (ii) all agents requested it
950951
if self.task_config.get_use_dynamic_addresses():
951952
if all(self._randomize_topology_requests.values()):
952953
self.logger.info("All agents requested reset with randomized topology.")

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The Action consists of two parts
7474
#### List of ActionTypes
7575
- **JoinGame**, params={`agent_info`:AgentInfo(`<name>`, `<role>`)}: Used to register agent in a game with a given `<role>`.
7676
- **QuitGame**, params={}: Used for termination of agent's interaction.
77-
- **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.
77+
- **ResetGame**, params={`request_trajectory`:`bool` (default=`False`), `randomize_topology`=`bool` (default=`True`)}: 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 request topology to be changed in the next episode. NOTE: the topology is changed only if (i) the `use_dynamic_ips` is set to `True` in the task configuration AND all active agents ask for the change.
7878
---
7979
- **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.
8080
- **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.

docs/configuration.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ The environment part defines the properties of the environment for the task (see
1313
- `two_networks` - 5 clients and 5 servers in separate local networks + remote C&C server
1414
- `three_net_scenario` - 5 clients in a local network, 5 servers split in 2 additional local networks + remote C&C server
1515
- `save_tajectories` - if `True`, interaction of the agents is serialized and stored in a file
16-
- `use_dynamic_addresses` - if `True`, the network and IP addresses defined in `scenario` are randomly changed at the beginning of **EVERY** episode (the network topology is kept as defined in the `scenario`. Relations between networks are kept, IPs inside networks are chosen at random based on the network IP and mask)
16+
- `use_dynamic_addresses` - if `True`, the network and IP addresses defined in `scenario` are randomly changed at the beginning of an episode (the network topology is kept as defined in the `scenario`. Relations between networks are kept, IPs inside networks are chosen at random based on the network IP and mask). The change also depend on the input from the agents:
17+
18+
|Task configuration| Agent reset request | Result|
19+
|----------------------|----------------------|----------------------|
20+
|`use_dynamic_ips = True` | `randomize_topology = True`| Changed topology |
21+
|`use_dynamic_ips = True` | `randomize_topology = False`| SAME topology |
22+
|`use_dynamic_ips = False` | `randomize_topology = True`| SAME topology |
23+
|`use_dynamic_ips = False` | `randomize_topology = False`| SAME topology |
24+
25+
In summary, the topology change (IP randomization) can't change without allowing it in the task configuration. If allowed in the task config YAML, it can still be rejected by the agents.
26+
1727
- `use_firewall` - if `True` firewall rules defined in `scenario` are used when executing actions. When `False`, the firewall is ignored, and all connections are allowed (Default)
1828
- `use_global_defender` - if `True`, enables global defendr which is part of the environment and can stop interaction of any playing agent.
1929
- `required_players` - Minimum required players for the game to start (default 1)

0 commit comments

Comments
 (0)