diff --git a/agent_parts_main.py b/agent_parts_main.py index 9871e1f..37f1ce7 100644 --- a/agent_parts_main.py +++ b/agent_parts_main.py @@ -14,7 +14,8 @@ from src.interface import Button, Interface from src.agent_parts.limb import Limb from src.ground import * - +from src.agent_parts.vision import Vision +from src.agent_parts.rectangle import Point from src.agent_parts.creature import Creature #NOTE_TO_MYSELF: When add limb is clicked it doesn't go away when unpaused @@ -108,8 +109,8 @@ def add_motorjoint(): environment = Environment(screen, space) environment.ground_type = GroundType.BASIC_GROUND - - creature = Creature(space) + vision: Vision = Vision(Point(0,0)) + creature = Creature(space, vision) # Add limbs to the creature, placing them above the ground #limb1 = creature.add_limb(100, 20, (300, 100), mass=1) # Positioned above the ground diff --git a/main.py b/main.py index 9fe39d8..d07ab4b 100644 --- a/main.py +++ b/main.py @@ -111,7 +111,8 @@ def main(): # Population and creatures population_size = 5 - creatures: list[Creature] = create_creatures(population_size, space) + creature_population: list[Creature] = create_creatures(population_size, space) + creatures = creature_population.copy() creature_instance: Creature = creatures[0] population = create_population(population_size, creature_instance) neat_networks: list[NEATNetwork] = []