Add game-simulation package with multi-run balance testing, fix stalled-pipeline trap
Adds a full simulation harness (game-simulation package) with greedy/random strategies, 36-metric diagnostics, multi-run orchestration via child processes, and a statistical interpreter. Includes 2.3x engine performance optimizations (research bonus caching, per-DC dirty tracking, reduced allocations in tick pipeline, single-pass loops). Fixes a critical balance bug where training pipelines stalled on insufficient VRAM would permanently block training slots — the engine never re-checked stalled pipelines, and the greedy strategy didn't pre-check VRAM requirements. This caused 20-25% of seeds to get stuck in Scale-up era. All three fixes (engine un-stalling, strategy VRAM pre-check, stalled pipeline cancellation) bring pass rate from 75% to 100% across 20 random seeds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,7 @@ export function processEnterprisePipeline(
|
||||
const activeContracts = [...ent.activeContracts];
|
||||
|
||||
const effectiveSales = salesHeadcount > 0
|
||||
? Math.min(1, salesHeadcount * salesEffectiveness / Math.max(1, pipeline.length))
|
||||
? Math.min(2, salesHeadcount * salesEffectiveness * 0.2)
|
||||
: 0;
|
||||
|
||||
// --- Lead generation ---
|
||||
@@ -129,7 +129,8 @@ export function processEnterprisePipeline(
|
||||
let transitionProb = baseRate * effectiveSales;
|
||||
|
||||
if (lead.stage === 'qualification') {
|
||||
transitionProb *= modelCapability >= lead.requiredCapability ? 1 : 0.1;
|
||||
const capRatio = Math.min(2, modelCapability / Math.max(1, lead.requiredCapability));
|
||||
transitionProb *= capRatio > 1 ? capRatio : capRatio * 0.3;
|
||||
} else if (lead.stage === 'poc') {
|
||||
const entDemand = enterpriseServingMetrics.demandTokens;
|
||||
const entRejected = enterpriseServingMetrics.rejectedTokens;
|
||||
|
||||
Reference in New Issue
Block a user