From fc52d46a06a0c920cdb8e4c824a093639a15815b Mon Sep 17 00:00:00 2001 From: Ondrej Lukas Date: Mon, 25 May 2026 15:00:15 +0200 Subject: [PATCH 1/2] Align default port with the NSG --- netsecgame/agents/base_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsecgame/agents/base_agent.py b/netsecgame/agents/base_agent.py index 28c3f25f..7a556c96 100644 --- a/netsecgame/agents/base_agent.py +++ b/netsecgame/agents/base_agent.py @@ -199,7 +199,7 @@ def request_game_reset( if __name__ == "__main__": # Example usage of BaseAgent - GAME_PORT = 5000 # Change to the appropriate port + GAME_PORT = 9000 # Change to the appropriate port agent = BaseAgent("localhost", GAME_PORT, AgentRole.Attacker) # Register the agent observation = agent.register() From 5ca42434fe3407c7b34c97531311e14aa27466da Mon Sep 17 00:00:00 2001 From: Ondrej Lukas Date: Mon, 25 May 2026 15:01:00 +0200 Subject: [PATCH 2/2] Add deprecation warning --- netsecgame/game/worlds/NetSecGame.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsecgame/game/worlds/NetSecGame.py b/netsecgame/game/worlds/NetSecGame.py index 75181fdf..ade55c1d 100644 --- a/netsecgame/game/worlds/NetSecGame.py +++ b/netsecgame/game/worlds/NetSecGame.py @@ -319,6 +319,8 @@ def _create_state_from_view(self, view:dict, add_neighboring_nets:bool=True)->Ga # Add all controlled hosts to known_hosts known_hosts = known_hosts.union(controlled_hosts) if add_neighboring_nets: + self.logger.info("Adding neighboring networks to the state.") + self.logger.warning("Using 'add_neighboring_nets=True' is deprecated and will be removed in future.") # Extend the known networks with the neighbouring networks # This is to solve in the env (and not in the agent) the problem # of not knowing other networks appart from the one the agent is in