Skip to content

Commit fd03237

Browse files
committed
no prey birth sweep
1 parent 324d1c7 commit fd03237

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

models/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,20 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
189189

190190
#FIXME: These configs are arbitraty and should be finalized before running experiments.
191191

192-
# Phase 1: Parameter sweep to find critical point
193192
PHASE1_CONFIG = Config(
194193
grid_size=100,
195-
n_prey_birth=15,
196194
n_prey_death=20,
197-
prey_birth_range=(0.10, 0.35),
195+
prey_birth=0.2,
198196
prey_death_range=(0.0, 0.20),
197+
predator_birth=0.8, #
198+
predator_death=0.05,
199199
n_replicates=30,
200200
warmup_steps=300,
201201
measurement_steps=500,
202202
collect_pcf=True,
203203
pcf_sample_rate=0.2,
204204
save_timeseries=False,
205-
directed_hunting = False,
205+
directed_hunting=False,
206206
)
207207

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

scripts/experiments.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,26 +345,22 @@ def run_phase1(cfg: Config, output_dir: Path, logger: logging.Logger) -> List[Di
345345

346346
warmup_numba_kernels(cfg.grid_size, directed_hunting=cfg.directed_hunting)
347347

348-
prey_births = cfg.get_prey_births()
349348
prey_deaths = cfg.get_prey_deaths()
350349

351350
# Build job list
352351
jobs = []
353-
# Sweep through prey_birth and prey_death
354-
for pb in prey_births:
355-
for pd in prey_deaths:
356-
for rep in range(cfg.n_replicates):
357-
params = {"pb": pb, "pd": pd}
358-
359-
# Non-evolution run #FIXME: Check if both evo and non-evo are needed for phase 1
360-
seed = generate_unique_seed(params, rep)
361-
jobs.append((pb, pd, cfg.predator_birth, cfg.predator_death,
362-
cfg.grid_size, seed, cfg, False))
352+
# Sweep through prey_death only (prey_birth is fixed)
353+
for pd in prey_deaths:
354+
for rep in range(cfg.n_replicates):
355+
params = {"pd": pd}
356+
357+
seed = generate_unique_seed(params, rep)
358+
jobs.append((cfg.prey_birth, pd, cfg.predator_birth, cfg.predator_death,
359+
cfg.grid_size, seed, cfg, False))
363360

364361

365362
logger.info(f"Phase 1: {len(jobs):,} simulations")
366-
logger.info(f" Grid: {cfg.n_prey_birth} × {cfg.n_prey_death} × {cfg.n_replicates} reps × 2 (evo/no-evo)")
367-
363+
logger.info(f" Grid: {cfg.n_prey_death} prey_death values × {cfg.n_replicates} reps (prey_birth={cfg.prey_birth})")
368364
# Run with incremental saving
369365
output_jsonl = output_dir / "phase1_results.jsonl"
370366
all_results = []

0 commit comments

Comments
 (0)