From 60805d31ab4ed5a14fcc9242de2afbb5f7ad096e Mon Sep 17 00:00:00 2001 From: Roy <46519674+royderegt@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:00:49 +0100 Subject: [PATCH] Fix bug where angle is taken from the same output as module_type (#583) --- .../genotypes/cppnwin/modular_robot/v2/_body_develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standards/revolve2/standards/genotypes/cppnwin/modular_robot/v2/_body_develop.py b/standards/revolve2/standards/genotypes/cppnwin/modular_robot/v2/_body_develop.py index c1d748079..f65a92c96 100644 --- a/standards/revolve2/standards/genotypes/cppnwin/modular_robot/v2/_body_develop.py +++ b/standards/revolve2/standards/genotypes/cppnwin/modular_robot/v2/_body_develop.py @@ -117,7 +117,7 @@ def __evaluate_cppn( The output ranges between [0,1] and we have 4 rotations available (0, 90, 180, 270). """ - angle = max(0, int(outputs[0] * 4 - 1e-6)) * (np.pi / 2.0) + angle = max(0, int(outputs[1] * 4 - 1e-6)) * (np.pi / 2.0) return module_type, angle