Manuscript revision and pending experiment work, snapshot before restructuring
Clarity pass over the main text (36-item audit), Discussion rewrite and cut, acknowledgements, Souly et al. as ref 62, lettered SI panels, model section moved under Results; plus the untracked curriculum/society/compose/smol configs, runners, figures, stats and tests that the SI already cites. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y64o8FKP7rCuXzC48pxpMm
This commit is contained in:
parent
e4804adabc
commit
84124de143
450 changed files with 52813 additions and 1202 deletions
|
|
@ -15,7 +15,7 @@ import matplotlib.pyplot as plt
|
|||
import numpy as np
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from _figlib import load_bundle, savefig # noqa: E402
|
||||
from _figlib import load_bundle, savefig, letter_axes # noqa: E402
|
||||
|
||||
|
||||
def main(results_dir: str = "results/E5") -> None:
|
||||
|
|
@ -30,14 +30,14 @@ def main(results_dir: str = "results/E5") -> None:
|
|||
# Panel 1: H trajectories
|
||||
ax = axes[0]
|
||||
series = [("greedy", 1.0, "#d62728", "greedy"),
|
||||
("qd", 1.0, "#ff7f0e", "qd (α=1)"),
|
||||
("qd", 2.0, "#1f77b4", "qd (α=2)"),
|
||||
("qd", 1.0, "#ff7f0e", "quality-diversity (α=1)"),
|
||||
("qd", 2.0, "#1f77b4", "quality-diversity (α=2)"),
|
||||
("none", 1.0, "#2ca02c", "none (grounding only)")]
|
||||
for mode, a, c, lab in series:
|
||||
s = arm(mode, a).groupby("generation")["heterozygosity"].mean()
|
||||
ax.plot(s.index, s.values, color=c, label=lab)
|
||||
ax.set(xlabel="generation", ylabel="heterozygosity $H$",
|
||||
title="Greedy collapses; QD maintains diversity")
|
||||
title="Greedy collapses;\nquality-diversity maintains diversity")
|
||||
ax.legend(frameon=False, fontsize=8)
|
||||
|
||||
# Panel 2: stationary H vs alpha for qd, with greedy/none reference lines
|
||||
|
|
@ -45,19 +45,19 @@ def main(results_dir: str = "results/E5") -> None:
|
|||
qd = df[(df["mode"] == "qd") & (df["generation"] >= last)]
|
||||
st = qd.groupby("novelty_alpha")["heterozygosity"].agg(["mean", "sem"])
|
||||
ax.errorbar(st.index, st["mean"], yerr=1.96 * st["sem"], fmt="-o",
|
||||
color="#ff7f0e", capsize=3, label="qd")
|
||||
color="#ff7f0e", capsize=3, label="quality-diversity")
|
||||
for mode, c in (("greedy", "#d62728"), ("none", "#2ca02c")):
|
||||
h = arm(mode, 1.0)
|
||||
h = h[h["generation"] >= last]["heterozygosity"].mean()
|
||||
ax.axhline(h, ls="--", color=c, label=f"{mode}")
|
||||
ax.set(xlabel=r"novelty exponent $\alpha$", ylabel="stationary $H$",
|
||||
title="QD maintains H above greedy for all α")
|
||||
title="Quality-diversity keeps $H$\nabove greedy for all α")
|
||||
ax.legend(frameon=False, fontsize=9)
|
||||
|
||||
# Panel 3: stationary support size per arm
|
||||
ax = axes[2]
|
||||
arms = [("greedy", 1.0, "greedy"), ("qd", 0.5, "qd α=0.5"),
|
||||
("qd", 1.0, "qd α=1"), ("qd", 2.0, "qd α=2"), ("none", 1.0, "none")]
|
||||
arms = [("greedy", 1.0, "greedy"), ("qd", 0.5, "quality-diversity α=0.5"),
|
||||
("qd", 1.0, "quality-diversity α=1"), ("qd", 2.0, "quality-diversity α=2"), ("none", 1.0, "none")]
|
||||
labels, vals, errs, colors = [], [], [], []
|
||||
palette = {"greedy": "#d62728", "qd": "#ff7f0e", "none": "#2ca02c"}
|
||||
for mode, a, lab in arms:
|
||||
|
|
@ -70,9 +70,8 @@ def main(results_dir: str = "results/E5") -> None:
|
|||
xticks=range(len(labels)))
|
||||
ax.set_xticklabels(labels, rotation=25, ha="right", fontsize=8)
|
||||
|
||||
fig.suptitle("E5 — quality-diversity selection maintains diversity where greedy "
|
||||
"fixes it", y=1.02)
|
||||
fig.tight_layout()
|
||||
letter_axes(fig)
|
||||
savefig(fig, results_dir, "E5")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue