From de45db43930b305eead43d1c7cf3e116311e8cfe Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 9 Nov 2025 01:25:52 -0600 Subject: [PATCH] Increase energy parameters and initial cell count for simulation dynamics --- config/simulation_config.py | 2 +- core/simulation_engine.py | 2 +- world/objects.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/simulation_config.py b/config/simulation_config.py index 9b28f94..2402489 100644 --- a/config/simulation_config.py +++ b/config/simulation_config.py @@ -79,7 +79,7 @@ class InteractiveConfig: grid_width=GRID_WIDTH, grid_height=GRID_HEIGHT, cell_size=CELL_SIZE, - initial_cells=50, + initial_cells=350, initial_food=FOOD_OBJECTS_COUNT, food_spawning=FOOD_SPAWNING, random_seed=RANDOM_SEED, diff --git a/core/simulation_engine.py b/core/simulation_engine.py index 32ce8b7..6bafabd 100644 --- a/core/simulation_engine.py +++ b/core/simulation_engine.py @@ -81,7 +81,7 @@ class SimulationEngine: grid_width=GRID_WIDTH, grid_height=GRID_HEIGHT, cell_size=CELL_SIZE, - initial_cells=50, + initial_cells=350, initial_food=FOOD_OBJECTS_COUNT, food_spawning=FOOD_SPAWNING, random_seed=RANDOM_SEED, diff --git a/world/objects.py b/world/objects.py index f73cdd5..7fe3754 100644 --- a/world/objects.py +++ b/world/objects.py @@ -93,7 +93,7 @@ class FoodObject(BaseEntity): self.max_visual_width: int = 8 self.decay: int = 0 self.decay_rate: int = 1 - self.max_decay = 200 + self.max_decay = 400 self.interaction_radius: int = 50 self.neighbors: int = 0 self.flags: dict[str, bool] = { @@ -300,11 +300,11 @@ class DefaultCell(BaseEntity): distance_to_food = get_distance_between_objects(self, food_object) if distance_to_food < self.max_visual_width and food_objects: - self.energy += 130 + self.energy += 140 food_object.flag_for_death() return self - if self.energy >= 1600: + if self.energy >= 1700: # too much energy, split duplicate_x, duplicate_y = self.position.get_position() duplicate_x += random.randint(-self.max_visual_width, self.max_visual_width) @@ -350,7 +350,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.1) + 1.2 + (0.15 * movement_cost) + self.energy -= (self.behavioral_model.neural_network.network_cost * 0.08) + 1.5 + (0.25 * movement_cost) return self