From 429307950054364b56ba2b96693c508280333040 Mon Sep 17 00:00:00 2001 From: adaickalavan Date: Thu, 9 Feb 2023 11:10:19 -0500 Subject: [PATCH] Fix score computation. --- CHANGELOG.md | 1 + smarts/env/gymnasium/wrappers/metrics.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6307331305..eeabb7e3b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Copy and pasting the git commit messages is __NOT__ enough. - Fixed an exit error that occurs when envision attempts to close down. - Clarified the actions for `ActionSpaceType.Continuous` and `ActionSpaceType.ActuatorDynamic` in their respective docstrings. - Excluded from wheel any scenario build files in pattern `smarts/**/build/**/*.xml`. +- Fixed an unintended regression in the metrics. ### Removed - Removed duplicated `smarts.env.gymnasium.action_conversion` module. ### Security diff --git a/smarts/env/gymnasium/wrappers/metrics.py b/smarts/env/gymnasium/wrappers/metrics.py index 5c5849591b..4333b9e179 100644 --- a/smarts/env/gymnasium/wrappers/metrics.py +++ b/smarts/env/gymnasium/wrappers/metrics.py @@ -291,7 +291,7 @@ def score(self) -> Score: humanness = _humanness(costs=costs_tot, agents_tot=agents_tot) rules = _rules(costs=costs_tot, agents_tot=agents_tot) time = _time(counts=counts_tot) - overall = completion * (1 - time) * (1 - humanness) * (1 - rules) + overall = completion * (1 - time) * humanness * rules return Score( completion=completion,