HomeGame DevelopmentUtility AI Decision Engine — NPC Behavior Simulator

Utility AI Decision Engine — NPC Behavior Simulator

Interactive 3D utility AI simulator: a crowd of NPCs score Forage, Rest, Flee and Wander every tick using curve-based need functions and pick the highest-scoring action, the same decision architecture used for NPC brains in The Sims and XCOM.

Game Development3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
ai-topic-63 ↗ Open standalone

Game NPCs rarely run a fixed script — most modern games score every candidate action every tick using curve-shaped need functions and simply execute whichever action wins, a decision architecture called Utility AI. This simulator renders a crowd of NPCs on a 3D map, each independently scoring Forage, Rest, Flee and Wander against its own rising hunger and fatigue, a nearby patrolling threat, and live proximity to food nodes and a rest zone. Tune the need response curve, threat sensitivity and decision noise and watch the population's behavior mix shift in real time, with live readouts for average need levels, meals eaten and the current action distribution.

⚙ Under the hood

Interactive 3D utility AI simulator: a crowd of NPCs score Forage, Rest, Flee and Wander every tick using curve-based need functions and pick the highest-scoring action, the same decision architecture used for NPC brains in games like The Sims and XCOM.

game AIutility AINPC behaviordecision makinggamedevalgorithms

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)