X Tutup
Skip to content

Commit 50f4c17

Browse files
committed
phase 4 and 6 recongigured
1 parent 5bcb485 commit 50f4c17

File tree

7 files changed

+2887
-893
lines changed

7 files changed

+2887
-893
lines changed

docs/plots.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
General guidelines:
2+
a. Fixed color scheme: prey: #1751ED, predator: #CF0808
3+
b. Legend at the bottom and shared if more than one plot
4+
5+
6+
1. Bifuractuion
7+
- zoomed out
8+
- zoomed in
9+
10+
2. Critical Point Power Law
11+
- At the critical point and away from the critical point (pick critical, subcritical, supercritical)
12+
13+
3. Finite size scaling
14+
- Cluster distributions vs. system size
15+
16+
4. Sensitivity Analysis
17+
- Undirected
18+
- Directed
19+
- 3-dimensional plot with hydra effect salient feature which is the weight of the quadratic term of the second order polynomial fitted to
20+
the inbcreasing part of the function before the collapse
21+
- X: Prey birth
22+
- Y: Predator birth
23+
- Z: Predator death
24+
- W: Prey death
25+
26+
- Do manual plot selection. 3 sets of 11 plots; each set where the 11 different plots to vary eveything except prey death
27+
- See which one is the most consistent -> lose that dimension to have a 3D plot left.
28+
29+
- 3-dimensional heatmap instead (preferrable)
30+
31+
5. Evolution
32+
- Log-log plot for cluster size distrubution at the convergence point
33+
- Convergence pointsa across intiial conditions to show independence. (But why?) -> probably no convergence.
34+
35+

hpc/run_phase2.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
#SBATCH --job-name=pp_phase2
3-
#SBATCH --partition=rome
3+
#SBATCH --partition=genoa
44
#SBATCH --nodes=1
55
#SBATCH --ntasks=1
6-
#SBATCH --cpus-per-task=32
6+
#SBATCH --cpus-per-task=128
77
#SBATCH --time=04:00:00
8-
#SBATCH --mem=64G
8+
#SBATCH --mem=0
99
#SBATCH --output=/home/kanagnostopoul/CSS_Project/pp_phase2_%j.out
1010
#SBATCH --error=/home/kanagnostopoul/CSS_Project/pp_phase2_%j.err
1111

models/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
210210
n_prey_birth=1, # Fixed at cfg.prey_birth (0.2)
211211
n_replicates=10,
212212
warmup_steps=1000, # Shorter warmup (evolution starts immediately)
213-
measurement_steps=5000, # Longer measurement to see convergence
213+
measurement_steps=10000, # Longer measurement to see convergence
214214

215215
# Evolution settings
216216
with_evolution=True,
@@ -245,7 +245,7 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
245245
measurement_steps=500, # As requested
246246
with_evolution=False,
247247
collect_pcf=False,
248-
save_timeseries=True,
248+
save_timeseries=False,
249249
timeseries_subsample=10,
250250
directed_hunting=False,
251251
)
@@ -272,7 +272,7 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
272272
measurement_steps=500,
273273
with_evolution=False,
274274
collect_pcf=False,
275-
save_timeseries=True,
275+
save_timeseries=False,
276276
timeseries_subsample=10,
277277
directed_hunting=True,
278278
)

notebooks/hydra_landscape_3d.png

1.05 MB
Loading
2.3 MB
Loading

notebooks/kimon.ipynb

Lines changed: 2841 additions & 885 deletions
Large diffs are not rendered by default.

scripts/experiments.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def run_single_simulation(
192192
# Warmup phase
193193
for _ in range(warmup_steps):
194194
model.update()
195+
195196

196197
# Measurement phase: start collecting our mertics
197198
prey_pops, pred_pops = [], [] # Prey populations and predator populations
@@ -283,6 +284,8 @@ def run_single_simulation(
283284
result["evolved_prey_death_mean"] = float(np.mean(valid_means)) if valid_means else np.nan
284285
result["evolved_prey_death_std"] = float(np.mean([v for v in evolved_stds if not np.isnan(v)])) if evolved_stds else np.nan
285286
result["evolved_prey_death_final"] = valid_means[-1] if valid_means else np.nan
287+
result["evolved_prey_death_min"] = float(np.min(valid_means)) if valid_means else np.nan
288+
result["evolved_prey_death_max"] = float(np.max(valid_means)) if valid_means else np.nan
286289
result["evolve_sd"] = cfg.evolve_sd
287290

288291
if cfg.save_timeseries:
@@ -520,7 +523,7 @@ def run_phase4(cfg: Config, output_dir: Path, logger: logging.Logger) -> List[Di
520523
warmup_numba_kernels(cfg.grid_size, directed_hunting=cfg.directed_hunting)
521524

522525
# Define the global sweep values
523-
sweep_values = np.linspace(0.0, 1.0, 11)
526+
sweep_values = np.linspace(0.5, 0.95, 10)
524527

525528
# Logging
526529
logger.info(f"Phase 4: Full 4D Parameter Sweep")
@@ -667,7 +670,7 @@ def run_phase6(cfg: Config, output_dir: Path, logger: logging.Logger) -> List[Di
667670
warmup_numba_kernels(cfg.grid_size, directed_hunting=cfg.directed_hunting)
668671

669672
# Define the global sweep values (same as Phase 4)
670-
sweep_values = np.linspace(0.0, 1.0, 11)
673+
sweep_values = np.linspace(0.05, 0.95 10)
671674

672675
# Logging
673676
logger.info(f"Phase 6: Full 4D Parameter Sweep (Directed Hunting)")

0 commit comments

Comments
 (0)
X Tutup