From a0a5f2ca38ddd6f2cb6cba3acccd7df15358266d Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Fri, 3 Jan 2025 15:03:01 +0000 Subject: [PATCH] #2912 - Review comment actions following commit revertions --- src/primaite/game/agent/actions/manager.py | 2 -- tests/conftest.py | 27 ---------------------- 2 files changed, 29 deletions(-) diff --git a/src/primaite/game/agent/actions/manager.py b/src/primaite/game/agent/actions/manager.py index b612d9ce..625d8cec 100644 --- a/src/primaite/game/agent/actions/manager.py +++ b/src/primaite/game/agent/actions/manager.py @@ -80,8 +80,6 @@ class ActionManager: self.action_map = {i: (a["action"], a["options"]) for i, a in act_map.items()} # make sure all numbers between 0 and N are represented as dict keys in action map assert all([i in self.action_map.keys() for i in range(len(self.action_map))]) - self.node_names: List[str] = [n["node_name"] for n in nodes] - """List of node names in this action space. The list order is the mapping between node index and node name.""" def get_action(self, action: int) -> Tuple[str, Dict]: """Produce action in CAOS format.""" diff --git a/tests/conftest.py b/tests/conftest.py index 59fe025f..0d73aa07 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -471,33 +471,6 @@ def game_and_agent(): action_space = ActionManager( actions=actions, # ALL POSSIBLE ACTIONS - nodes=[ - { - "node_name": "client_1", - "applications": [ - {"application_name": "WebBrowser"}, - {"application_name": "DoSBot"}, - {"application_name": "C2Server"}, - ], - "folders": [{"folder_name": "downloads", "files": [{"file_name": "cat.png"}]}], - }, - { - "node_name": "server_1", - "services": [{"service_name": "DNSServer"}], - "applications": [{"application_name": "C2Beacon"}], - }, - {"node_name": "server_2", "services": [{"service_name": "WebServer"}]}, - {"node_name": "router"}, - ], - max_folders_per_node=2, - max_files_per_folder=2, - max_services_per_node=2, - max_applications_per_node=3, - max_nics_per_node=2, - max_acl_rules=10, - protocols=["TCP", "UDP", "ICMP"], - ports=["HTTP", "DNS", "ARP"], - ip_list=["10.0.1.1", "10.0.1.2", "10.0.2.1", "10.0.2.2", "10.0.2.3"], act_map={}, ) observation_space = ObservationManager(NestedObservation(components={}))