Μετάβαση στο περιεχόμενο
ΠΑΙΧΝΙΔΙΑ · ΚΡΙΤΙΚΕΣ · ΒΑΣΗ ΔΕΔΟΜΕΝΩΝ
Φόρουμ

Utility AI vs. Behavior Trees: How Scoring Replaces Hand-Authored Priorities

Scoring behaviors instead of sequencing them In video game AI, a utility system, or utility AI, is described as "a simple but effective way to model...

Δημοσιεύτηκε:
🌐
Εμφανίζεται η αρχική γλώσσα

Αυτό το άρθρο δεν έχει μεταφραστεί ακόμα στα ελληνικά. Βλέπετε την αρχική έκδοση.

Scoring behaviors instead of sequencing them

In video game AI, a utility system, or utility AI, is described as “a simple but effective way to model behaviors for non-player characters.” The approach uses “numbers, formulas, and scores to rate the relative benefit of possible actions,” assigning a utility to each one. A behavior is then selected either by picking the one that scores the highest utility or by using those scores to seed a probability distribution for weighted random selection. The character is thus choosing the “best” behavior for the current situation based on how behaviors are defined mathematically.

The concept of utility has existed for centuries, primarily in mathematically dependent fields such as economics, but has also appeared in psychology, sociology, and biology. This background, combined with the need to convert things into math for programming, made it “something that came naturally as a way of designing and expressing behaviors for game characters.”

Choose Gamer24H as a preferred source on Google

The priority-handoff advantage

The source notes that “different AI architectures have their various pros and cons,” and identifies one benefit of utility AI: it is “less ‘hand-authored’ than many other types of game AI architectures.” While behaviors in a utility system are often created individually and by hand, “the interactions and priorities between them are not inherently specified.”

By contrast, behavior trees (BTs) “require the designer to specify priorities in sequence to check if something should be done.” Only if a behavior—or tree branch—is NOT executed will the system fall through to check the next one. In utility systems, behaviors instead “sort themselves out by priority based on the scores generated by any mathematical modeling that defines every given behavior.” The developer is therefore not required to determine exactly where a new behavior “fits” among potentially thousands of behavior nodes in a BT; the focus is on defining why a single behavior would be beneficial, i.e., its utility.

Historical grounding

Numbers, formulas, and scores have been used for decades in games to define behavior, with even simple percentage-based chances (such as a “12% chance to perform Action X”) serving as an early step. Only in the early 21st century did the method begin taking on the formalized approach now commonly called “utility AI.”

In The Sims (2000), an NPC’s current “need” (for rest, food, or social activity) was combined with a score from an object or activity that could satisfy that need, giving the action a score that told the Sim what to do. This was “one of the first visible uses of utility AI in a game” and served as the core gameplay mechanism.

In The Sims 3 (2009), Richard Evans used a modified Boltzmann distribution to choose actions, with a temperature that is low when the Sim is happy and high when the Sim is doing badly, making it more likely that a low-utility action is chosen. Personalities were incorporated to create a “3-axis model” extending numeric needs and satisfaction values into preferences, so that different NPCs might react differently in the same circumstances.

Formalization and hybridization

Dave Mark’s book, Behavioral Mathematics for Game AI, detailed thinking about behavior in mathematical terms, including response curves that convert changing input variables into output variables. Mark and Kevin Dill gave early lectures on utility theory at the AI Summit during the annual Game Developers Conference (GDC) in San Francisco, including “Improving AI Decision Modeling Through Utility Theory” in 2010 and “Embracing the Σκούρο Art of Mathematical Modeling in AI” in 2012. These lectures helped establish utility AI as a commonly-referred-to architecture alongside finite state machines (FSMs), behavior trees, and planners.

Mark and ArenaNet co-worker Mike Lewis later lectured at the 2015 GDC about the Infinite Axis Utility System (IAUS), a data-driven, self-contained architecture that, once connected to the game system’s inputs and outputs, required little programming support. This made it similar to behavior trees and planners, where the reasoner is fully established and the team adds behaviors as needed.

Utility calculations have also been integrated into existing architectures rather than used standalone. Bill Merrill wrote a segment in Game AI Pro entitled “Building Utility Decisions into Your Existing Behavior Tree,” showing how to re-purpose selectors in BTs to use utility-based math, creating a hybrid that preserved much of the formal structure of behavior trees while gaining utility’s “non-brittle advantages.” In another approach, a study applied a Utility System to calculate utility values of high-level strategic orders in a team-based tactical game, while Monte Carlo Tree Αναζήτηση (MCTS) executed those orders at the tactical level.

This explanation is adapted from Wikipedia and is available under CC BY-SA 4.0.

Related Article: Navigation Meshes: How Convex Polygons Simplify Pathfinding in Game AI →
Source: Vikipedi (Wikipedia) ↗
Ρωτήστε / συζητήστε στο φόρουμ
ΚΟΙΝΟΤΗΤΑ / ΣΥΖΗΤΗΣΗ

1 comment

Μοιραστείτε τις σκέψεις σας

Αναζήτηση στο Gamer24H

Εισαγάγετε τουλάχιστον 3 χαρακτήρες.

Εξερεύνηση

ΕΜΦΑΝΙΣΗ

Επιλέξτε το θέμα χρώματος

Αυτόματο mode follows your device and switches to Xbox, PlayStation, or Nintendo colors on matching stories. Your manual choice stays on this device.

🌍 ΕΠΙΛΟΓΗ ΓΛΩΣΣΑΣ 25 Γλώσσες
🔍