Rename AI Tycoon to Token Empire across entire codebase
Balance Check / balance-simulation (pull_request) Successful in 38s
Balance Check / multi-run-balance (pull_request) Successful in 13m44s

Full rebrand: UI display text, package scope (@ai-tycoon/* -> @token-empire/*),
localStorage keys, Docker/CI image paths, database names, and documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-27 21:04:07 -04:00
parent be93e57853
commit c1cc70eeb9
123 changed files with 248 additions and 248 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
{
"name": "@ai-tycoon/game-engine",
"name": "@token-empire/game-engine",
"private": true,
"version": "0.0.1",
"type": "module",
@@ -11,10 +11,10 @@
"test": "vitest run"
},
"dependencies": {
"@ai-tycoon/shared": "workspace:*"
"@token-empire/shared": "workspace:*"
},
"devDependencies": {
"@ai-tycoon/tsconfig": "workspace:*",
"@token-empire/tsconfig": "workspace:*",
"typescript": "^5.8.0"
}
}
@@ -2,8 +2,8 @@ import type {
Cluster, Campus, DataCenter, DeploymentCohort,
DCNetworkSummary, CampusNetworkSummary, ClusterNetworkSummary,
TrainingPipeline, BaseModel, ModelFamily,
} from '@ai-tycoon/shared';
import { uuid } from '@ai-tycoon/shared';
} from '@token-empire/shared';
import { uuid } from '@token-empire/shared';
import type { DeepPartial } from './createTestState';
function emptyDCNetwork(): DCNetworkSummary {
@@ -1,11 +1,11 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
import {
INITIAL_SETTINGS, SAVE_VERSION,
INITIAL_ECONOMY, INITIAL_INFRASTRUCTURE, INITIAL_COMPUTE,
INITIAL_RESEARCH, INITIAL_MODELS, INITIAL_MARKET,
INITIAL_COMPETITORS, INITIAL_TALENT, INITIAL_DATA,
INITIAL_REPUTATION, INITIAL_ACHIEVEMENTS,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export type DeepPartial<T> = T extends object
? { [K in keyof T]?: DeepPartial<T[K]> }
@@ -1,4 +1,4 @@
import type { AchievementDefinition } from '@ai-tycoon/shared';
import type { AchievementDefinition } from '@token-empire/shared';
export const ACHIEVEMENT_DEFINITIONS: AchievementDefinition[] = [
{
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Competitor } from '@ai-tycoon/shared';
import type { Competitor } from '@token-empire/shared';
export const INITIAL_RIVALS: Competitor[] = [
{
@@ -1,4 +1,4 @@
import type { EnterpriseSegment } from '@ai-tycoon/shared';
import type { EnterpriseSegment } from '@token-empire/shared';
export const ENTERPRISE_NAMES: Record<EnterpriseSegment, string[]> = {
startup: [
+1 -1
View File
@@ -1,4 +1,4 @@
import type { DepartmentId } from '@ai-tycoon/shared';
import type { DepartmentId } from '@token-empire/shared';
/**
* A recruitable key hire as it appears in the available pool.
+1 -1
View File
@@ -1,4 +1,4 @@
import type { ResearchNode } from '@ai-tycoon/shared';
import type { ResearchNode } from '@token-empire/shared';
export const TECH_TREE: ResearchNode[] = [
// === COMPUTE / INFRASTRUCTURE ===
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
import { processTick } from './tick';
export interface GameEngineCallbacks {
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest';
import { processAchievements } from './achievementSystem';
import { createTestState } from '../__test-utils__';
import type { AchievementDefinition } from '@ai-tycoon/shared';
import type { AchievementDefinition } from '@token-empire/shared';
function makeDef(overrides: Partial<AchievementDefinition> = {}): AchievementDefinition {
return {
@@ -1,4 +1,4 @@
import type { GameState, AchievementState, AchievementDefinition } from '@ai-tycoon/shared';
import type { GameState, AchievementState, AchievementDefinition } from '@token-empire/shared';
export interface AchievementTickResult {
achievements: AchievementState;
@@ -1,8 +1,8 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { processCompetitors } from './competitorSystem';
import { createTestState, createSeededRNG } from '../__test-utils__';
import { FRESHNESS_DECAY_RATE } from '@ai-tycoon/shared';
import type { Competitor } from '@ai-tycoon/shared';
import { FRESHNESS_DECAY_RATE } from '@token-empire/shared';
import type { Competitor } from '@token-empire/shared';
const rng = createSeededRNG(42);
beforeEach(() => rng.install());
@@ -1,10 +1,10 @@
import type { GameState, CompetitorState, Competitor } from '@ai-tycoon/shared';
import type { GameState, CompetitorState, Competitor } from '@token-empire/shared';
import {
COMPETITOR_PRODUCT_THRESHOLDS,
COMPETITOR_CATCHUP_SHARE_THRESHOLD,
COMPETITOR_CATCHUP_PRICE_CUT,
FRESHNESS_DECAY_RATE,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
function updateCompetitorProducts(rival: Competitor): Competitor['products'] {
const cap = rival.estimatedCapability;
@@ -1,8 +1,8 @@
import { describe, it, expect } from 'vitest';
import { createTestState } from '../__test-utils__';
import { computeCapacity, finalizeCompute } from './computeSystem';
import type { InfrastructureState } from '@ai-tycoon/shared';
import { INITIAL_INFRASTRUCTURE, FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@ai-tycoon/shared';
import type { InfrastructureState } from '@token-empire/shared';
import { INITIAL_INFRASTRUCTURE, FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@token-empire/shared';
function createInfrastructure(overrides: Partial<InfrastructureState> = {}): InfrastructureState {
return { ...INITIAL_INFRASTRUCTURE, ...overrides };
@@ -1,5 +1,5 @@
import type { GameState, ComputeState, InfrastructureState } from '@ai-tycoon/shared';
import { FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@ai-tycoon/shared';
import type { GameState, ComputeState, InfrastructureState } from '@token-empire/shared';
import { FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@token-empire/shared';
import type { ResearchBonuses } from './researchBonuses';
export interface CapacityResult {
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest';
import { processData } from './dataSystem';
import { createTestState } from '../__test-utils__';
import type { DataPartnership } from '@ai-tycoon/shared';
import type { DataPartnership } from '@token-empire/shared';
function makePartnership(tokensPerTick: number): DataPartnership {
return {
@@ -1,4 +1,4 @@
import type { GameState, DataState } from '@ai-tycoon/shared';
import type { GameState, DataState } from '@token-empire/shared';
export function processData(state: GameState): DataState {
const subscribers = state.market.consumerTiers.totalUsers;
@@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest';
import { processEconomy } from './economySystem';
import { createTestState, createTestCluster } from '../__test-utils__';
import type { MarketTickResult } from './marketSystem';
import type { InfrastructureState } from '@ai-tycoon/shared';
import type { InfrastructureState } from '@token-empire/shared';
function createMarketResult(
overrides: Partial<MarketTickResult> = {},
@@ -1,5 +1,5 @@
import type { GameState, EconomyState, InfrastructureState } from '@ai-tycoon/shared';
import { FINANCIAL_SNAPSHOT_INTERVAL, MAX_FINANCIAL_HISTORY, REGULATION_COMPLIANCE_PER_CAPABILITY } from '@ai-tycoon/shared';
import type { GameState, EconomyState, InfrastructureState } from '@token-empire/shared';
import { FINANCIAL_SNAPSHOT_INTERVAL, MAX_FINANCIAL_HISTORY, REGULATION_COMPLIANCE_PER_CAPABILITY } from '@token-empire/shared';
import { TECH_TREE } from '../data/techTree';
import type { MarketTickResult } from './marketSystem';
@@ -1,5 +1,5 @@
import type { GameState, Era } from '@ai-tycoon/shared';
import { ERA_THRESHOLDS } from '@ai-tycoon/shared';
import type { GameState, Era } from '@token-empire/shared';
import { ERA_THRESHOLDS } from '@token-empire/shared';
export function checkEraTransition(state: GameState): Era | null {
const current = state.meta.currentEra;
@@ -1,5 +1,5 @@
import type { GameState, FundingState, FundingRoundType } from '@ai-tycoon/shared';
import { FUNDING_ROUNDS } from '@ai-tycoon/shared';
import type { GameState, FundingState, FundingRoundType } from '@token-empire/shared';
import { FUNDING_ROUNDS } from '@token-empire/shared';
const ROUND_ORDER: FundingRoundType[] = ['seed', 'seriesA', 'seriesB', 'seriesC', 'seriesD', 'ipo'];
@@ -3,7 +3,7 @@ import type {
DeploymentCohort, PipelineStage, RackSkuId,
SwitchTier, DCNetworkSummary, CampusNetworkSummary, ClusterNetworkSummary,
RepairBatch, CampusRetrofitQueue, DCTier, IntraNodeInterconnect, NetworkFabric, RackSkuConfig,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
LOCATION_CONFIGS,
RACK_SKU_CONFIGS,
@@ -22,7 +22,7 @@ import {
COOLING_TYPE_CONFIGS,
NETWORK_FABRIC_CONFIGS,
estimateNetworkSlots,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { TickNotification } from '../tick';
import type { ResearchBonuses } from './researchBonuses';
@@ -1,11 +1,11 @@
import type { ApiTierState, ApiTierId, DeveloperEcosystem, TierServingMetrics } from '@ai-tycoon/shared';
import type { ApiTierState, ApiTierId, DeveloperEcosystem, TierServingMetrics } from '@token-empire/shared';
import {
API_TIER_ORDER,
API_CONVERSION_RATES,
API_TIER_CHURN_RATES,
API_TOKENS_PER_DEVELOPER_PER_TICK,
REJECTION_CHURN_MULTIPLIER,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export interface ApiTickResult {
apiTiers: ApiTierState;
@@ -1,4 +1,4 @@
import type { ConsumerTierState, ConsumerTierId, TierServingMetrics } from '@ai-tycoon/shared';
import type { ConsumerTierState, ConsumerTierId, TierServingMetrics } from '@token-empire/shared';
import {
CONSUMER_TIER_ORDER,
CONVERSION_RATES,
@@ -14,7 +14,7 @@ import {
PRICE_SATISFACTION_WEIGHT,
PRICE_CHURN_EXPONENT,
PRICE_CHURN_MAX_MULTIPLIER,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export interface ConsumerTickResult {
consumerTiers: ConsumerTierState;
@@ -1,4 +1,4 @@
import type { DeveloperEcosystem } from '@ai-tycoon/shared';
import type { DeveloperEcosystem } from '@token-empire/shared';
import {
BASE_DEV_GROWTH,
FREE_TIER_DEV_MULTIPLIER,
@@ -9,8 +9,8 @@ import {
STARTUP_ADOPTION_PER_DEV,
ENTERPRISE_REFERRAL_PER_STARTUP,
TAM_BASE_SIZES,
} from '@ai-tycoon/shared';
import type { Era } from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { Era } from '@token-empire/shared';
export function processDeveloperEcosystem(
eco: DeveloperEcosystem,
@@ -6,7 +6,7 @@ import type {
EnterprisePipelineStage,
DeveloperEcosystem,
TierServingMetrics,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
BASE_LEAD_RATE,
LEAD_EXPIRY_TICKS,
@@ -19,7 +19,7 @@ import {
ENTERPRISE_CAPABILITY_REQUIREMENTS,
ENTERPRISE_TOKENS_PER_TICK,
ENTERPRISE_REJECTION_SLA_MULTIPLIER,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import { ENTERPRISE_NAMES } from '../../data/enterpriseNames';
let leadIdCounter = 0;
@@ -1,6 +1,6 @@
import type { GameState, MarketState, ModelCapabilities } from '@ai-tycoon/shared';
import { CONSUMER_TOKENS_PER_SUBSCRIBER, API_TOKENS_PER_DEVELOPER_PER_TICK, BATCH_API_DEMAND_PER_DEV, makeInitialServingMetrics } from '@ai-tycoon/shared';
import type { TrafficPriority, TierServingMetrics } from '@ai-tycoon/shared';
import type { GameState, MarketState, ModelCapabilities } from '@token-empire/shared';
import { CONSUMER_TOKENS_PER_SUBSCRIBER, API_TOKENS_PER_DEVELOPER_PER_TICK, BATCH_API_DEMAND_PER_DEV, makeInitialServingMetrics } from '@token-empire/shared';
import type { TrafficPriority, TierServingMetrics } from '@token-empire/shared';
import { computeSeasonal } from './seasonalSystem';
import { updateObsolescence } from './obsolescenceSystem';
import { buildPlayerProfile, buildCompetitorProfile, computeMarketShares, updateTAMGrowth } from './tamSystem';
@@ -1,10 +1,10 @@
import type { ObsolescenceState, Era } from '@ai-tycoon/shared';
import type { ObsolescenceState, Era } from '@token-empire/shared';
import {
OBSOLESCENCE_BASELINE_GROWTH,
OBSOLESCENCE_ERA_ACCELERATOR,
FRESHNESS_DECAY_RATE,
NEW_MODEL_BOOST_TICKS,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export function updateObsolescence(
obs: ObsolescenceState,
@@ -1,4 +1,4 @@
import type { CodeAssistantState, AgentsPlatformState, ModelCapabilities } from '@ai-tycoon/shared';
import type { CodeAssistantState, AgentsPlatformState, ModelCapabilities } from '@token-empire/shared';
import {
CODE_ASSISTANT_MIN_CODING_SCORE,
CODE_ASSISTANT_BASE_ADOPTION_RATE,
@@ -6,7 +6,7 @@ import {
AGENTS_PLATFORM_MIN_AGENTS_SCORE,
AGENTS_PLATFORM_BASE_ADOPTION_RATE,
AGENTS_PLATFORM_CHURN_RATE,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export interface ProductLineResult {
codeAssistant: CodeAssistantState;
@@ -1,5 +1,5 @@
import type { SeasonalPhase } from '@ai-tycoon/shared';
import { SEASONAL_CYCLE_TICKS, SEASONAL_MULTIPLIERS } from '@ai-tycoon/shared';
import type { SeasonalPhase } from '@token-empire/shared';
import { SEASONAL_CYCLE_TICKS, SEASONAL_MULTIPLIERS } from '@token-empire/shared';
export interface SeasonalResult {
phase: SeasonalPhase;
@@ -5,8 +5,8 @@ import type {
ServingMetrics,
ModelUtilizationEntry,
BatchApiState,
} from '@ai-tycoon/shared';
import type { BaseModel, ModelsState, SizeTier } from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { BaseModel, ModelsState, SizeTier } from '@token-empire/shared';
import {
MODEL_SIZE_THROUGHPUT_SCALER,
MOE_SPEED_MULTIPLIER,
@@ -18,8 +18,8 @@ import {
BASE_LATENCY_MS,
QUEUE_LATENCY_MS_PER_PERCENT,
BATCH_API_MAX_PENDING,
} from '@ai-tycoon/shared';
import { makeInitialServingMetrics } from '@ai-tycoon/shared';
} from '@token-empire/shared';
import { makeInitialServingMetrics } from '@token-empire/shared';
export interface ModelServingSlot {
modelId: string;
@@ -6,7 +6,7 @@ import type {
Era,
ObsolescenceState,
DeveloperEcosystem,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
TAM_BASE_SIZES,
TAM_GROWTH_PER_TICK,
@@ -17,7 +17,7 @@ import {
NEW_MODEL_BOOST_VALUE,
CONSUMER_TIER_BASE_PERCEIVED_VALUE,
PERCEIVED_VALUE_REPUTATION_RANGE,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
export interface ParticipantProfile {
id: string;
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
import { processMarketV2 } from './market/index';
import type { ResearchBonuses } from './researchBonuses';
@@ -10,7 +10,7 @@ import { processModels } from './modelSystem';
import {
POINT_RELEASE_CAPABILITY_GAIN,
VRAM_REQUIREMENTS_BY_GENERATION,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { ResearchBonuses } from './researchBonuses';
const rng = createSeededRNG(42);
@@ -2,7 +2,7 @@ import type {
GameState, ModelsState, BaseModel, ModelCapabilities, SafetyProfile,
TrainingPipeline, TrainingEvent, TrainingEventType,
ModelVariant, VariantCreationJob,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
uuid, VRAM_REQUIREMENTS_BY_GENERATION,
MOE_CAPABILITY_MULTIPLIER, MOE_SPEED_MULTIPLIER,
@@ -17,7 +17,7 @@ import {
POINT_RELEASE_CAPABILITY_GAIN,
SIZE_TIER_LABELS,
MODEL_BASE_SAFETY,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { ResearchBonuses } from './researchBonuses';
export interface ModelTickResult {
@@ -6,7 +6,7 @@ import {
LOW_SAFETY_THRESHOLD,
SAFETY_RECORD_RECOVERY_RATE,
SAFETY_INCIDENT_REPUTATION_HIT,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
const rng = createSeededRNG(42);
beforeEach(() => rng.install());
@@ -1,4 +1,4 @@
import type { GameState, ReputationState } from '@ai-tycoon/shared';
import type { GameState, ReputationState } from '@token-empire/shared';
import {
MAX_REPUTATION_HISTORY,
SAFETY_INCIDENT_PROBABILITY_BASE,
@@ -6,7 +6,7 @@ import {
LOW_SAFETY_THRESHOLD,
SAFETY_RECORD_RECOVERY_RATE,
PUBLIC_PERCEPTION_GROWTH_RATE,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import type { ResearchBonuses } from './researchBonuses';
export interface ReputationTickResult {
@@ -1,4 +1,4 @@
import type { GameState, ResearchState, ActiveResearch, ComputeState } from '@ai-tycoon/shared';
import type { GameState, ResearchState, ActiveResearch, ComputeState } from '@token-empire/shared';
import { TECH_TREE } from '../data/techTree';
export interface ResearchTickResult {
@@ -1,5 +1,5 @@
import type { GameState, TalentState } from '@ai-tycoon/shared';
import { ERA_BUDGET_COST_MULTIPLIER } from '@ai-tycoon/shared';
import type { GameState, TalentState } from '@token-empire/shared';
import { ERA_BUDGET_COST_MULTIPLIER } from '@token-empire/shared';
const SALARY_PER_HEADCOUNT_PER_TICK = 5;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GameState, AchievementDefinition } from '@ai-tycoon/shared';
import type { GameState, AchievementDefinition } from '@token-empire/shared';
import { processEconomy } from './systems/economySystem';
import { processInfrastructure } from './systems/infrastructureSystem';
import { computeCapacity, finalizeCompute } from './systems/computeSystem';
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "@ai-tycoon/tsconfig/base.json",
"extends": "@token-empire/tsconfig/base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
+4 -4
View File
@@ -1,5 +1,5 @@
{
"name": "@ai-tycoon/game-simulation",
"name": "@token-empire/game-simulation",
"private": true,
"version": "0.0.1",
"type": "module",
@@ -19,11 +19,11 @@
"test": "vitest run"
},
"dependencies": {
"@ai-tycoon/shared": "workspace:*",
"@ai-tycoon/game-engine": "workspace:*"
"@token-empire/shared": "workspace:*",
"@token-empire/game-engine": "workspace:*"
},
"devDependencies": {
"@ai-tycoon/tsconfig": "workspace:*",
"@token-empire/tsconfig": "workspace:*",
"@types/node": "^22.0.0",
"tsx": "^4.19.4",
"typescript": "^5.8.0"
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
export function acquireCompetitor(state: GameState, competitorId: string): boolean {
const rival = state.competitors.rivals.find(r => r.id === competitorId);
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GameState, OwnedDataset } from '@ai-tycoon/shared';
import type { GameState, OwnedDataset } from '@token-empire/shared';
export function purchaseDataset(state: GameState, dataset: OwnedDataset, cost: number): boolean {
if (state.economy.money < cost) return false;
@@ -1,6 +1,6 @@
import type { GameState, FundingRoundType } from '@ai-tycoon/shared';
import { FUNDING_ROUNDS } from '@ai-tycoon/shared';
import { canRaiseFunding, getNextFundingRound } from '@ai-tycoon/game-engine';
import type { GameState, FundingRoundType } from '@token-empire/shared';
import { FUNDING_ROUNDS } from '@token-empire/shared';
import { canRaiseFunding, getNextFundingRound } from '@token-empire/game-engine';
export function raiseFunding(state: GameState, roundType: FundingRoundType): boolean {
const config = FUNDING_ROUNDS[roundType];
@@ -2,7 +2,7 @@ import type {
GameState, Era, LocationId, DCTier, RackSkuId,
Cluster, Campus, DataCenter, DeploymentCohort,
CoolingType, NetworkFabric, PipelineStage,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
LOCATION_CONFIGS, DC_TIER_CONFIGS, RACK_SKU_CONFIGS,
CLUSTER_COST_CONFIG, CAMPUS_TIER_COSTS, FIRST_CAMPUS_BUILD_TICKS,
@@ -11,10 +11,10 @@ import {
FABRIC_ORDER, NETWORK_FABRIC_CONFIGS,
DC_UPGRADE_COST_FRACTION, DC_UPGRADE_INCREMENT,
estimateNetworkSlots, maxComputeRacks,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
emptyDCNetworkSummary, emptyCampusNetworkSummary, emptyClusterNetworkSummary,
} from '@ai-tycoon/game-engine';
} from '@token-empire/game-engine';
import { simId } from './ids';
const ERA_ORDER: Era[] = ['startup', 'scaleup', 'bigtech', 'agi'];
@@ -1,4 +1,4 @@
import type { GameState, ConsumerTierId, ApiTierId } from '@ai-tycoon/shared';
import type { GameState, ConsumerTierId, ApiTierId } from '@token-empire/shared';
export function setTrainingAllocation(state: GameState, ratio: number): void {
state.compute.trainingAllocation = ratio;
@@ -2,14 +2,14 @@ import type {
GameState, ModelFamily, TrainingPipeline, VariantCreationJob,
ModelArchitecture, DataMixAllocation, SFTSpecialization, AlignmentMethod, SizeTier,
QuantizationLevel,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
MAX_CONCURRENT_TRAINING, SIZE_TIER_MAP, SIZE_TIER_LABELS,
SFT_TIME_FRACTION, ALIGNMENT_TIME_FRACTION,
POINT_RELEASE_TIME_FRACTION, QUANTIZATION_TICKS,
OPEN_SOURCE_REPUTATION_BOOST,
} from '@ai-tycoon/shared';
import { onModelDeployed } from '@ai-tycoon/game-engine';
} from '@token-empire/shared';
import { onModelDeployed } from '@token-empire/game-engine';
import { simId } from './ids';
export interface TrainingConfig {
@@ -1,5 +1,5 @@
import type { GameState, ActiveResearch } from '@ai-tycoon/shared';
import { TECH_TREE } from '@ai-tycoon/game-engine';
import type { GameState, ActiveResearch } from '@token-empire/shared';
import { TECH_TREE } from '@token-empire/game-engine';
export function startResearch(state: GameState, research: ActiveResearch): boolean {
const node = TECH_TREE.find(n => n.id === research.researchId);
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
export type DepartmentId = 'research' | 'engineering' | 'operations' | 'sales';
@@ -1,5 +1,5 @@
import type { SimulationMetrics } from '../strategies/types';
import type { TickNotification } from '@ai-tycoon/game-engine';
import type { TickNotification } from '@token-empire/game-engine';
export interface RevenueBreakpoint {
tick: number;
@@ -1,5 +1,5 @@
import type { GameState, RackSkuId } from '@ai-tycoon/shared';
import { RACK_SKU_CONFIGS } from '@ai-tycoon/shared';
import type { GameState, RackSkuId } from '@token-empire/shared';
import { RACK_SKU_CONFIGS } from '@token-empire/shared';
import type { SimulationMetrics } from '../strategies/types';
export interface DeadZone {
@@ -1,5 +1,5 @@
import type { SimulationMetrics } from '../strategies/types';
import { ERA_THRESHOLDS } from '@ai-tycoon/shared';
import { ERA_THRESHOLDS } from '@token-empire/shared';
const ERA_ORDER = ['startup', 'scaleup', 'bigtech', 'agi'] as const;
@@ -1,6 +1,6 @@
import type { GameState } from '@ai-tycoon/shared';
import { RACK_SKU_CONFIGS, FUNDING_ROUNDS } from '@ai-tycoon/shared';
import { TECH_TREE } from '@ai-tycoon/game-engine';
import type { GameState } from '@token-empire/shared';
import { RACK_SKU_CONFIGS, FUNDING_ROUNDS } from '@token-empire/shared';
import { TECH_TREE } from '@token-empire/game-engine';
export interface FeatureUsage {
name: string;
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
import type { SimulationMetrics } from '../strategies/types';
export function collectMetrics(state: GameState): SimulationMetrics {
@@ -1,5 +1,5 @@
import type { SimulationMetrics } from '../strategies/types';
import type { TickNotification } from '@ai-tycoon/game-engine';
import type { TickNotification } from '@token-empire/game-engine';
export interface Milestone {
name: string;
@@ -100,7 +100,7 @@ export function printConsoleReport(result: SimulationResult, config: SimulationC
const perEraSummary = buildPerEraSummary(result, eraProximity);
console.log('');
console.log('=== AI Tycoon Balance Simulation ===');
console.log('=== Token Empire Balance Simulation ===');
console.log(`Strategy: ${config.strategy.name} | Ticks: ${config.totalTicks.toLocaleString()} | Decision interval: ${config.decisionInterval}`);
console.log(`Wall time: ${(result.wallTimeMs / 1000).toFixed(1)}s${config.seed !== undefined ? ` | Seed: ${config.seed}` : ''}`);
console.log('');
@@ -1,5 +1,5 @@
import type { SimulationMetrics } from '../strategies/types';
import { ERA_THRESHOLDS } from '@ai-tycoon/shared';
import { ERA_THRESHOLDS } from '@token-empire/shared';
export type SanityCheckSeverity = 'error' | 'warning';
@@ -1,5 +1,5 @@
import type { SimulationMetrics } from '../strategies/types';
import type { TickNotification } from '@ai-tycoon/game-engine';
import type { TickNotification } from '@token-empire/game-engine';
export interface SystemConnection {
from: string;
+3 -3
View File
@@ -1,12 +1,12 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
import {
INITIAL_SETTINGS, SAVE_VERSION,
INITIAL_ECONOMY, INITIAL_INFRASTRUCTURE, INITIAL_COMPUTE,
INITIAL_RESEARCH, INITIAL_MODELS, INITIAL_MARKET,
INITIAL_TALENT, INITIAL_DATA,
INITIAL_REPUTATION, INITIAL_ACHIEVEMENTS,
} from '@ai-tycoon/shared';
import { INITIAL_RIVALS } from '@ai-tycoon/game-engine';
} from '@token-empire/shared';
import { INITIAL_RIVALS } from '@token-empire/game-engine';
export function createInitialState(companyName = 'SimCorp'): GameState {
return {
+3 -3
View File
@@ -1,6 +1,6 @@
import type { GameState } from '@ai-tycoon/shared';
import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, resetResearchBonusCache, resetFleetCache } from '@ai-tycoon/game-engine';
import type { TickNotification } from '@ai-tycoon/game-engine';
import type { GameState } from '@token-empire/shared';
import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, resetResearchBonusCache, resetFleetCache } from '@token-empire/game-engine';
import type { TickNotification } from '@token-empire/game-engine';
import type { Strategy, SimulationMetrics } from './strategies/types';
import { collectMetrics } from './analysis/metrics';
import { createInitialState } from './initialState';
@@ -1,14 +1,14 @@
import type { GameState, Era, RackSkuId } from '@ai-tycoon/shared';
import type { GameState, Era, RackSkuId } from '@token-empire/shared';
import {
RACK_SKU_CONFIGS, DC_TIER_CONFIGS, COOLING_ORDER,
PARAMETER_OPTIONS, DEFAULT_DATA_MIX,
MAX_CONCURRENT_TRAINING, PRETRAINING_BASE_TICKS,
CLUSTER_COST_CONFIG, LOCATION_CONFIGS, maxComputeRacks,
VRAM_REQUIREMENTS_BY_GENERATION,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
canRaiseFunding, getNextFundingRound, getAvailableResearch, TECH_TREE,
} from '@ai-tycoon/game-engine';
} from '@token-empire/game-engine';
import * as actions from '../actions';
import type { Strategy, SimulationMetrics } from './types';
@@ -1,14 +1,14 @@
import type { GameState, Era, RackSkuId } from '@ai-tycoon/shared';
import type { GameState, Era, RackSkuId } from '@token-empire/shared';
import {
RACK_SKU_CONFIGS, DC_TIER_CONFIGS, COOLING_ORDER,
PARAMETER_OPTIONS, DEFAULT_DATA_MIX,
MAX_CONCURRENT_TRAINING, PRETRAINING_BASE_TICKS,
CLUSTER_COST_CONFIG, LOCATION_CONFIGS, maxComputeRacks,
VRAM_REQUIREMENTS_BY_GENERATION,
} from '@ai-tycoon/shared';
} from '@token-empire/shared';
import {
canRaiseFunding, getNextFundingRound, getAvailableResearch, TECH_TREE,
} from '@ai-tycoon/game-engine';
} from '@token-empire/game-engine';
import * as actions from '../actions';
import type { Strategy, SimulationMetrics } from './types';
@@ -1,6 +1,6 @@
import type { GameState } from '@ai-tycoon/shared';
import { RACK_SKU_CONFIGS, DEFAULT_DATA_MIX, PARAMETER_OPTIONS } from '@ai-tycoon/shared';
import { canRaiseFunding, getNextFundingRound, getAvailableResearch } from '@ai-tycoon/game-engine';
import type { GameState } from '@token-empire/shared';
import { RACK_SKU_CONFIGS, DEFAULT_DATA_MIX, PARAMETER_OPTIONS } from '@token-empire/shared';
import { canRaiseFunding, getNextFundingRound, getAvailableResearch } from '@token-empire/game-engine';
import * as actions from '../actions';
import type { Strategy, SimulationMetrics } from './types';
@@ -1,4 +1,4 @@
import type { GameState } from '@ai-tycoon/shared';
import type { GameState } from '@token-empire/shared';
export interface SimulationMetrics {
tick: number;
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "@ai-tycoon/tsconfig/node.json",
"extends": "@token-empire/tsconfig/node.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
+2 -2
View File
@@ -1,5 +1,5 @@
{
"name": "@ai-tycoon/shared",
"name": "@token-empire/shared",
"private": true,
"version": "0.0.1",
"type": "module",
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"devDependencies": {
"@ai-tycoon/tsconfig": "workspace:*",
"@token-empire/tsconfig": "workspace:*",
"typescript": "^5.8.0"
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "@ai-tycoon/tsconfig/base.json",
"extends": "@token-empire/tsconfig/base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "@ai-tycoon/tsconfig",
"name": "@token-empire/tsconfig",
"private": true,
"files": ["base.json", "react.json", "node.json"]
}