From 91dec9e83d5b00a03c1436acba71814aa35bba8c Mon Sep 17 00:00:00 2001 From: SunilSamra Date: Tue, 30 May 2023 11:50:54 +0100 Subject: [PATCH] 1443 - updated test_reward.py to reflect updates to reward.py so that the correct config values are called i.e. compromisedShouldBeGood on the correct steps during the training run --- .../config/one_node_states_on_off_lay_down_config.yaml | 10 +++++----- tests/test_reward.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/config/one_node_states_on_off_lay_down_config.yaml b/tests/config/one_node_states_on_off_lay_down_config.yaml index 355760bf..00f8016e 100644 --- a/tests/config/one_node_states_on_off_lay_down_config.yaml +++ b/tests/config/one_node_states_on_off_lay_down_config.yaml @@ -1,7 +1,7 @@ - itemType: ACTIONS type: NODE - itemType: STEPS - steps: 13 + steps: 15 - itemType: PORTS portsList: - port: '21' @@ -42,7 +42,7 @@ - itemType: RED_POL id: '2' startStep: 3 - endStep: 13 + endStep: 15 targetNodeId: '1' initiator: DIRECT type: FILE @@ -66,7 +66,7 @@ - itemType: RED_POL id: '4' startStep: 6 - endStep: 13 + endStep: 15 targetNodeId: '1' initiator: DIRECT type: OPERATING @@ -90,7 +90,7 @@ - itemType: RED_POL id: '6' startStep: 9 - endStep: 13 + endStep: 15 targetNodeId: '1' initiator: DIRECT type: SERVICE @@ -114,7 +114,7 @@ - itemType: RED_POL id: '8' startStep: 12 - endStep: 13 + endStep: 15 targetNodeId: '1' initiator: DIRECT type: OS diff --git a/tests/test_reward.py b/tests/test_reward.py index 10dfb79c..4925a434 100644 --- a/tests/test_reward.py +++ b/tests/test_reward.py @@ -28,4 +28,4 @@ def test_rewards_are_being_penalised_at_each_step_function(): Average Reward: 2 (26 / 13) """ print("average reward", env.average_reward) - assert env.average_reward == 2.0 + assert env.average_reward == -8.0