Game dev
Saved & recent

Utility AI

Related terms: utility system, scoring, considerations

Every action the character could take gets a score for how useful it is right now, and the character does the highest one. Scores come from simple curves: low health pushes "heal" up, a close enemy and a full magazine push "attack" up.

Adding a behavior means adding one more scorer, not rewiring a tree. The result feels fluid and reacts to many factors at once. It is also harder to predict and debug.

Further reading
David “Rez” Graham: An Introduction to Utility Theory
rover readings condition 0.24 energy 0.60 travel cost 0.77 repair 0.76 scout 0.42 gather 0.14 rest 0.40 0 1 action score
Condition, energy and travel cost feed four scoring rules. At these readings, repair has the highest score.

View in the full Game dev collection