| … | … | @@ -39,8 +39,8 @@ |
| 39 | 39 | #define NFOOD 6 |
| 40 | 40 | #define NRXN 160 |
| 41 | 41 | #define TOTAL 3000 |
| 42 | | #define ROUNDS 40000 |
| 43 | | #define PCAT 0.004 |
| 42 | #define ROUNDS 20000 |
| 43 | static double PCAT_RUN=0.004; |
| 44 | 44 | |
| 45 | 45 | static unsigned long long RNG; |
| 46 | 46 | static unsigned long long xs(void){ RNG^=RNG<<13; RNG^=RNG>>7; RNG^=RNG<<17; return RNG; } |
| … | … | @@ -59,7 +59,7 @@ static void net_random(int scramble){ |
| 59 | 59 | for(int j=0;j<NRXN;j++){ |
| 60 | 60 | R[j].a=rint_(NSPEC); R[j].b=rint_(NSPEC); R[j].prod=NFOOD+rint_(NSPEC-NFOOD); |
| 61 | 61 | memset(R[j].cat,0,sizeof R[j].cat); |
| 62 | | for(int m=0;m<NSPEC;m++) if(urand()<PCAT) R[j].cat[m]=1; |
| 62 | for(int m=0;m<NSPEC;m++) if(urand()<PCAT_RUN) R[j].cat[m]=1; |
| 63 | 63 | } |
| 64 | 64 | /* find the genuine self-templaters */ |
| 65 | 65 | int hits[NRXN], nh=0; |
| … | … | @@ -110,59 +110,50 @@ static void measure(double *got,double *chance){ |
| 110 | 110 | |
| 111 | 111 | int main(void) |
| 112 | 112 | { |
| 113 | | printf("=== DOES RUNG 1 PRODUCE RUNG 2? ===\n"); |
| 114 | | printf(" A RAF self-organises (rung 1). A species is SELF-TEMPLATING when a reaction makes it and\n"); |
| 115 | | printf(" it catalyses that reaction (rung 2). Same type, same run, no second model.\n"); |
| 116 | | printf(" Enrichment = share of sustained abundance that is self-templating, over their share of\n"); |
| 117 | | printf(" the species pool. CONTROL scrambles WHICH species count as self-templating while keeping\n"); |
| 118 | | printf(" the same number of self-catalysing reactions — identical firing advantage, no link.\n\n"); |
| 113 | printf("=== REPLICATION: does the rung1->rung2 enrichment hold across seeds and catalysis density? ===\n"); |
| 114 | printf(" First run: 1.433x real vs 1.046x scrambled, n=25 of 60 seeds, one PCAT. Promising and\n"); |
| 115 | printf(" unreplicated. Here: 200 seeds per cell and a PCAT sweep. The control is a PERMUTATION —\n"); |
| 116 | printf(" both arms share the seed so network and dynamics are byte-identical; only which species\n"); |
| 117 | printf(" are LABELLED self-templating differs.\n"); |
| 118 | printf(" Also reported: how many networks contained any self-templater, since the rest are\n"); |
| 119 | printf(" excluded and that conditioning should be visible rather than hidden.\n\n"); |
| 119 | 120 | |
| 120 | | double eg=0,ec=0; int ng=0,nc=0, seeds=60; |
| 121 | | printf(" arm | self-templating share | chance share | enrichment\n"); |
| 122 | | printf(" ----------+-----------------------+--------------+-----------\n"); |
| 123 | | double sg=0,cg=0,sc=0,cc=0; |
| 124 | | for(int s=0;s<seeds;s++){ |
| 125 | | double g,ch; |
| 126 | | RNG=0x9e3779b97f4a7c15ULL+(unsigned long long)s*0x2545F4914F6CDD1DULL; |
| 127 | | net_random(0); seed(); react(); measure(&g,&ch); |
| 128 | | if(ch>0.01){ sg+=g; cg+=ch; eg+=g/ch; ng++; } |
| 129 | | RNG=0x9e3779b97f4a7c15ULL+(unsigned long long)s*0x2545F4914F6CDD1DULL; |
| 130 | | net_random(1); seed(); react(); measure(&g,&ch); |
| 131 | | if(ch>0.01){ sc+=g; cc+=ch; ec+=g/ch; nc++; } |
| 121 | double pcats[4]={0.002,0.004,0.008,0.016}; |
| 122 | int seeds=200, held=0, tested=0; |
| 123 | printf(" PCAT | networks w/ self-tem | REAL enrich | SCRAMBLED | difference\n"); |
| 124 | printf(" ------+----------------------+-------------+-----------+-----------\n"); |
| 125 | for(int pi=0;pi<4;pi++){ |
| 126 | PCAT_RUN=pcats[pi]; |
| 127 | double eg=0,ec=0; int ng=0,nc=0; |
| 128 | for(int s=0;s<seeds;s++){ |
| 129 | double g,ch; |
| 130 | RNG=0x9e3779b97f4a7c15ULL+(unsigned long long)(pi*7919+s)*0x2545F4914F6CDD1DULL; |
| 131 | net_random(0); seed(); react(); measure(&g,&ch); |
| 132 | if(ch>0.01){ eg+=g/ch; ng++; } |
| 133 | RNG=0x9e3779b97f4a7c15ULL+(unsigned long long)(pi*7919+s)*0x2545F4914F6CDD1DULL; |
| 134 | net_random(1); seed(); react(); measure(&g,&ch); |
| 135 | if(ch>0.01){ ec+=g/ch; nc++; } |
| 136 | } |
| 137 | if(ng) eg/=ng; |
| 138 | if(nc) ec/=nc; |
| 139 | double d=eg-ec; |
| 140 | printf(" %.3f | %3d of %3d | %.3fx | %.3fx | %+.3f\n", |
| 141 | pcats[pi],ng,seeds,eg,ec,d); |
| 142 | if(ng>=seeds/10){ tested++; if(d>0.10) held++; } |
| 132 | 143 | } |
| 133 | | if(ng) { sg/=ng; cg/=ng; eg/=ng; } |
| 134 | | if(nc) { sc/=nc; cc/=nc; ec/=nc; } |
| 135 | | printf(" REAL | %.3f | %.3f | %.3fx\n",sg,cg,eg); |
| 136 | | printf(" SCRAMBLED | %.3f | %.3f | %.3fx\n\n",sc,cc,ec); |
| 137 | | printf(" n = %d / %d networks with any self-templater\n\n",ng,nc); |
| 138 | | |
| 139 | | int live = (ng>seeds/3); |
| 140 | | int real_enriched = eg>1.10; |
| 141 | | int beats_ctrl = eg>ec+0.10; |
| 142 | | |
| 143 | | printf(" G1 enough networks had a self-templater : %s (%d of %d)\n", live?"YES":"NO — nothing to measure",ng,seeds); |
| 144 | | printf(" G2 real enrichment > 1 : %s (%.3fx)\n", real_enriched?"YES":"no",eg); |
| 145 | | printf(" G3 beats the scrambled control : %s (%.3fx vs %.3fx)\n\n", beats_ctrl?"YES":"no",eg,ec); |
| 146 | | |
| 147 | | if(!live) |
| 148 | | printf(" => THE TEST DID NOT RUN. Too few networks contained a self-templating species, so\n" |
| 149 | | " there was nothing to be enriched. Invalid, not a null.\n"); |
| 150 | | else if(real_enriched && beats_ctrl) |
| 151 | | printf(" => RUNG 1 PRODUCES RUNG 2. An autocatalytic set preferentially sustains the species\n" |
| 152 | | " that template themselves — %.2fx their share of the pool, against %.2fx when the\n" |
| 153 | | " property is scrambled onto random species with the identical firing advantage.\n" |
| 154 | | " The seeds of heredity are enriched BY the self-sustaining set that precedes them,\n" |
| 155 | | " in one model, in one type. That is the ladder's oldest admission answered for one\n" |
| 156 | | " rung — and it is one rung, on the easy side of the 1->2 wall: enrichment of\n" |
| 157 | | " self-templaters is not open-ended heredity.\n",eg,ec); |
| 158 | | else if(real_enriched && !beats_ctrl) |
| 159 | | printf(" => CONFOUNDED. Self-templaters are enriched (%.2fx) but so are the scrambled ones\n" |
| 160 | | " (%.2fx), so the enrichment is the firing advantage of a self-catalysing reaction,\n" |
| 161 | | " not any relationship between templating and being sustained. Claim nothing.\n",eg,ec); |
| 144 | printf("\n held (difference > 0.10) in %d of %d cells with enough networks\n\n",held,tested); |
| 145 | if(tested==0) |
| 146 | printf(" => TOO FEW NETWORKS CONTAINED A SELF-TEMPLATER AT ANY DENSITY. Nothing measured.\n"); |
| 147 | else if(held==tested) |
| 148 | printf(" => IT HOLDS. The enrichment survives 200 seeds per cell across the whole catalysis\n" |
| 149 | " sweep, against a permutation null on byte-identical dynamics. The first result was\n" |
| 150 | " not a small-n artefact.\n"); |
| 151 | else if(held>0) |
| 152 | printf(" => PARTIAL: holds in %d of %d cells. Report the density dependence as-is; the effect\n" |
| 153 | " is real somewhere and absent elsewhere, which is itself informative.\n",held,tested); |
| 162 | 154 | else |
| 163 | | printf(" => HONEST NULL. The autocatalytic set does NOT preferentially sustain self-templating\n" |
| 164 | | " species (%.2fx, control %.2fx). Rung 1 sustains itself and nothing more, and the\n" |
| 165 | | " ladder's oldest admission stands: no rung produces the next. The substrate made\n" |
| 166 | | " the question askable without making the answer yes.\n",eg,ec); |
| 155 | printf(" => IT DOES NOT HOLD. At 200 seeds per cell the enrichment does not separate from its\n" |
| 156 | " permutation control anywhere in the sweep. The first result was a small-n artefact\n" |
| 157 | " and chain12's claim must be RETRACTED — the ladder's oldest admission stands.\n"); |
| 167 | 158 | return 0; |
| 168 | 159 | } |