From bc367222a843e72e97f35332a7c68dff1721d94f Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Thu, 4 Jan 2024 12:55:46 +0000 Subject: [PATCH] Change software describe state keys --- src/primaite/game/agent/observations.py | 5 ++++- src/primaite/simulator/system/software.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/primaite/game/agent/observations.py b/src/primaite/game/agent/observations.py index 928aebfd..46c9d75c 100644 --- a/src/primaite/game/agent/observations.py +++ b/src/primaite/game/agent/observations.py @@ -139,7 +139,10 @@ class ServiceObservation(AbstractObservation): service_state = access_from_nested_dict(state, self.where) if service_state is NOT_PRESENT_IN_STATE: return self.default_observation - return {"operating_status": service_state["operating_state"], "health_status": service_state["health_state"]} + return { + "operating_status": service_state["operating_state"], + "health_status": service_state["health_state_visible"], + } @property def space(self) -> spaces.Space: diff --git a/src/primaite/simulator/system/software.py b/src/primaite/simulator/system/software.py index b393ffd8..c3db48fc 100644 --- a/src/primaite/simulator/system/software.py +++ b/src/primaite/simulator/system/software.py @@ -137,8 +137,8 @@ class Software(SimComponent): state = super().describe_state() state.update( { - "health_state": self.health_state_actual.value, - "health_state_red_view": self.health_state_visible.value, + "health_state_actual": self.health_state_actual.value, + "health_state_visible": self.health_state_visible.value, "criticality": self.criticality.value, "patching_count": self.patching_count, "scanning_count": self.scanning_count,