Skip to content

Commit 4e733a8

Browse files
committed
fixed config ranges and removed evo run from phase 1
1 parent e82f43d commit 4e733a8

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

.DS_Store

10 KB
Binary file not shown.

models/.DS_Store

6 KB
Binary file not shown.

models/config.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Config:
7373
grid_sizes: Tuple[int, ...] = (100, 200, 500, 1000)
7474

7575
# Default/fixed parameters
76-
prey_birth: float = 0.20
76+
prey_birth: float = 0.80
7777
prey_death: float = 0.05
7878
predator_birth: float = 0.2 # FIXME: Default predator death rate
7979
predator_death: float = 0.1 # FIXME: Default predator death rate
@@ -84,9 +84,9 @@ class Config:
8484

8585
# Prey parameter sweep (Phase 1)
8686
prey_birth_range: Tuple[float, float] = (0.10, 0.35)
87-
prey_death_range: Tuple[float, float] = (0.001, 0.10)
87+
prey_death_range: Tuple[float, float] = (0.0, 0.20)
8888
n_prey_birth: int = 15 # FIXME: Decide number of grid points along prey axes
89-
n_prey_death: int = 15
89+
n_prey_death: int = 20
9090

9191
# Predator parameter sweep (Phase 4 sensitivity)
9292
predator_birth_values: Tuple[float, ...] = (0.15, 0.20, 0.25, 0.30) #FIXME: Bogus values for now
@@ -100,7 +100,7 @@ class Config:
100100

101101
# Simulation steps
102102
warmup_steps: int = 300 # FIXME: Steps to run before measuring
103-
measurement_steps: int = 300 # FIXME: Decide measurement steps
103+
measurement_steps: int = 500 # FIXME: Decide measurement steps
104104

105105
# Evo
106106
with_evolution: bool = False
@@ -191,17 +191,18 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
191191

192192
# Phase 1: Parameter sweep to find critical point
193193
PHASE1_CONFIG = Config(
194-
grid_size=1000,
194+
grid_size=100,
195195
n_prey_birth=15,
196196
n_prey_death=15,
197197
prey_birth_range=(0.10, 0.35),
198-
prey_death_range=(0.001, 0.10),
199-
n_replicates=20,
198+
prey_death_range=(0.0, 0.20),
199+
n_replicates=30,
200200
warmup_steps=300,
201-
measurement_steps=1000,
201+
measurement_steps=500,
202202
collect_pcf=True,
203203
pcf_sample_rate=0.2,
204204
save_timeseries=False,
205+
directed_hunting = False,
205206
)
206207

207208
# Phase 2: Self-organization (evolution toward criticality)

notebooks/phase1.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@
334334
"source": [
335335
"df.info()"
336336
]
337+
},
338+
{
339+
"cell_type": "code",
340+
"execution_count": null,
341+
"metadata": {},
342+
"outputs": [],
343+
"source": []
337344
}
338345
],
339346
"metadata": {

scripts/experiments.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,6 @@ def run_phase1(cfg: Config, output_dir: Path, logger: logging.Logger) -> List[Di
361361
jobs.append((pb, pd, cfg.predator_birth, cfg.predator_death,
362362
cfg.grid_size, seed, cfg, False))
363363

364-
# Evolution run
365-
evo_seed = generate_unique_seed(params, rep + 1_000_000)
366-
jobs.append((pb, pd, cfg.predator_birth, cfg.predator_death,
367-
cfg.grid_size, evo_seed, cfg, True))
368364

369365
logger.info(f"Phase 1: {len(jobs):,} simulations")
370366
logger.info(f" Grid: {cfg.n_prey_birth} × {cfg.n_prey_death} × {cfg.n_replicates} reps × 2 (evo/no-evo)")

tests/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)