All-corpora wins/losses table: ModAB added (totals, violations, A' per problem and total difference against it on every corpus).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,19 +25,22 @@ def main():
|
||||
F = json.load(open("sweep_fourth_fourth.json", encoding="utf8"))
|
||||
for k in R:
|
||||
R[k].update(F[k])
|
||||
M = json.load(open("sweep_modab.json", encoding="utf8"))
|
||||
R["modab"] = dict(M["seen"]["modab"])
|
||||
R["modab"].update(M["fourth"]["modab"])
|
||||
print("TOTALS (violations of the 2x-bisection bound in brackets)")
|
||||
print(f" {'corpus':<20}" + "".join(f"{n:>16}" for n in
|
||||
("A'", "A", "plain", "Chandrupatla", "Brent", "TOMS748")))
|
||||
("A'", "A", "plain", "Chandrupatla", "ModAB", "Brent", "TOMS748")))
|
||||
for s in NAMES:
|
||||
cells = []
|
||||
for k in ("Aprime", "A", "base", "chandrupatla", "brent", "toms748"):
|
||||
for k in ("Aprime", "A", "base", "chandrupatla", "modab", "brent", "toms748"):
|
||||
r = R[k][s]
|
||||
cells.append(f"{sum(cost(v) for v in r.values())} ({sum(v[2] for v in r.values())})")
|
||||
print(f" {NAMES[s]:<20}" + "".join(f"{c:>16}" for c in cells))
|
||||
print("\nA' PER PROBLEM against each rival: wins/ties/losses (sign-test p); total difference")
|
||||
for s in NAMES:
|
||||
line = f" {NAMES[s]:<20}"
|
||||
for rv in ("chandrupatla", "brent", "toms748"):
|
||||
for rv in ("chandrupatla", "modab", "brent", "toms748"):
|
||||
a, o = R["Aprime"][s], R[rv][s]
|
||||
w = sum(cost(a[p]) < cost(o[p]) for p in a)
|
||||
l = sum(cost(a[p]) > cost(o[p]) for p in a)
|
||||
@@ -47,7 +50,7 @@ def main():
|
||||
tot = {k: sum(cost(v) for s in NAMES for v in R[k][s].values()) for k in R}
|
||||
n_all = sum(len(R["Aprime"][s]) for s in NAMES)
|
||||
print(f"\nALL SIX CORPORA ({n_all} problems):",
|
||||
" ".join(f"{k} {tot[k]}" for k in ("Aprime", "A", "base", "chandrupatla", "brent", "toms748")))
|
||||
" ".join(f"{k} {tot[k]}" for k in ("Aprime", "A", "base", "chandrupatla", "modab", "brent", "toms748")))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user