When an agent performs a "ScanNetwork" action, the environment iterates over all registered IP addresses in the game to determine whether they belong to the scanned network. Inside this loop, the code was doing: netaddr.IPNetwork(str(action.parameters["target_network"])).
proposed change:
moved the target_network = netaddr.IPNetwork(...) instantiation outside of the loop.
When an agent performs a "ScanNetwork" action, the environment iterates over all registered IP addresses in the game to determine whether they belong to the scanned network. Inside this loop, the code was doing: netaddr.IPNetwork(str(action.parameters["target_network"])).
proposed change:
moved the target_network = netaddr.IPNetwork(...) instantiation outside of the loop.