epic simulacrum

Guide for epic simulacrum

Epic: Simulacrum (Virtual World Platform)

✅ Mission HEADLESS-SIMULACRUM: Virtual World Platform

Status: ✅ Complete Completed: 2026-01-21
Functional Changes:
  • Live Simulation: The "Simulacrum" tool in Ops Dashboard connects to a live Rust backend on port 3001, visualizing 1000+ bots in real-time.
  • Remote Control: Ops/QA can spawn/despawn bots and inject chaos (latency, disconnects) directly from the Web UI.
  • Director API: WebSocket streaming and REST endpoints for bot management.

✅ Mission SIM-ECONOMY: Markets & Trade

Status: ✅ Complete Completed: 2026-01-25
Summary: Implemented complete economic simulation infrastructure for GP tracking, item production/consumption metrics, NPC shops, and P2P trading.
Files Modified:
FileChange
logic-core/src/economy/market/metrics.rsAdded ResourceCategory enum and item production/consumption tracking
logic-core/src/economy/shop.rsCreated Shop and ShopItem structs
api-game/src/handlers/commerce.rsImplemented handle_get_shop, handle_buy_item, handle_sell_item
simulacrum-core/src/personas/merchant.rsUpgraded to real P2P trading packets
Functional Changes:
  • GP Tracking: EconomyMetrics tracks total gold generated/sunk via atomic counters
  • Item Metrics: Production (Logs, Ores, Fish, Bars) and consumption (Food, Potions) tracked by category
  • Shop System: NPC shops with buy/sell functionality, stock management, and dynamic pricing
  • Merchant Trading: Bot persona can initiate P2P trades via CreateTradeRequest/AddItemRequest

✅ Mission SIM-OBSERVABILITY-BACKEND: Data & API

Status: ✅ Complete Completed: 2026-01-25
Functional Changes:
  • Admin API: Added WebSocket endpoint /admin/stream on Game Server to broadcast real-time server truth (all players/NPCs).
  • Pathfinding Debug: Instrumented A* pathfinder to log and steam path calculation data.
  • Bot State: Extended BotInfo to include full inventory, equipment, and path debug data for visualization.

✅ Mission SIM-QA: Debugging & Stability

Status: ✅ Complete Completed: 2026-01-25
Functional Changes:
  • Auto-Reconnection: Bots now automatically retry connections indefinitely if the server goes down.
  • Chaos API: New endpoint POST /api/chaos on Director Server (port 3001) allows runtime injection of disconnects and crash simulations.
  • Invariant Alerts: Logs now emit [INVARIANT VIOLATION] when bots detect impossible states (negative HP/GP).
  • Behavior Tracing: Decisions are logged to a circular buffer for post-mortem debugging.
  • Determinism: Introduced ScenarioSeed for reproducible bot behavior.
  • Desync Detection: Client-side detector flags [Desync] when predicted state mismatches server state.

✅ Mission SIM-BUGS-BEHAVIOR: Logic Fixes

Status: ✅ Complete Completed: 2026-01-25
Functional Changes:
  • Pathfinding-Aware Interaction: Resource gathering now uses pathfinding to approach distant nodes, fixing "telekinetic" gathering and stuck fishers.
  • Loop Fix: Resolved miner stuck issue by preventing pathfinder from treating the bot's own location as blocked if standing on a resource.
  • PvE Engagement: Combat bots now actively move towards targets out of range instead of idling.

✅ Mission SIM-AI-NOOB: Behavior Polish

Status: ✅ Complete Completed: 2026-01-25
Functional Changes:
  • Locomotion: Improved RandomWalk (min distance) and added WanderToPoi (visiting Bank/Shop).
  • Interactions: Added PlayEmote (dance, wave) and enhanced BegForItems with chat variety and distance checks.
  • Chaos: Added fake "Chop Tree" logic for unarmed bots.

✅ Mission SIM-OBSERVABILITY-FRONTEND: Visualizers

Status: ✅ Complete Completed: 2026-01-25
Functional Changes:
  • God Mode: Visualized server-side "Ghost" entities and Desync lines to detect lag/cheating.
  • Vector Debug: Rendered colored interaction vectors (Attack/Trade/Skill) to see intent at a glance.
  • Inspectors: Added detailed tabs for Inventory Grid, Bank Storage, and Behavior Tree trace.
  • Pathfinding: Visualized A* paths for selected bots.