diff --git a/experiments/cf_simple.py b/experiments/cf_simple.py index 0d56259..f7b6ada 100644 --- a/experiments/cf_simple.py +++ b/experiments/cf_simple.py @@ -320,7 +320,8 @@ def replace_net( is_active = env_state.unique_id.is_active() popl = int(jnp.sum(is_active)) avg_e = float(jnp.mean(env_state.status.energy[is_active])) - print(f"Population: {popl} Avg. Energy: {avg_e}") + if popl > 0: + print(f"Population: {popl} Avg. Energy: {avg_e}") # Extinct? n_active = jnp.sum(env_state.unique_id.is_active()) # type: ignore