| … | … | @@ -1,26 +1,19 @@ |
| 1 | | /* fidfloor.c — INVALID AS WRITTEN. DO NOT READ ITS NUMBERS AS A RESULT. |
| 1 | /* fidfloor.c — does EMERGENT compartment selection lower the fidelity floor? (rung 1+4 -> 2) |
| 2 | 2 | * |
| 3 | | * ⚠️ F1 FAILED: the MIXED baseline returns 0.000 at EVERY fidelity, including f=0.98 where |
| 4 | | * polymer.c reports emergence at 0.92. A baseline that does not reproduce the thing it is a |
| 5 | | * baseline for makes every other column uninterpretable. Two faults, one identified, one not: |
| 3 | * FIXED after a first run that was INVALID. Three faults, all found and corrected: |
| 4 | * (1) MIXED was not well-mixed — 120 isolated compartments with division off, i.e. MORE |
| 5 | * compartmentalized than the arms it controls for. Now strands are SHUFFLED globally every |
| 6 | * step, making it one pool, which is what polymer.c is. |
| 7 | * (2) POPULATIONS COLLAPSED because uptake was below replacement by construction: |
| 8 | * UPTAKE*0.5 = 0.275 against degradation 0.30. BLIND could never sustain itself, and the |
| 9 | * apparent 'SELECT wins' was simply SELECT being the only arm able to exceed replacement |
| 10 | * once function climbed. Per-unit growth rate is now GROW=0.45 > D=0.30 for every arm. |
| 11 | * (3) CONFOUND: selection changed TOTAL uptake, hence population and replication count (8099 vs |
| 12 | * 3308). Now the total material moved per step is IDENTICAL across arms by construction — |
| 13 | * only its ALLOCATION differs (by mean match, or by size, or uniformly). This is the |
| 14 | * matched-condition discipline applied at design time rather than after the fact. |
| 6 | 15 | * |
| 7 | | * (1) IDENTIFIED — MIXED is not well-mixed. It is 120 isolated compartments of 24 with division |
| 8 | | * disabled, i.e. MORE compartmentalized than the arms it is supposed to be the control for, |
| 9 | | * not less. polymer.c is ONE population of 800 with global fitness-weighted replication. |
| 10 | | * A fix would be to keep the machinery and shuffle strands across compartments each step. |
| 11 | | * (2) NOT IDENTIFIED — populations collapse (mean 168 against ~2880 initial in MIXED). The |
| 12 | | * material budget arithmetic does not explain this; something else is wrong. |
| 13 | | * |
| 14 | | * What the run appeared to show, and why it means nothing: SELECT rose with f (0.353 at 0.95, |
| 15 | | * 0.628 at 0.98) while MIXED and BLIND sat at 0.000. But 0.000 is EXTINCTION, so that comparison |
| 16 | | * says only "the function-coupled arm survived and the others died" — a survival effect, not a |
| 17 | | * fidelity-floor effect. It is confounded on top of that: SELECT ran 8099 replications against |
| 18 | | * BLIND's 3308, exactly the population/replication confound the header promised to watch for. |
| 19 | | * |
| 20 | | * Kept in the tree as a record of an invalid experiment, NOT written into SYNTHESIS. Anyone |
| 21 | | * resuming should fix (1), diagnose (2), and re-establish F1 before reading any other column. |
| 22 | | * |
| 23 | | * ---- original header follows ---- |
| 16 | * ---- original rationale follows ---- |
| 24 | 17 | * |
| 25 | 18 | * fidfloor.c — does EMERGENT compartment selection lower the fidelity floor? (rung 1+4 -> 2) |
| 26 | 19 | * |
| … | … | @@ -81,7 +74,7 @@ |
| 81 | 74 | #define MAXSZ 24 |
| 82 | 75 | #define COSTUNIT 1.0 |
| 83 | 76 | #define TOTALMAT 3000.0 |
| 84 | | #define UPTAKE 0.55 |
| 77 | #define GROW 0.45 /* per-unit material inflow; MUST exceed D or every arm decays */ |
| 85 | 78 | |
| 86 | 79 | static unsigned long long RNG; |
| 87 | 80 | static unsigned long long xs(void){ RNG^=RNG<<13; RNG^=RNG>>7; RNG^=RNG<<17; return RNG; } |
| … | … | @@ -127,16 +120,19 @@ static double run(int mode,double f,int divsz,double *start,double *ndiv,double |
| 127 | 120 | else k++; |
| 128 | 121 | } |
| 129 | 122 | |
| 130 | | /* uptake, rationed when demand exceeds supply */ |
| 123 | /* uptake. TOTAL material moved is identical across arms (GROW per surviving unit, capped by |
| 124 | the pool); only its ALLOCATION differs. This removes the population/replication confound |
| 125 | by construction rather than checking for it afterwards. */ |
| 126 | long units=0; for(int c=0;c<ncomp;c++) units+=C[c].n; |
| 127 | double budget = GROW*(double)units; if(budget>pool) budget=pool; |
| 131 | 128 | double Dm=0; |
| 132 | 129 | for(int c=0;c<ncomp;c++){ |
| 133 | 130 | double out; |
| 134 | | if(mode==0){ double m=0; for(int k=0;k<C[c].n;k++) m+=matchC(C[c].s[k]); out = C[c].n? (m/C[c].n)/L*C[c].n : 0; } |
| 135 | | else out = 0.5*C[c].n; |
| 136 | | demand[c]=UPTAKE*out; Dm+=demand[c]; |
| 131 | if(mode==0){ double m=0; for(int k=0;k<C[c].n;k++) m+=matchC(C[c].s[k]); out = C[c].n? (m/(C[c].n*(double)L))*C[c].n : 0; } |
| 132 | else out = C[c].n; /* BLIND and MIXED: allocate by size, blind to function */ |
| 133 | demand[c]=out; Dm+=demand[c]; |
| 137 | 134 | } |
| 138 | | double fr=(Dm>0&&Dm>pool)?pool/Dm:1.0; |
| 139 | | for(int c=0;c<ncomp;c++){ double t=demand[c]*fr; C[c].mat+=t; pool-=t; } |
| 135 | if(Dm>0) for(int c=0;c<ncomp;c++){ double t=budget*demand[c]/Dm; C[c].mat+=t; pool-=t; } |
| 140 | 136 | |
| 141 | 137 | /* growth: material buys template-directed replication, parent by fitness WITHIN compartment */ |
| 142 | 138 | for(int c=0;c<ncomp;c++){ |
| … | … | @@ -164,6 +160,18 @@ static double run(int mode,double f,int divsz,double *start,double *ndiv,double |
| 164 | 160 | } |
| 165 | 161 | for(int c=0;c<ncomp;){ if(C[c].n<=0){ pool+=C[c].mat; C[c]=C[ncomp-1]; ncomp--; } else c++; } |
| 166 | 162 | if(ncomp<=0) break; |
| 163 | |
| 164 | /* MIXED: shuffle strands across all compartments so the population is genuinely ONE |
| 165 | well-mixed pool — the polymer.c single-level baseline. */ |
| 166 | if(mode==2 && ncomp>1){ |
| 167 | for(int rep=0;rep<4;rep++) |
| 168 | for(int c=0;c<ncomp;c++){ |
| 169 | if(C[c].n<=0) continue; |
| 170 | int d=(int)(xs()%(unsigned)ncomp); if(d==c||C[d].n<=0) continue; |
| 171 | int a=(int)(xs()%(unsigned)C[c].n), b=(int)(xs()%(unsigned)C[d].n); |
| 172 | uint64_t t=C[c].s[a]; C[c].s[a]=C[d].s[b]; C[d].s[b]=t; |
| 173 | } |
| 174 | } |
| 167 | 175 | { long u=0; for(int c=0;c<ncomp;c++) u+=C[c].n; popsum+=u; } |
| 168 | 176 | } |
| 169 | 177 | |