diff --git a/paper/pnas/figs/fig1b.pdf b/paper/pnas/figs/fig1b.pdf index b3c0278..ab6b04b 100644 Binary files a/paper/pnas/figs/fig1b.pdf and b/paper/pnas/figs/fig1b.pdf differ diff --git a/paper/pnas/main.pdf b/paper/pnas/main.pdf index 6df5fe8..b9901a9 100644 Binary files a/paper/pnas/main.pdf and b/paper/pnas/main.pdf differ diff --git a/paper/pnas/make_figs.py b/paper/pnas/make_figs.py index 5fb7cac..efd2f1a 100644 --- a/paper/pnas/make_figs.py +++ b/paper/pnas/make_figs.py @@ -179,7 +179,7 @@ def _robot(ax, x, y, fc="#e8eef5", dots=(), lost=(), w=0.52, h=0.52): def fig1b(): from matplotlib.patches import Circle, FancyArrowPatch - W, H = 11.4, 4.1 + W, H = 11.4, 4.5 fig, ax = plt.subplots(figsize=(W, H)) ax.set_xlim(0, W) ax.set_ylim(0, H) @@ -188,11 +188,11 @@ def fig1b(): ax.text(0.05, H - 0.05, "B", fontsize=13, fontweight="bold", va="top") def arrow(p, q, color="#666", lw=1.2, style="-|>", shrink=2.0, ls="-"): - ax.add_patch(FancyArrowPatch(p, q, arrowstyle=style, mutation_scale=9, color=color, + ax.add_patch(FancyArrowPatch(p, q, arrowstyle=style, mutation_scale=10, color=color, lw=lw, linestyle=ls, shrinkA=shrink, shrinkB=shrink)) # ---------------- left: a society in space (contemporaries exchanging messages) - cx, cy, r = 2.45, 2.45, 0.95 + cx, cy, r = 2.45, 2.70, 0.95 dotsets = [(BLUE, GOLD), (GREEN,), (BLUE, GREEN), (GOLD, GREEN), (BLUE,)] pos = [] for i, ds in enumerate(dotsets): @@ -202,61 +202,61 @@ def fig1b(): _robot(ax, x, y, dots=ds) for i, j2 in [(0, 2), (1, 3), (2, 4), (0, 3), (1, 4)]: arrow(pos[i], pos[j2], color="#99a", lw=0.9, style="<|-|>", shrink=26, ls=(0, (4, 2))) - ax.text(pos[0][0] + 0.60, pos[0][1] + 0.30, "\u2026", fontsize=9, ha="center", - bbox=dict(boxstyle="round,pad=0.22", fc="white", ec="#99a", lw=0.8)) - clk = (0.55, 3.72) + ax.text(pos[0][0] + 0.72, pos[0][1] + 0.38, "hi!", fontsize=8, ha="center", + bbox=dict(boxstyle="round,pad=0.25", fc="white", ec="#99a", lw=0.8)) + clk = (0.55, 4.08) ax.add_patch(Circle(clk, 0.21, fc="white", ec="#445", lw=1.1)) ax.plot([clk[0], clk[0]], [clk[1], clk[1] + 0.13], color="#445", lw=1.0) ax.plot([clk[0], clk[0] + 0.10], [clk[1], clk[1]], color="#445", lw=1.0) - ax.text(clk[0], clk[1] - 0.34, "one moment", ha="center", fontsize=6, style="italic", + ax.text(clk[0], clk[1] - 0.34, "one moment", ha="center", fontsize=7, style="italic", color="#555") - ax.text(2.45, 0.48, "a society in space", ha="center", fontsize=9.5, fontweight="bold") - ax.text(2.45, 0.22, "contemporaries exchanging messages \u2014 multi-agent systems, agent economies", - ha="center", fontsize=6.6, style="italic", color="#555") + ax.text(2.45, 0.55, "a society in space", ha="center", fontsize=11, fontweight="bold") + ax.text(2.45, 0.24, "contemporaries exchanging messages \u2014 multi-agent systems, agent economies", + ha="center", fontsize=7.5, style="italic", color="#555") # ---------------- middle: the shift of perspective - arrow((4.62, 2.30), (5.90, 2.30), color="#445", lw=2.0, style="-|>") - ax.text(5.26, 2.44, "the same ecosystem,\nseen along its time axis", ha="center", - va="bottom", fontsize=7, style="italic", color="#334", linespacing=1.3) + arrow((4.60, 2.50), (5.95, 2.50), color="#445", lw=2.0, style="-|>") + ax.text(5.27, 2.66, "the same ecosystem,\nseen along its time axis", ha="center", + va="bottom", fontsize=8, style="italic", color="#334", linespacing=1.3) # ---------------- right: a society in time (a pedigree) - axx = 6.55 - arrow((axx, 3.90), (axx, 0.90), color="#445", lw=1.3) - for gy, lab in [(3.45, "gen 0"), (2.20, "gen 1"), (1.05, "gen 2")]: - ax.text(axx - 0.12, gy, lab, ha="right", va="center", fontsize=6.5, color="#445") + axx = 6.8 + arrow((axx, 4.30), (axx, 1.00), color="#445", lw=1.3) + for gy, lab in [(3.80, "gen 0"), (2.55, "gen 1"), (1.35, "gen 2")]: + ax.text(axx - 0.12, gy, lab, ha="right", va="center", fontsize=7.5, color="#445") - p1, p2 = (7.55, 3.45), (9.25, 3.45) - c1, c2 = (7.15, 2.20), (8.65, 2.20) - g2 = (8.65, 1.05) + p1, p2 = (8.0, 3.80), (9.5, 3.80) + c1, c2 = (7.5, 2.55), (9.0, 2.55) + g2 = (9.0, 1.35) _robot(ax, *p1, dots=(BLUE, GOLD)) _robot(ax, *p2, dots=(GREEN, BLUE)) _robot(ax, *c1, dots=(BLUE,), lost=(GOLD,)) _robot(ax, *c2, dots=(BLUE, GREEN, GOLD)) _robot(ax, *g2, dots=(BLUE, GREEN, GOLD)) - arrow((7.42, 2.94), (7.20, 2.66), color="#666") - ax.text(7.02, 2.86, "inherit\n(train on output)", ha="right", fontsize=6, style="italic", - color="#555", linespacing=1.2) - arrow((7.72, 2.94), (8.48, 2.66), color="#666") - arrow((9.15, 2.94), (8.84, 2.66), color="#666") - ax.text(8.68, 2.92, "merge (sex)", ha="center", fontsize=6, style="italic", color="#555") - ax.text(7.15, 1.50, "rare skill lost", ha="center", fontsize=5.8, style="italic", + arrow((7.87, 3.26), (7.56, 3.04), color="#666") + ax.text(7.42, 3.16, "inherit", ha="right", fontsize=7, style="italic", color="#555") + arrow((8.15, 3.24), (8.85, 3.04), color="#666") + arrow((9.40, 3.24), (9.13, 3.04), color="#666") + ax.text(9.0, 3.14, "merge (sex)", ha="center", fontsize=7, style="italic", color="#555", + bbox=dict(boxstyle="round,pad=0.12", fc="white", ec="none")) + ax.text(7.5, 1.83, "rare skill lost", ha="center", fontsize=6.8, style="italic", color="#a33") - arrow((8.65, 1.64), (8.65, 1.46), color="#666") - globe = (10.55, 1.60) - ax.add_patch(Circle(globe, 0.30, fc="#eaf4fb", ec="#2c7fb8", lw=1.2)) + arrow((9.0, 1.99), (9.0, 1.81), color="#666") + globe = (10.55, 1.85) + ax.add_patch(Circle(globe, 0.32, fc="#eaf4fb", ec="#2c7fb8", lw=1.2)) from matplotlib.patches import Arc as _Arc - ax.add_patch(_Arc(globe, 0.30, 0.60, theta1=90, theta2=270, ec="#2c7fb8", lw=0.8)) - ax.add_patch(_Arc(globe, 0.30, 0.60, theta1=270, theta2=90, ec="#2c7fb8", lw=0.8)) - ax.plot([globe[0] - 0.30, globe[0] + 0.30], [globe[1], globe[1]], color="#2c7fb8", lw=0.8) - ax.text(globe[0], globe[1] - 0.42, "reality\n(verifier)", ha="center", va="top", fontsize=6, + ax.add_patch(_Arc(globe, 0.32, 0.64, theta1=90, theta2=270, ec="#2c7fb8", lw=0.8)) + ax.add_patch(_Arc(globe, 0.32, 0.64, theta1=270, theta2=90, ec="#2c7fb8", lw=0.8)) + ax.plot([globe[0] - 0.32, globe[0] + 0.32], [globe[1], globe[1]], color="#2c7fb8", lw=0.8) + ax.text(globe[0], globe[1] - 0.44, "reality\n(verifier)", ha="center", va="top", fontsize=7, color="#2c7fb8", linespacing=1.2) - arrow((10.26, 1.45), (9.02, 1.15), color="#2c7fb8", lw=1.2) - ax.text(9.72, 1.52, "ground\n(immigrate)", ha="center", fontsize=6, style="italic", - color="#2c7fb8", linespacing=1.2) - ax.text(8.55, 0.48, "a society in time", ha="center", fontsize=9.5, fontweight="bold") - ax.text(8.55, 0.22, "generations coupled by inheritance, recombination, and grounding \u2014 " - "where population genetics applies", - ha="center", fontsize=6.6, style="italic", color="#555") + arrow((10.22, 1.70), (9.38, 1.45), color="#2c7fb8", lw=1.2) + ax.text(9.82, 1.78, "ground\n(immigrate)", ha="center", va="bottom", fontsize=7, + style="italic", color="#2c7fb8", linespacing=1.2) + ax.text(8.9, 0.55, "a society in time", ha="center", fontsize=11, fontweight="bold") + ax.text(8.9, 0.24, "generations coupled by inheritance, recombination, grounding \u2014 " + "where population genetics applies", + ha="center", fontsize=7.2, style="italic", color="#555") save(fig, "fig1b") # ---------------------------------------------------------------- fig 2: grounding + MNIST