Tune Enemy AI Make enemy choices legible, bounded, and reproducible. Model decisions explicitly Use a small state machine or utility layer with named states such as idle, investigate, pursue, reposition, windup, attack, recover, stagger, retreat, and defeated. State transitions must state their prerequisites, exit conditions, minimum dwell time, and cooldown effects. Separate perception, intent, and motion 1. Gather observable inputs: distance, line of sight, target state, occupancy, threat, health, and timers. 2. Select one intention from constrained legal actions. 3. Move and animate toward…