From 30f84c6aa2967d7e40b803227189f0c142d06888 Mon Sep 17 00:00:00 2001 From: martbost Date: Sun, 27 Sep 2026 13:50:23 -0500 Subject: [PATCH] plan-lab: month-by-month run from the real InstantAdPay org; the full-matrix climb becomes the ceiling view Co-Authored-By: Claude Fable 5.1 --- public/assets/plan-lab.js | 134 +++++++++++++++++++++++++++++++++++++- public/plan-lab.html | 39 ++++++++++- 2 files changed, 169 insertions(+), 4 deletions(-) diff --git a/public/assets/plan-lab.js b/public/assets/plan-lab.js index 277c61b..84e87f6 100644 --- a/public/assets/plan-lab.js +++ b/public/assets/plan-lab.js @@ -559,6 +559,138 @@ document.getElementById('deepReset').addEventListener('click', deepReset); document.getElementById('deepFill').addEventListener('input', e => { document.getElementById('deepFillVal').textContent = e.target.value + '%'; deepReset(); }); + + // ── grow a real org, month by month (the realistic run) ── + const SEED = {"apex":1,"m":[[1,0,6,18],[2,1,4,32],[3,1,4,17],[4,21,2,2],[5,3,1,2],[6,2,2,2],[7,2,2,5],[8,1,2,3],[9,2,1,2],[10,2,3,95],[11,3,2,2],[12,1,2,2],[13,8,2,2],[14,8,2,4],[15,14,2,4],[16,1,1,2],[17,1,2,2],[18,2,1,2],[19,3,1,2],[20,2,2,2],[21,2,3,9],[22,2,1,2],[23,3,1,2],[24,2,1,2],[25,11,1,2],[26,8,1,2],[27,12,1,2],[28,4,1,2],[29,4,1,2],[30,5,1,2],[31,5,1,2],[32,3,1,2],[33,7,2,2],[34,7,2,2],[35,9,1,2],[36,9,1,2],[37,15,1,2],[38,10,2,7],[39,10,2,3],[40,16,1,2],[41,10,2,2],[42,10,1,2],[43,16,1,2],[44,17,1,2],[45,17,1,2],[46,18,1,2],[47,18,1,2],[48,19,1,2],[49,19,1,2],[50,20,1,2],[51,10,1,2],[52,20,1,2],[53,10,1,2],[54,1,2,13],[55,22,1,2],[56,22,1,2],[57,23,1,2],[58,10,1,2],[59,10,1,2],[60,23,1,2],[61,10,1,2],[62,24,1,2],[63,10,2,2],[64,10,1,2],[65,54,1,2],[66,10,1,2],[67,24,1,2],[68,63,1,2],[69,25,1,2],[70,3,1,2],[71,54,1,2],[72,15,1,2],[73,54,1,2],[74,10,1,2],[75,25,1,2],[76,26,1,2],[77,26,1,2],[78,2,3,5],[79,27,1,2],[80,27,3,2],[81,10,1,2],[82,10,1,2],[83,28,1,2],[84,10,1,2],[85,10,1,2],[86,28,1,2],[87,29,1,2],[88,29,1,2],[89,30,1,2],[90,12,1,2],[91,54,2,0],[92,30,1,0],[93,2,3,3],[94,31,1,0],[95,54,1,0],[96,10,1,0],[97,54,1,3],[98,31,1,0],[99,32,1,0],[100,10,1,0],[101,1,2,12],[102,101,2,39],[103,32,1,0],[104,101,1,0],[105,101,2,39],[106,10,1,0],[107,101,1,0],[108,10,1,0],[109,3,1,0],[110,33,1,0],[111,33,1,0],[112,34,1,0],[113,2,2,7],[114,34,1,0],[115,102,1,0],[116,113,2,2],[117,101,2,19],[118,101,2,0],[119,11,1,0],[120,101,3,2],[121,101,1,0],[122,120,2,0],[123,116,1,0],[124,113,2,5],[125,113,3,2],[126,113,2,0],[127,124,2,0],[128,125,2,0],[129,120,1,0],[130,125,2,2],[131,130,1,0],[132,124,3,6],[133,3,1,0],[134,113,2,2],[135,10,1,0],[136,134,1,0],[137,134,2,0],[138,10,1,11],[139,132,2,5],[140,105,1,0],[141,102,1,0],[142,124,2,0],[143,102,1,0],[144,116,2,2],[145,144,1,0],[146,132,2,0],[147,139,3,10],[148,54,1,0],[149,147,2,2],[150,149,1,0],[151,139,2,0],[152,124,2,0],[153,124,2,0],[154,102,1,0],[155,35,1,0],[156,113,2,0],[157,147,2,0],[158,2,1,0],[159,10,1,0],[160,102,1,0],[161,2,2,2],[162,101,2,0],[163,101,2,2],[164,144,2,0],[165,10,1,2],[166,102,1,0],[167,35,1,0],[168,101,2,0],[169,10,2,5],[170,102,1,0],[171,10,1,0],[172,165,1,0],[173,97,1,0],[174,10,2,0],[175,10,2,5],[176,117,1,0],[177,10,1,0],[178,117,1,0],[179,102,1,0],[180,2,1,0],[181,113,2,0],[182,117,1,0],[183,10,1,0],[184,117,2,17],[185,102,1,0],[186,10,1,0],[187,117,1,0],[188,36,1,0],[189,36,1,0],[190,40,1,0],[191,117,1,0],[192,139,2,0],[193,117,1,3],[194,102,1,0],[195,139,2,3],[196,130,2,0],[197,102,1,0],[198,10,2,2],[199,101,1,10],[200,10,1,0],[201,10,1,0],[202,37,1,0],[203,117,1,0],[204,117,1,0],[205,40,1,0],[206,117,1,0],[207,41,1,0],[208,117,1,0],[209,41,1,0],[210,3,1,0],[211,117,1,0],[212,10,1,0],[213,238,1,0],[214,42,1,0],[215,54,1,0],[216,117,1,0],[217,10,2,2],[218,62,1,0],[219,62,1,0],[220,117,1,0],[221,169,1,0],[222,1,1,0],[223,199,2,7],[224,97,1,0],[225,42,1,0],[226,184,1,0],[227,217,2,2],[228,102,1,0],[229,184,1,0],[230,195,1,0],[231,227,1,0],[232,43,1,0],[233,43,1,0],[234,102,1,0],[235,1,2,4],[236,102,1,0],[237,169,1,0],[238,184,2,7],[239,169,1,0],[240,78,1,0],[241,184,1,2],[242,21,1,0],[243,132,2,0],[244,139,2,0],[245,223,1,0],[246,132,2,0],[247,184,1,0],[248,2,1,0],[249,241,1,2],[250,10,1,0],[251,10,1,0],[252,117,2,0],[253,102,1,0],[254,117,2,0],[255,227,1,0],[256,199,1,0],[257,10,1,0],[258,241,1,0],[259,184,1,0],[260,10,1,0],[261,249,1,0],[262,44,1,0],[263,138,1,0],[264,44,1,0],[265,10,1,0],[266,45,1,0],[267,10,1,0],[268,184,1,0],[269,45,1,0],[270,184,1,0],[271,138,1,0],[272,10,1,0],[273,46,1,0],[274,21,1,0],[275,46,1,0],[276,223,1,0],[277,10,1,0],[278,47,1,0],[279,1,1,0],[280,10,3,0],[281,184,1,0],[282,184,3,0],[283,47,1,0],[284,48,1,0],[285,102,1,0],[286,48,1,0],[287,49,1,0],[288,49,1,0],[289,50,1,0],[290,199,2,6],[291,184,1,0],[292,10,1,0],[293,199,1,2],[294,138,1,0],[295,10,1,0],[296,10,1,0],[297,199,1,0],[298,21,1,0],[299,223,1,0],[300,184,1,0],[301,10,1,0],[302,50,1,0],[303,293,1,0],[304,102,1,0],[305,51,1,0],[306,138,1,0],[307,51,1,0],[308,52,1,0],[309,52,1,0],[310,223,3,2],[311,310,1,0],[312,10,2,3],[313,53,1,0],[314,21,1,0],[315,249,1,0],[316,184,1,0],[317,184,1,0],[318,21,1,0],[319,184,1,0],[320,53,1,0],[321,195,1,0],[322,55,1,0],[323,55,1,0],[324,238,1,0],[325,199,1,0],[326,117,1,0],[327,56,1,0],[328,10,3,3],[329,238,1,0],[330,138,1,0],[331,199,3,2],[332,3,1,0],[333,10,1,0],[334,10,1,0],[335,199,1,0],[336,93,1,0],[337,293,1,0],[338,138,1,0],[339,217,2,0],[340,56,1,0],[341,238,1,0],[342,2,1,0],[343,138,1,0],[344,10,1,0],[345,37,1,0],[346,138,1,0],[347,10,2,2],[348,57,1,0],[349,184,1,0],[350,10,1,0],[351,57,1,0],[352,58,1,0],[353,138,1,0],[354,328,2,0],[355,328,2,2],[356,147,1,2],[357,102,1,0],[358,102,1,0],[359,132,1,0],[360,238,1,0],[361,58,1,0],[362,102,1,0],[363,312,2,2],[364,105,1,0],[365,105,1,0],[366,105,1,0],[367,102,1,0],[368,39,1,0],[369,105,1,0],[370,355,1,0],[371,10,1,0],[372,312,4,2],[373,238,1,0],[374,356,1,0],[375,105,1,0],[376,10,1,0],[377,223,1,0],[378,102,1,0],[379,310,1,0],[380,105,1,0],[381,2,1,0],[382,105,1,0],[383,102,1,0],[384,10,3,3],[385,290,1,0],[386,105,1,0],[387,105,1,0],[388,372,1,0],[389,331,1,0],[390,59,1,0],[391,21,1,0],[392,21,1,0],[393,102,1,0],[394,102,2,0],[395,328,2,0],[396,117,1,0],[397,21,1,0],[398,290,1,2],[399,105,1,0],[400,59,1,0],[401,102,1,0],[402,105,1,0],[403,199,1,0],[404,105,1,0],[405,102,1,0],[406,138,1,0],[407,54,1,0],[408,2,1,0],[409,105,1,0],[410,97,1,0],[411,105,1,0],[412,14,1,0],[413,355,1,0],[414,10,1,0],[415,398,1,2],[416,356,1,0],[417,105,1,0],[418,14,1,0],[419,105,1,0],[420,10,1,0],[421,415,2,2],[422,2,1,0],[423,54,1,0],[424,2,2,2],[425,424,1,0],[426,102,1,0],[427,105,1,0],[428,10,1,0],[429,105,1,0],[430,421,1,0],[431,93,1,0],[432,149,1,0],[433,147,1,0],[434,105,1,0],[435,2,1,0],[436,10,1,2],[437,93,1,0],[438,2,1,0],[439,398,1,0],[440,102,1,0],[441,38,1,0],[442,235,1,0],[443,331,1,0],[444,421,1,0],[445,102,1,0],[446,105,2,7],[447,312,1,0],[448,10,1,0],[449,235,1,0],[450,415,1,0],[451,2,1,0],[452,105,1,0],[453,105,1,0],[454,2,2,0],[455,10,1,0],[456,105,1,0],[457,424,1,0],[458,138,1,0],[459,10,1,0],[460,10,1,0],[461,10,1,0],[462,436,1,0],[463,10,3,2],[464,102,1,0],[465,10,1,0],[466,223,1,0],[467,10,1,0],[468,363,2,0],[469,363,2,0],[470,105,1,0],[471,10,1,0],[472,347,1,0],[473,132,1,0],[474,105,1,0],[475,446,1,0],[476,38,1,0],[477,463,1,0],[478,60,1,0],[479,2,1,0],[480,147,1,0],[481,199,1,0],[482,54,1,0],[483,105,1,0],[484,238,1,0],[485,105,1,0],[486,10,1,0],[487,60,1,0],[488,290,1,0],[489,10,1,0],[490,38,1,0],[491,10,1,0],[492,290,1,0],[493,61,1,0],[494,10,1,0],[495,10,1,0],[496,10,2,0],[497,2,1,0],[498,10,1,0],[499,61,1,0],[500,64,1,0],[501,10,1,0],[502,1,1,0],[503,10,1,0],[504,147,1,0],[505,10,1,0],[506,147,1,0],[507,64,1,0],[508,10,1,0],[509,195,1,0],[510,102,1,0],[511,193,1,0],[512,446,1,0],[513,65,1,0],[514,65,1,0],[515,102,1,0],[516,105,1,0],[517,66,1,0],[518,66,1,0],[519,175,1,0],[520,10,1,0],[521,67,1,0],[522,67,1,0],[523,68,1,0],[524,2,1,0],[525,3,1,0],[526,3,1,0],[527,1,1,0],[528,223,1,0],[529,78,1,0],[530,68,1,0],[531,69,1,0],[532,69,1,0],[533,105,1,0],[534,102,1,0],[535,70,1,0],[536,70,1,0],[537,10,1,0],[538,290,1,0],[539,38,1,0],[540,10,1,0],[541,71,1,0],[542,10,1,0],[543,71,1,0],[544,72,1,0],[545,63,1,0],[546,105,1,0],[547,10,2,0],[548,290,1,0],[549,235,1,0],[550,72,1,0],[551,384,1,0],[552,436,1,0],[553,105,1,0],[554,384,1,0],[555,73,1,0],[556,73,1,0],[557,161,1,0],[558,161,1,0],[559,446,1,0],[560,6,1,0],[561,74,1,0],[562,105,1,0],[563,384,1,0],[564,74,1,0],[565,2,1,0],[566,7,1,0],[567,1,1,0],[568,7,1,0],[569,105,1,0],[570,75,1,0],[571,446,1,0],[572,105,1,0],[573,3,1,0],[574,75,1,0],[575,13,1,0],[576,175,1,0],[577,13,1,0],[578,163,1,0],[579,102,1,0],[580,117,1,0],[581,347,1,0],[582,10,1,0],[583,76,1,0],[584,105,1,0],[585,76,1,0],[586,169,1,0],[587,6,1,0],[588,463,1,0],[589,446,1,0],[590,77,1,0],[591,193,1,0],[592,10,1,0],[593,15,1,0],[594,77,1,0],[595,10,1,0],[596,175,1,0],[597,38,1,0],[598,175,1,0],[599,446,1,0],[600,79,1,0],[601,79,1,0],[602,3,1,0],[603,81,1,0],[604,198,1,0],[605,2,1,0],[606,81,1,0],[607,102,1,0],[608,2,1,0],[609,163,1,0],[610,198,1,0],[611,165,1,0],[612,102,1,0],[613,3,1,0],[614,82,1,0],[615,3,1,0],[616,38,2,0],[617,39,1,0],[618,14,1,0],[619,147,1,0],[620,15,1,0],[621,193,1,0],[622,175,1,0],[623,105,1,0],[624,82,1,0],[625,83,1,0],[626,83,1,0],[627,84,1,0],[628,102,1,0],[629,84,1,0],[630,85,1,0],[631,10,2,0],[632,85,1,0],[633,86,1,0],[634,10,1,0],[635,105,1,0],[636,54,1,0],[637,102,1,0],[638,86,1,0],[639,87,1,0],[640,105,1,0],[641,3,1,0],[642,372,1,0],[643,184,1,0],[644,87,1,0],[645,78,1,0],[646,2,1,0],[647,78,1,0],[648,54,1,0],[649,38,1,0],[650,7,1,0],[651,1,2,15],[652,1,1,0],[653,88,1,0],[654,39,1,0],[655,10,1,0],[656,1,1,0],[657,147,1,0],[658,78,1,0],[659,88,1,0],[660,89,1,0],[661,651,1,0],[662,651,2,3],[663,651,1,0],[664,651,1,0],[665,651,1,0],[666,651,1,0],[667,651,1,0],[668,651,2,0],[669,662,1,0],[670,89,1,0],[671,90,1,0],[672,80,1,0],[673,662,1,0],[674,90,1,0],[675,662,1,0],[676,169,1,0],[677,446,1,0],[678,651,1,0],[679,651,1,0],[680,80,1,0],[681,651,1,0],[682,1,3,1],[683,651,1,0],[684,651,1,0],[685,147,1,0],[686,651,1,0],[687,682,2,0],[688,235,1,0],[689,651,1,0]]}; // the InstantAdPay org: [id, recruiterId, levelBought, recruits], no names + let G = null; + let rnd = mulberry32(7); + function mulberry32(a){ return function(){ a |= 0; a = a + 0x6D2B79F5 | 0; let t = Math.imul(a ^ a >>> 15, 1 | a); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; } + function gAdd(parent, recruiter, month){ + const m = { id: G.nextId++, parent, kids: [], depth: parent ? parent.depth + 1 : 0, level: 1, directs: 0, recruiter, cash: 0, entry: 0, lic: 0, licV: 0, cashFrom: 0, cashFromHalf: 0, month }; + G.members.push(m); if (parent) parent.kids.push(m); + return m; + } + function gSlot(root){ const q = [root]; while (q.length) { const n = q.shift(); if (n.kids.length < PLAN.w) return n; for (const k of n.kids) q.push(k); } return root; } + // an entry: placed breadth-first under the recruiter (or assigned to a member short of a direct), paid, split + function gJoin(recruiter, month, unsponsored){ + if (!recruiter) { // assigned: earliest member with one recruit, else earliest with none (never you) + recruiter = G.members.find(x => x !== G.you && x.directs === 1) || G.members.find(x => x !== G.you && x.directs === 0) || G.you; + } + const parent = gSlot(recruiter); + const m = gAdd(parent, recruiter, month); m.unsponsored = !!unsponsored; + recruiter.directs++; if (recruiter.directs === 1) recruiter.cashFromHalf = m.id; if (recruiter.directs === 2) recruiter.cashFrom = m.id; + const gross = price(1), fee = gross * PLAN.fee, n = gross - fee; + G.aud.spent += gross; G.aud.entryFee += fee; G.aud.received += fee; + const toRec = n * (1 - PLAN.split), toUp = n * PLAN.split; + recruiter.entry += toRec; parent.entry += toUp; G.aud.received += n; + G.mon.in += gross; G.mon.admin += fee; G.mon.joins++; if (unsponsored) G.mon.assigned++; + return m; + } + function gCashOk(u, origin, L){ + const own = !PLAN.wm || origin.recruiter === u; + if (u.directs >= 2) return own || origin.id >= u.cashFrom; + if (PLAN.half && u.directs === 1 && L <= 3) return own || origin.id >= u.cashFromHalf; + return false; + } + function gRoute(from, L, skipN, rem, origin){ + let cur = from.parent; for (let i = 0; i < skipN && cur; i++) cur = cur.parent; + while (cur) { + if (cur.level >= L) { if (gCashOk(cur, origin, L)) return { to: cur, kind: 'cash' }; } + else if (!rem) { const behindOk = PLAN.gap === 'fund' || cur.level >= L - 1, licOk = cur.directs >= 2 || PLAN.unq === 'licence'; if (behindOk && licOk) return { to: cur, kind: 'lic' }; } + cur = cur.parent; + } + return { to: null }; + } + function gPay(from, L, amt, skipN, origin, rem){ + const r = gRoute(from, L, skipN, rem, origin); + if (!r.to) { G.aud.above += amt; G.aud.received += amt; G.mon.above += amt; return; } + if (r.kind === 'cash') { r.to.cash += amt; G.aud.received += amt; return; } + const n = r.to.level + 1, cost = net(n); + r.to.level = n; r.to.lic++; r.to.licV += cost; G.mon.lics++; + gPay(r.to, n, cost, n - 2, origin, false); + if (amt - cost > 0.005) gPay(r.to, L, amt - cost, 0, origin, true); + } + function gBuy(m, L){ const gross = price(L), fee = gross * PLAN.fee; G.aud.spent += gross; G.aud.admin += fee; G.aud.received += fee; G.mon.in += gross; G.mon.admin += fee; G.mon.buys++; m.level = Math.max(m.level, L); gPay(m, L, gross - fee, L - 2, m, false); } + function gNewMonth(){ G.mon = { in: 0, admin: 0, joins: 0, assigned: 0, buys: 0, lics: 0, above: 0 }; } + function gReset(){ + rnd = mulberry32(7); + G = { month: 0, members: [], nextId: 1, you: null, rows: [], aud: { spent: 0, received: 0, admin: 0, entryFee: 0, above: 0 } }; + gNewMonth(); + G.you = gAdd(null, null, 0); + const seed = document.getElementById('gSeed').value; + if (seed === 'iap') { + const map = new Map([[SEED.apex, G.you]]); + const rows = SEED.m.filter(r => r[0] !== SEED.apex).sort((a, b) => a[0] - b[0]); + for (const r of rows) { const rec = map.get(r[1]); const m = gJoin(rec && rec !== G.you ? rec : (r[1] === SEED.apex ? G.you : null), 0, !rec); map.set(r[0], m); m.seedLevel = r[2]; } + for (let L = 2; L <= PLAN.maxL; L++) for (const m of G.members.slice().sort((a, b) => a.depth - b.depth || a.id - b.id)) if (m !== G.you && (m.seedLevel || 1) >= L && m.level < L) gBuy(m, L); + } + G.rows.push(gSnap(0)); + const ol = document.getElementById('gStory'); if (ol) ol.innerHTML = '
  • ' + (seed === 'iap' ? 'Start: the InstantAdPay org today, placed 4-wide under each member\u2019s real recruiter: ' + cnt(G.members.length - 1) + ' members, ' + cnt(G.members.filter(x => x.level >= 2).length) + ' of them past level 1, ' + cnt(G.members.filter(x => x.directs >= 2).length) + ' qualified. Their past purchases replayed through the rules: money in ' + $$(G.aud.spent) + ', admin wallet ' + $$(G.aud.admin + G.aud.entryFee) + ', you ' + $$(G.you.cash + G.you.entry) + '.' : 'Start: just you at level 1, nobody under you yet. In month 1 you recruit two people yourself (everyone needs two to receive cash at full reach); after that the org grows the way InstantAdPay’s did.') + ' Now run a month.
  • '; + gRender(); + window.growAudit = () => ({ spent: Math.round(G.aud.spent), received: Math.round(G.aud.received), ok: Math.abs(G.aud.spent - G.aud.received) <= 0.01 + 1e-9 * G.aud.spent }); + } + function gSnap(month){ + const ms = G.members.filter(x => x !== G.you); + return { month, joins: G.mon.joins, assigned: G.mon.assigned, buys: G.mon.buys, lics: G.mon.lics, members: ms.length, in: G.mon.in, admin: G.mon.admin, above: G.mon.above, + toMembers: ms.reduce((a, x) => a + x.cash + x.entry, 0), toYou: G.you.cash + G.you.entry, youLevel: G.you.level, youLic: G.you.lic, + paid: ms.filter(x => x.cash + x.entry > 0).length, l2: ms.filter(x => x.level >= 2).length, qualified: ms.filter(x => x.directs >= 2).length }; + } + function gMonth(){ + G.month++; gNewMonth(); + const J0 = Number(document.getElementById('gJoins').value), g = Number(document.getElementById('gGrowth').value) / 100, pBuy = Number(document.getElementById('gBuy').value) / 100; + const joins = Math.round(J0 * Math.pow(1 + g, G.month - 1)); + const U = 0.24; // share who arrive with no recruiter (InstantAdPay: 164 of 688) + for (let i = 0; i < joins; i++) { + let rec = null, unsp = false; + if (G.you.directs < 2 && G.month === 1 && i < 2) rec = G.you; // starting from just you: you bring your first two yourself, like everyone must + else if (rnd() < U) { unsp = true; } + else { + const pool = G.members.filter(x => x !== G.you); + if (rnd() < 0.85 && pool.some(x => x.directs > 0)) { // an existing recruiter, weighted by how many they already brought (top tenth bring half) + const rs = pool.filter(x => x.directs > 0); let tot = 0; for (const x of rs) tot += x.directs + 1; let t = rnd() * tot; + for (const x of rs) { t -= x.directs + 1; if (t <= 0) { rec = x; break; } } if (!rec) rec = rs[rs.length - 1]; + } else if (pool.length) { rec = pool[Math.floor(rnd() * pool.length)]; } // a first-time recruiter + else rec = G.you; + } + gJoin(rec, G.month, unsp); + } + // upgrades: each member at level L buys L+1 with probability pBuy, shallow to deep; licences from below make some of these free + for (const m of G.members.slice().sort((a, b) => a.depth - b.depth || a.id - b.id)) { if (m === G.you || m.level >= PLAN.maxL) continue; if (rnd() < pBuy) gBuy(m, m.level + 1); } + const s = gSnap(G.month); G.rows.push(s); + const prev = G.rows[G.rows.length - 2]; + const dYou = s.toYou - prev.toYou; + storyG('Month ' + G.month + '. ' + cnt(s.joins) + ' joined' + (s.assigned ? ', ' + cnt(s.assigned) + ' of them with no recruiter, assigned to members short of a direct' : '') + '. ' + cnt(s.buys) + ' bought a level with their own money and ' + cnt(s.lics) + ' licences were funded by pass-ups. Money in ' + $$(s.in) + ': admin wallet ' + $$(s.admin) + ', the rest to members' + (s.above ? ' (' + $$(s.above) + ' climbed past you to the company)' : '') + '. You: ' + (dYou >= 0 ? '+' : '') + $$(dYou) + '' + (s.youLevel > prev.youLevel ? ', and your team moved you to level ' + s.youLevel + '' : '') + '. ' + cnt(s.paid) + ' of ' + cnt(s.members) + ' members have been paid something; ' + cnt(s.l2) + ' are past level 1.', s.youLevel > prev.youLevel ? 'lic' : 'cash'); + gRender(); + } + function storyG(html, cls){ const ol = document.getElementById('gStory'); if (!ol) return; const li = document.createElement('li'); if (cls) li.className = cls; li.innerHTML = html; ol.prepend(li); while (ol.children.length > 40) ol.removeChild(ol.lastChild); } + function gRender(){ + const s = G.rows[G.rows.length - 1]; + document.getElementById('gMonth').textContent = G.month; document.getElementById('gMembers').textContent = cnt(s.members) + ' members'; + document.getElementById('gLevel').textContent = s.youLevel; document.getElementById('gLevelS').textContent = 'reach = depth 1 to ' + s.youLevel + ' \u00b7 ' + s.youLic + ' licence' + (s.youLic === 1 ? '' : 's') + ' funded for you'; + document.getElementById('gYou').textContent = $$(s.toYou); document.getElementById('gYouS').textContent = 'cash ' + $$(G.you.cash) + ' + entries ' + $$(G.you.entry) + '; licences worth ' + $$(G.you.licV) + ' apart'; + document.getElementById('gAdmin').textContent = $$(G.aud.admin + G.aud.entryFee); + document.getElementById('gPaid').textContent = cnt(s.paid); document.getElementById('gPaidS').textContent = 'of ' + cnt(s.members) + ' (' + (s.members ? Math.round(100 * s.paid / s.members) : 0) + '%) \u00b7 ' + cnt(s.qualified) + ' qualified'; + document.getElementById('gIn').textContent = $$(G.aud.spent); + const tb = document.querySelector('#gTable tbody'); if (tb) { tb.innerHTML = ''; for (const r of G.rows) { const tr = document.createElement('tr'); tr.innerHTML = '' + r.month + '' + cnt(r.joins) + '' + cnt(r.members) + '' + cnt(r.buys) + '' + $$(r.in) + '' + $$(r.admin) + '' + $$(r.in - r.admin - r.above) + '' + $$(r.toYou) + '' + r.youLevel + '' + cnt(r.paid) + '' + cnt(r.l2) + ''; tb.appendChild(tr); } } + const sp = document.getElementById('gSpread'); + if (sp) { + const ms = G.members.filter(x => x !== G.you).map(x => x.cash + x.entry).sort((a, b) => b - a); + const pct = (p) => ms.length ? ms[Math.min(ms.length - 1, Math.floor(ms.length * p))] : 0; + const top10 = ms.slice(0, Math.max(1, Math.round(ms.length * 0.1))).reduce((a, b) => a + b, 0), all = ms.reduce((a, b) => a + b, 0); + const lv = {}; for (const x of G.members) if (x !== G.you) lv[x.level] = (lv[x.level] || 0) + 1; + sp.innerHTML = 'Top earner in the org: ' + $$(ms[0] || 0) + '. Top 10% of members took ' + (all ? Math.round(100 * top10 / all) : 0) + '% of what members received. Median member: ' + $$(pct(0.5)) + '. Members with nothing: ' + cnt(ms.filter(v => v <= 0).length) + '.
    Levels held: ' + Object.keys(lv).map(Number).sort((a, b) => a - b).map(L => 'L' + L + ' ' + cnt(lv[L])).join(' \u00b7 ') + '.'; + } + } + function gRun(k){ for (let i = 0; i < k; i++) gMonth(); } + document.getElementById('gRun1').addEventListener('click', () => gRun(1)); + document.getElementById('gRun6').addEventListener('click', () => gRun(6)); + document.getElementById('gRun12').addEventListener('click', () => gRun(12)); + document.getElementById('gReset').addEventListener('click', gReset); + document.getElementById('gSeed').addEventListener('change', gReset); + document.getElementById('gJoins').addEventListener('input', e => { document.getElementById('gJoinsVal').textContent = e.target.value; }); + document.getElementById('gGrowth').addEventListener('input', e => { document.getElementById('gGrowthVal').textContent = (Number(e.target.value) >= 0 ? '+' : '') + e.target.value + '%'; }); + document.getElementById('gBuy').addEventListener('input', e => { document.getElementById('gBuyVal').textContent = e.target.value + '%'; }); + // ── plan controls ── function applyPlan(){ PLAN.w = Number(document.getElementById('width').value); @@ -582,7 +714,7 @@ document.getElementById('youLevelVal').textContent = yl.value; { const dh = document.getElementById('deepHead'); if (dh) dh.textContent = 'Watch one position climb all ' + PLAN.maxL + ' levels'; } svg.setAttribute('aria-label', PLAN.w + '-wide matrix under you'); - build(); deepReset(); + build(); deepReset(); gReset(); } for (const id of ['width', 'levels', 'shape']) document.getElementById(id).addEventListener('change', applyPlan); document.getElementById('steps').addEventListener('change', applyPlan); diff --git a/public/plan-lab.html b/public/plan-lab.html index 8cb1a99..8440646 100644 --- a/public/plan-lab.html +++ b/public/plan-lab.html @@ -171,14 +171,46 @@ details.adv.big summary{font-size:18px}
    Compensation plan · working draft · 27 Sep 2026

    Your reach is your level. Width does the rest.

    -

    A forced matrix with the same two-directs rule to receive, and three things RM Circle does not have: every payment that reaches you is either cash or your next licence, and the contract knows which; the matrix can be wider than two, so the people you build sit within your reach instead of 28 deep; and prices step up with the product, never double. The working plan is 4 wide, 8 levels, a stepped ladder and the fund-the-gap rule; the other settings are there to compare against.

    +

    A forced matrix with the same two-directs rule to receive, and three things RM Circle does not have: every payment that reaches you is either cash or your next licence, and the contract knows which; the matrix can be wider than two, so the people you build sit within your reach instead of 28 deep; and prices step up with the product, never double. The working plan is 4 wide, 8 levels, a stepped ladder, a 20% admin fee and the fund-the-gap rule. Start with the month-by-month run: it uses your real InstantAdPay org and realistic join and buy rates.

    +

    Grow the org, month by month

    +

    This is the realistic run. It starts from your real InstantAdPay organisation as it stands today (688 members, their real recruiters, the levels they have actually bought), or from just you. Each month a number of people join, most recruited by the few who recruit, some with no recruiter and assigned to a member short of a direct. Each month only a share of members buy their next level. Every payment follows the plan's rules exactly, with the 20% admin fee. Defaults are calibrated to InstantAdPay's first three weeks: 11% of members ever recruit, the top tenth of recruiters bring half the joins, 16% of members have bought a level, and a fifth of those bought another.

    +
    +
    +
    Month
    0
    members
    +
    Your level
    1
    reach = depth 1 to 1
    +
    Your income so far
    $0
    cash + entries; licences apart
    +
    Admin wallet so far
    $0
    20% of every purchase and entry
    +
    Members paid something
    0
    of the org
    +
    Money in so far
    $0
    entries + levels bought
    +
    +
    +
    +
    300
    +
    +5%
    +
    8%
    +
    +
    +
    +
    +
    +
    1. Press Start over to load the org, then run a month.
    +
    Month by month, in numbers +
    MonthJoinedMembersBought a levelMoney inAdminTo membersTo youYour levelPaid so farAt L2+
    +
    +
    Who earned what: the spread across members +
    +
    +
    +
    +
    The theoretical ceiling: a full matrix, everyone buying every level +

    Watch one position climb all 8 levels

    -

    You start at level 1 with a full 4-wide organisation under you, everyone else at level 1 too. Press Run one wave: every position under you buys its next level, and the story tells you what reached you and why. Five waves later you are near the top without buying a thing.

    +

    Not a forecast. This assumes 87,380 people already joined and every one of them buys the next level every wave. It shows the most one position can ever receive, level by level. You start at level 1 with a full 4-wide organisation under you, everyone else at level 1 too. Press Run one wave: every position under you buys its next level, and the story tells you what reached you and why. Five waves later you are near the top without buying a thing.

    Your level
    1
    reach = depth 1 to 1
    @@ -217,6 +249,7 @@ details.adv.big summary{font-size:18px}
    +
    The eight rules

    Eight rules, and nothing else

    @@ -292,6 +325,6 @@ details.adv.big summary{font-size:18px}

    Unlisted working page for planning. Not a member page, not an offer. Every number here is a mechanic, not a prediction.

    - +