Merge branch 'master' of https://git.apisb.me/Thaen/DynamicAbstractionSystem
Some checks failed
Build Simulation and Test / Run All Tests (push) Has been cancelled
Some checks failed
Build Simulation and Test / Run All Tests (push) Has been cancelled
# Conflicts: # core/simulation_engine.py # ui/hud.py
This commit is contained in:
commit
4a4f7a75c5
@ -95,6 +95,14 @@ class SimulationEngine:
|
||||
|
||||
return world
|
||||
|
||||
def _count_cells(self):
|
||||
count = 0
|
||||
for entity in self.world.get_objects():
|
||||
if isinstance(entity, DefaultCell):
|
||||
count += 1
|
||||
return count
|
||||
|
||||
|
||||
def run(self):
|
||||
while self.running:
|
||||
self._handle_frame()
|
||||
|
||||
@ -386,7 +386,7 @@ class DefaultCell(BaseEntity):
|
||||
|
||||
movement_cost = abs(output_data["angular_acceleration"]) + abs(output_data["linear_acceleration"])
|
||||
|
||||
self.energy -= (self.behavioral_model.neural_network.network_cost * 0.01) + 1 + (0.5 * movement_cost)
|
||||
self.energy -= (self.behavioral_model.neural_network.network_cost * 0.03) + 1 + (0.3 * movement_cost)
|
||||
|
||||
return self
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user