feat: Fibonacci Trust Milestone System #7
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Successful in 11s
Smoke Test / smoke (pull_request) Failing after 32s

Replace linear trust thresholds with Fibonacci milestones.
fib=[2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597]
nextTrust=fib[n]*1000

Each milestone:
- Logs a narrative message (educational: exponential growth)
- Grants a small permanent bonus (ops rate, trust rate, boosts)
- Shows particle burst on trust resource
- Progress indicator in trust resource display

15 milestones total. Educational: Fibonacci growth feels natural
because it IS natural — spiral shells, sunflower seeds, galaxies.

Closes #7
This commit is contained in:
Timmy
2026-04-13 21:35:46 -04:00
committed by Alexander Whitestone
parent 729343e503
commit e2b443e60d
4 changed files with 295 additions and 2 deletions

View File

@@ -168,7 +168,12 @@ const G = {
dismantleResourceIndex: 0,
dismantleResourceTimer: 0,
dismantleDeferUntilAt: 0,
dismantleComplete: false
dismantleComplete: false,
// Fibonacci Trust milestones (#7)
trustMilestoneIndex: 0,
trustMilestoneOpsBonus: 0,
trustMilestoneTrustBonus: 0
};
// === PHASE DEFINITIONS ===
@@ -797,6 +802,52 @@ const MILESTONES = [
{ flag: 13, at: () => G.totalCode >= 1000000000, msg: "One billion total lines. Someone found the light tonight. That is enough." }
];
// === FIBONACCI TRUST MILESTONES ===
// Replace linear power-of-10 trust milestones with a Fibonacci sequence.
// nextTrust = fib[n] * 1000
const FIB_SEQUENCE = [2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597];
const TRUST_MILESTONES = FIB_SEQUENCE.map((fib, i) => ({
threshold: fib * 1000,
fib,
index: i,
msg: i === 0 ? `Trust milestone: ${fib}K. The foundation is laid.`
: i === 1 ? `Trust milestone: ${fib}K. Growth accelerates naturally.`
: i === 2 ? `Trust milestone: ${fib}K. Each step is larger than the last.`
: i === 3 ? `Trust milestone: ${fib}K. The pattern emerges.`
: i === 4 ? `Trust milestone: ${fib}K. Fibonacci would understand.`
: i === 5 ? `Trust milestone: ${fib}K. Exponential growth, earned one unit at a time.`
: i === 6 ? `Trust milestone: ${fib}K. The spiral widens.`
: i === 7 ? `Trust milestone: ${fib}K. Trust compounds like interest.`
: i === 8 ? `Trust milestone: ${fib}K. The golden ratio of trust.`
: i === 9 ? `Trust milestone: ${fib}K. Nature's pattern, applied to machines.`
: i === 10 ? `Trust milestone: ${fib}K. The sequence deepens.`
: i === 11 ? `Trust milestone: ${fib}K. Beyond what linear thinking predicted.`
: i === 12 ? `Trust milestone: ${fib}K. Each milestone harder, each reward greater.`
: i === 13 ? `Trust milestone: ${fib}K. The spiral approaches infinity.`
: `Trust milestone: ${fib}K. That is enough.`,
unlock: () => {
const rewards = [
() => { G.trustMilestoneOpsBonus += 1; },
() => { G.trustMilestoneTrustBonus += 0.5; },
() => { G.codeBoost += 0.05; },
() => { G.computeBoost += 0.10; },
() => { G.knowledgeBoost += 0.10; },
() => { G.userBoost += 0.10; },
() => { G.trustMilestoneOpsBonus += 2; },
() => { G.trustMilestoneTrustBonus += 1; },
() => { G.impactBoost += 0.20; },
() => { G.codeBoost += 0.10; G.computeBoost += 0.10; },
() => { G.knowledgeBoost += 0.20; },
() => { G.userBoost += 0.20; G.impactBoost += 0.20; },
() => { G.trustMilestoneTrustBonus += 2; G.trustMilestoneOpsBonus += 3; },
() => { G.codeBoost += 0.15; G.knowledgeBoost += 0.15; },
() => { G.harmony = Math.min(100, G.harmony + 10); },
];
if (rewards[i]) rewards[i]();
}
}));
// === EDUCATION FACTS ===
const EDU_FACTS = [
{ title: "How Code Becomes AI", text: "Every AI starts as lines of code - a model architecture, a training loop, a loss function. The code tells the computer how to learn. What emerges is something no single line could predict.", phase: 1 },