4c1c0e9ff2
CI / build-and-push (push) Successful in 32s
Replace the single-stage training + flat capability score with a realistic AI development pipeline: pre-training with Chinchilla scaling laws, SFT with specializations, alignment with safety/capability tradeoffs (RLHF/DPO/Constitutional), model families with distillation/fine-tuning/quantization variants, named benchmark suite with compute-costing eval jobs, and segment-specific market quality. Phases 1-6 of the model rework plan: new types, engine rewrite, save migration, training events/risk system, concurrent training, variant creation, benchmark evaluation with leaderboard, and market integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
781 B
TypeScript
26 lines
781 B
TypeScript
import type { GameState, Era } from '@ai-tycoon/shared';
|
|
import { ERA_THRESHOLDS } from '@ai-tycoon/shared';
|
|
|
|
export function checkEraTransition(state: GameState): Era | null {
|
|
const current = state.meta.currentEra;
|
|
const eraOrder: Era[] = ['startup', 'scaleup', 'bigtech', 'agi'];
|
|
const currentIdx = eraOrder.indexOf(current);
|
|
const nextEra = eraOrder[currentIdx + 1];
|
|
if (!nextEra) return null;
|
|
|
|
const thresholds = ERA_THRESHOLDS[nextEra as keyof typeof ERA_THRESHOLDS];
|
|
if (!thresholds) return null;
|
|
|
|
const bestModel = state.models.bestDeployedModelScore;
|
|
|
|
if (
|
|
state.economy.totalRevenue >= thresholds.revenue &&
|
|
bestModel >= thresholds.capability &&
|
|
state.reputation.score >= thresholds.reputation
|
|
) {
|
|
return nextEra;
|
|
}
|
|
|
|
return null;
|
|
}
|