From 4d1c0d268e0b5619851fda92baf6b94f1f0c17a8 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Thu, 11 Jan 2024 11:05:55 +0000 Subject: [PATCH] Fix reward data type --- src/primaite/game/agent/rewards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/primaite/game/agent/rewards.py b/src/primaite/game/agent/rewards.py index cb8f8cb1..30baad6f 100644 --- a/src/primaite/game/agent/rewards.py +++ b/src/primaite/game/agent/rewards.py @@ -111,9 +111,9 @@ class DatabaseFileIntegrity(AbstractReward): """ database_file_state = access_from_nested_dict(state, self.location_in_state) health_status = database_file_state["health_status"] - if health_status == "corrupted": + if health_status == 3: return -1 - elif health_status == "good": + elif health_status == 1: return 1 else: return 0