Skip to content

Commit

Permalink
refactor: Update ground type in main.py to use Perlin noise
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasfremming committed Nov 3, 2024
1 parent de045e0 commit 797eae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 797eae0

Please sign in to comment.