Skip to content

Commit 0c610c8

Browse files
committed
Hydra effect acquired!
Stop evolution now works. Run visualize_pp_evolution.py to see the hydra effect at play
1 parent e1ba9cc commit 0c610c8

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

models/CA.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,7 @@ def run(self, steps: int, stop_evolution_at: Optional[int] = None, snapshot_iter
286286
if stop_evolution_at is not None and (i + 1) == int(stop_evolution_at):
287287
# mark evolution as stopped; do not erase evolve metadata so
288288
# deterministic inheritance can still use parent values
289-
try:
290-
self._evolution_stopped = True
291-
except Exception:
292-
# best-effort: ignore if attribute cannot be set
293-
pass
289+
self._evolution_stopped = True
294290

295291
def visualize(
296292
self,

scripts/visualize_pp_evolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def main():
3535

3636
# Run the simulation (ensure the plot stays open afterwards)
3737
try:
38-
pp.run(2500)
38+
pp.run(2500, stop_evolution_at=1000)
3939
finally:
4040
# Block and show the final figure so the user can inspect it.
4141
# Turn off interactive mode (visualize() enabled it) and show blocking.

0 commit comments

Comments
 (0)