AI Command Lab // Flight Simulator
304C: Utility Theory
Initial AI Output (Fragile)
// AI-Generated Code: Rigid If-Else if (health < 30) Heal(); else if (canSeePlayer) Shoot(); // Audit Fail: What if health is 29 but the enemy is 1 HP away from dying? // The AI will stupidly heal instead of finishing the fight.
Initial AI Prompt
"You ask the AI: "Decide whether to heal or shoot.""
Pilot Comm Link
Mission Objective: A skilled Navigator directs the AI to use Scoring.
Optimized Protocol
// Corrected: Fuzzy Logic float healScore = (1 - healthPct) * 0.8f; float killScore = (1 - enemyHealthPct) * 1.2f; if (killScore > healScore) Shoot(); else Heal();