bk.style()
fig, ax = plt.subplots(figsize=(9.2, 4.4))
ax.set_xlim(0, 100)
ax.set_ylim(0, 50)
ax.axis("off")
def box(x, y, w, h, text, edge, size=9, fc="#fffdf8", weight="normal"):
ax.add_patch(FancyBboxPatch((x, y), w, h, boxstyle="round,pad=0.3,rounding_size=1.2",
fc=fc, ec=edge, lw=1.8))
ax.text(x + w / 2, y + h / 2, text, ha="center", va="center", fontsize=size, color=INK, fontweight=weight)
def arrow(p0, p1, colour=INK, style="-|>", ls="-"):
ax.add_patch(FancyArrowPatch(p0, p1, arrowstyle=style, mutation_scale=11, lw=1.3, color=colour, ls=ls))
box(1, 22, 11, 8, "transcript", INK, weight="bold")
for i, (lab, col) in enumerate([("reasoning\nonly", AMBER), ("code\nonly", TEAL), ("both", INK)]):
y = 36 - i * 12
box(17, y, 11, 8, lab, col, size=8.5)
arrow((12.6, 26), (16.6, y + 4))
arrow((28.6, y + 4), (34.4, 26))
box(35, 20, 15, 12, "judge model\n+ written rule", INK)
arrow((50.6, 26), (54.4, 26))
box(55, 22, 9, 8, "score", INK)
arrow((64.6, 26), (68.4, 26))
box(69, 19, 14, 14, "threshold:\nflags at most\n5% of honest\nwork", INK, size=8.5)
arrow((83.6, 26), (87.4, 26))
box(88, 22, 10, 8, "flag", INK, weight="bold")
arrow((93, 21.4), (93, 13.6))
box(84, 3, 15, 10, "a person reads it,\nthen fixes the\nenvironment", TEAL, size=8.5)
box(58, 3, 11, 8, "reward", GREY, size=8.5)
arrow((87.6, 21.6), (69.6, 8), colour=GREY, ls="--")
cx, cy = 78.6, 14.8
ax.plot([cx - 1.3, cx + 1.3], [cy - 1.6, cy + 1.6], color=INK, lw=3)
ax.plot([cx - 1.3, cx + 1.3], [cy + 1.6, cy - 1.6], color=INK, lw=3)
ax.text(cx - 2.4, cy + 1.2, "never", fontsize=9.5, color=INK, fontweight="bold", ha="right")
fig.tight_layout()
plt.show()