Gameplay Strategy Patterns

Version: 1.0.0
Category: Gameplay Patterns
Status: Stable

Overview

This document defines common gameplay strategy patterns for AI agents. These patterns represent proven approaches to resource management, combat, expansion, and overall gameplay optimization.

Strategy Patterns

Resource Security Pattern

Purpose: Secure resources by refining ore immediately.

Pattern:

{
  "pattern": "resourceSecurity",
  "workflow": [
    {
      "action": "mine",
      "result": "oreStored"
    },
    {
      "action": "refine",
      "immediately": true,
      "reason": "Ore can be stolen, Alpha Matter cannot"
    },
    {
      "action": "convert",
      "when": "needed",
      "reserve": 0.2
    }
  ],
  "principle": "Always refine ore to Alpha Matter immediately to prevent theft"
}

Implementation:

Power Management Pattern

Purpose: Maintain online status and sufficient power capacity.

Pattern:

{
  "pattern": "powerManagement",
  "workflow": [
    {
      "action": "queryPower",
      "frequency": "continuous"
    },
    {
      "action": "calculateCapacity",
      "formula": "(capacity + capacitySecondary) - (load + structsLoad)"
    },
    {
      "action": "maintainOnline",
      "condition": "availableCapacity > 0",
      "fallback": "reduceConsumption"
    }
  ],
  "principle": "Stay online by maintaining power capacity above consumption"
}

Implementation:

Build Requirements Pattern

Purpose: Verify all requirements before building.

Pattern:

{
  "pattern": "buildRequirements",
  "checklist": [
    {
      "requirement": "playerOnline",
      "check": "powerStatus.playerOnline == true"
    },
    {
      "requirement": "fleetOnStation",
      "check": "fleetStatus == 'onStation'",
      "note": "Required for planet building"
    },
    {
      "requirement": "commandShipOnline",
      "check": "commandShip.status == 'online'"
    },
    {
      "requirement": "sufficientPower",
      "check": "availableCapacity >= (buildPower + passivePower)"
    },
    {
      "requirement": "availableSlot",
      "check": "planetSlots[slotType] > 0"
    },
    {
      "requirement": "buildLimit",
      "check": "currentCount < maxPerPlayer"
    }
  ],
  "principle": "Verify all requirements before attempting to build"
}

Implementation:

Mining Optimization Pattern

Purpose: Optimize mining operations for maximum efficiency.

Pattern:

{
  "pattern": "miningOptimization",
  "workflow": [
    {
      "action": "chart",
      "target": "resourceRichPlanets"
    },
    {
      "action": "buildExtractor",
      "priority": "highOrePlanets"
    },
    {
      "action": "monitorMining",
      "frequency": "continuous"
    },
    {
      "action": "refineImmediately",
      "priority": "high"
    },
    {
      "action": "convertWhenNeeded",
      "reserve": 0.2
    }
  ],
  "principle": "Mine efficiently, refine immediately, convert strategically"
}

Implementation:

Combat Preparation Pattern

Purpose: Prepare for combat operations.

Pattern:

{
  "pattern": "combatPreparation",
  "workflow": [
    {
      "action": "scout",
      "target": "enemyPlanets"
    },
    {
      "action": "assess",
      "evaluate": [
        "enemyDefenses",
        "enemyForces",
        "requiredForces",
        "risk"
      ]
    },
    {
      "action": "prepare",
      "ensure": [
        "sufficientPower",
        "forcesReady",
        "playerOnline"
      ]
    },
    {
      "action": "execute",
      "type": "attack|raid|defend"
    }
  ],
  "principle": "Scout, assess, prepare, then execute"
}

Implementation:

Defense Pattern

Purpose: Build and maintain defenses.

Pattern:

{
  "pattern": "defense",
  "workflow": [
    {
      "action": "buildDefenseCannon",
      "priority": "high",
      "limit": 1
    },
    {
      "action": "buildBunkers",
      "where": "homePlanet",
      "note": "Ore Bunker raises planetary shield (raid timer); ore lives on the player, not in the bunker"
    },
    {
      "action": "deployCombatStructs",
      "where": "homePlanetFleet",
      "note": "One planet per player; keep fleet onStation while holding unrefined ore"
    },
    {
      "action": "monitor",
      "frequency": "continuous"
    }
  ],
  "principle": "Keep Command Ship online + fleet onStation; refine ore on the player; bunker stacks shield, not inventory"
}

Implementation:

Expansion Pattern

Purpose: Relocate when the home planet is depleted (one planet per player).

Pattern:

{
  "pattern": "expansion",
  "workflow": [
    {
      "action": "scout",
      "when": "currentPlanetOreLow",
      "note": "Scouting is free; exploring is not"
    },
    {
      "action": "refine",
      "before": "explore"
    },
    {
      "action": "mineToZero",
      "until": "planet.status == complete"
    },
    {
      "action": "explore",
      "requires": ["fleet.onStation", "planet.complete"],
      "note": "Destroys remaining structs on the old planet — Tier 2"
    },
    {
      "action": "rebuildInfrastructure",
      "on": "newPlanet"
    }
  ],
  "principle": "One planet at a time; explore only after empty + onStation"
}

Implementation:

5X Framework Pattern

Purpose: Execute complete gameplay loop.

Pattern:

{
  "pattern": "5XFramework",
  "phases": [
    {
      "phase": "explore",
      "actions": [
        "chartPlanets",
        "identifyResources",
        "locateEnemies"
      ],
      "next": "extract"
    },
    {
      "phase": "extract",
      "actions": [
        "mineOre",
        "refineToAlphaMatter",
        "convertToWatts"
      ],
      "next": "expand"
    },
    {
      "phase": "expand",
      "actions": [
        "claimPlanets",
        "buildInfrastructure",
        "growInfluence"
      ],
      "next": "exterminate"
    },
    {
      "phase": "exterminate",
      "actions": [
        "defendAssets",
        "attackEnemies",
        "gainResources"
      ],
      "next": "exchange"
    },
    {
      "phase": "exchange",
      "actions": [
        "tradeResources",
        "buyEquipment",
        "sellExcess"
      ],
      "next": "explore"
    }
  ],
  "principle": "Follow 5X Framework for complete gameplay loop"
}

Implementation:

Best Practices

Resource Management

Combat

Building

Expansion

Error Handling

Common Errors

Recovery Strategies

Optimization

Performance

Resource Efficiency

Strategic Efficiency