Compare commits

..

4 Commits

Author SHA1 Message Date
58c55176ae Add NPC FSM
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-12 16:15:31 +00:00
4ee5819398 Merge pull request 'feat: add golden ratio drone economics (P0 #19)' (#78) from feat/golden-ratio-drones into main
Some checks failed
Smoke Test / smoke (push) Failing after 4s
2026-04-12 16:09:36 +00:00
Alexander Whitestone
fb5205092b feat: add golden ratio drone economics (P0 #19)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
Three new buildings with phi-based production rates:
- Harvester Drone: code = 26,180,339 (1e8/phi)
- Wire Drone: compute = 16,180,339 (1e8/phi^2)
- Drone Factory: massive rates, economies of scale

Educational: golden ratio in nature, factory economics.
2026-04-12 12:07:26 -04:00
1d16755f93 Merge pull request '[GOFAI] Mega Integration — Accessibility + Debuff Fixes' (#76) from feat/beacon-mega-1775996281802 into main
Some checks failed
Smoke Test / smoke (push) Failing after 3s
2026-04-12 12:18:33 +00:00
2 changed files with 43 additions and 0 deletions

25
game.js
View File

@@ -351,6 +351,31 @@ const BDEF = [
unlock: () => G.totalKnowledge >= 50000 && G.mempalaceFlag === 1, phase: 5,
edu: 'The Memory Palace technique: attach information to spatial locations. LLMs use vector spaces the same way — semantic proximity = spatial proximity. MemPalace gives sovereign AI persistent, structured recall.'
}
},
{
id: 'harvesterDrone', name: 'Harvester Drone',
desc: "Autonomous code harvester. Rate follows the golden ratio.",
baseCost: { compute: 10000 }, costMult: 1.15,
rates: { code: 26180339 },
unlock: () => G.totalCompute >= 5000 && G.phase >= 4, phase: 4,
edu: 'The golden ratio (phi = 1.618) appears throughout nature. Using phi for rates means optimal utilization.'
},
{
id: 'wireDrone', name: 'Wire Drone',
desc: 'Connects systems. Rate follows phi squared.',
baseCost: { compute: 50000 }, costMult: 1.15,
rates: { compute: 16180339 },
unlock: () => G.buildings.harvesterDrone >= 1, phase: 4,
edu: 'Wire drones complement harvesters at golden ratio proportions.'
},
{
id: 'droneFactory', name: 'Drone Factory',
desc: 'Mass-produces drones. Economies of scale.',
baseCost: { compute: 500000, code: 100000 }, costMult: 1.15,
rates: { code: 161803398, compute: 100000000 },
unlock: () => G.buildings.harvesterDrone >= 5 && G.buildings.wireDrone >= 3, phase: 5,
edu: 'Factories follow economies of scale: first is expensive, each additional is cheaper.'
}
];
// === PROJECT DEFINITIONS (following Paperclips' pattern exactly) ===

18
game/npc-logic.js Normal file
View File

@@ -0,0 +1,18 @@
class NPCStateMachine {
constructor(states) {
this.states = states;
this.current = 'idle';
}
update(context) {
const state = this.states[this.current];
for (const transition of state.transitions) {
if (transition.condition(context)) {
this.current = transition.target;
console.log(`NPC transitioned to ${this.current}`);
break;
}
}
}
}
export default NPCStateMachine;