From 797eae007fc6a0a28de3cc3e27b1b12a4c9e595b Mon Sep 17 00:00:00 2001 From: tobiasfremming Date: Sun, 3 Nov 2024 19:14:24 +0100 Subject: [PATCH] refactor: Update ground type in main.py to use Perlin noise --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 8620b3d..4875e31 100644 --- a/main.py +++ b/main.py @@ -91,7 +91,7 @@ def create_creature(in_nodes: int,out_nodes: int): space.gravity = (0, 981) # Gravity pointing downward environment = Environment(screen, space) - environment.ground_type = GroundType.BASIC_GROUND + environment.ground_type = GroundType.PERLIN population_size = 10 creatures = create_creatures(population_size, space) @@ -123,11 +123,11 @@ def create_creature(in_nodes: int,out_nodes: int): environment.render() # TODO: vision should be part of a creature, and not environment - print(environment.vision.get_near_periphery()) inputs = np.array([environment.vision.get_near_periphery().x, environment.vision.get_near_periphery().y, environment.vision.get_far_periphery().x, environment.vision.get_far_periphery().y]) + for index, creature in enumerate(creatures): network = population[index] for joint_rate in creature.get_joint_rates():