MOO1 Opening Optimizer

Turn-level economic simulator for Master of Orion 1 opening theory. Answers: when should you build the 2nd colony ship?

Links: MIRR — 4X Framework (the thesis this project tests), MIRR Analysis (this project’s mirr.py write-up), MOO1 Optimal Strategy, BattleValue, Gaming, Risk and Entrepreneurship, BattleTech Simulator

Code: https://github.com/chrisaacson69/moo1-opening-optimizer

Motivation

The MOO1 strategy analysis identifies the 2nd colony ship timing as the first big strategic decision — and shows it’s a tractable optimization problem. The conventional wisdom (“build 100 factories first, then colonize”) is likely wrong for long-horizon games, but proving it requires simulation because the variables interact:

The analytical framework in the strategy doc gets the direction right (colonies compound, factories don’t, so colonize early), but can’t give precise answers across the full parameter space. Simulation can.

Approach

Phase 1: Single-Planet Economic Engine

Model a single MOO1 planet’s turn-by-turn economics:

class Planet:
    pop: float           # current population (fractional, rounded for display)
    max_pop: int         # planet capacity
    factories: int       # built factories
    mineral: str         # ultra-poor | poor | normal | rich | ultra-rich

    def production(self, race) -> float:
        worker_out = pop * race.worker_output
        factory_out = min(factories, pop * race.factory_controls) * mineral_modifier
        return worker_out + factory_out

    def grow(self, eco_spending) -> None:
        # discrete logistic: ΔP = 0.1 * P * (1 - P/C) + excess_eco/20
        ...

    def build_factories(self, production_allocated) -> None:
        # factories += production_allocated / (10 / mineral_modifier)
        ...

Core formulas from game data:

Mechanic Formula
Worker output 0.5 + (planetology_level × 1.5 / 50) per colonist (×2 for Klackon)
Factory output 1.0 per manned factory × mineral modifier
Factory controls 2 per colonist (+2 for Meklar, scales with Robotics tech)
Mineral modifier ultra-poor: 1/3, poor: 1/2, normal: 1, rich: 2, ultra-rich: 3
Pop growth 0.1 × P × (1 - P/C) + (eco_spend - waste_cleanup) / 20
Waste cleanup factories × 0.5 BC (improves with planetology tech)
Factory cost 10 / mineral_modifier BC
Colonist cost 20 BC (via eco spending)
Colony ship cost ~590 BC
Fleet maintenance proportional to fleet_value / total_empire_production

Phase 2: Two-Planet Simulator

Model the homeworld + one colony, with a colony ship build decision at turn T:

for colony_ship_start in range(1, 30):
    simulate 100 turns:
        - homeworld builds factories until turn colony_ship_start
        - homeworld builds colony ship (590 BC / production_rate = N turns)
        - colony ship transits (distance / speed turns)
        - colonist(s) deducted from homeworld pop
        - new colony starts growing
    record: total_empire_production at turn 50, 75, 100

Sweep across planet quality, distance, race, and seed population. Output: optimal colony_ship_start as a function of (quality, distance, race).

Phase 3: Decision Guidelines

Distill simulation results into actionable rules:

Phase 4 (Stretch): Multi-Colony Optimization

Extend to the full opening: when to build the 2nd, 3rd, 4th colony ships. When to start sending transports. When to switch from expansion to consolidation. This is where the DP approach from the strategy doc would apply — the state space grows but is still tractable with pruning.

Phase 5 (Stretch): Military Pressure & Adaptive Strategy

Phases 1–4 assume you’re expanding in a vacuum. Real games break that assumption fast — map generation is highly random, and you might find Bulrathi two parsecs away instead of open space. The interesting question shifts from “what’s the optimal expansion rate?” to “when do you abandon the optimal expansion rate?”

The expansion rate is the initial interest rate of the game. Every turn you spend building military instead of colony ships or factories, you’re paying a premium on an insurance policy against losing everything. The ROI of a missile base is zero in a peaceful game and infinite when the Bulrathi show up on turn 15.

This creates a decision boundary problem:

Technical Notes

Connections

This is the same class of problem as BattleTech Simulator — both use simulation to answer questions that are analytically intractable due to interacting variables. The difference: BattleTech simulates combat (stochastic, high-dimensional), this simulates economics (deterministic given a strategy, lower-dimensional). This one is simpler and could serve as a warm-up.

The underlying economic reasoning — compound returns vs. linear returns, opportunity cost, investment timing — comes directly from Risk and Entrepreneurship and Value and Profit. The simulator is those frameworks made executable.

Open Questions

Tags

games, game-theory, economics, strategy, python, simulation