The intelligence behind the NPCs in GTA VI.

In recent years, generative models and virtual assistants have popularized artificial intelligence and transformed our relationship with technology.


But does everything that appears intelligent actually utilize artificial intelligence? And what distinguishes a "decision" from a pre-programmed sequence of instructions?


In video games, this discussion takes on an interesting dimension. Non-playable characters (NPCs) walk through cities, go to work, interact with the player, and react to events. In open-world games like GTA VI, these interactions make the environment feel alive, even when the player isn't directly involved.


But how does a virtual character decide what to do? Is it truly "thinking," or is it simply executing a set of conditions and instructions that mimic behaviors associated with intelligence?

Ultimately, when are we actually dealing with artificial intelligence?

Imagine a character walking along a sidewalk. Upon noticing a weapon pointed in their direction, they begin to run. If they encounter an obstacle, they look for another path. Once they reach a safe location, they resume their previous activity. To the player, it appears as though the character perceived a threat and chose to flee. Technically, however, this may simply be the result of defined states, transition conditions, and programmed functions. There is no inherent learning or genuine understanding of the situation—only a pre-programmed logic designed to respond to specific conditions.


In the gaming industry, "Game AI" encompasses various techniques for controlling characters and environments—such as Finite State Machines (FSMs), decision trees, behavior trees, and navigation algorithms. These methods can produce convincing behaviors without the need for neural networks or generative models.


This raises a compelling question: At what point does a programmed instruction begin to represent intelligence? If an NPC flees because a specific condition has been met, have they made a "decision," or have they merely executed a rule? Perhaps the point isn't whether these characters think like humans, but rather how we construct systems that appear intelligent.


Finite State Machines: How NPCs shift their behavior. A Finite State Machine (FSM) organizes a system into a limited set of states and the rules that govern the transitions between them.


An NPC might have states such as those described below:


Idle: Stationary or waiting for an activity.

Walking: Moving about.

Working: Performing a specific task.

Alert: Having noticed something unusual.

Fleeing: Escaping from a threat.

Fighting: Engaged in combat.

When a specific condition is met, the character shifts from one state to another. For instance, if a character is walking and detects a threat, it might transition from the "Walking" state to the "Fleeing" state. FSMs offer predictability, as states, transitions, and behaviors are all explicitly defined. However, certain scenarios can lead to a proliferation of states and transitions, making the system difficult to maintain—a phenomenon known as "state explosion."


Decision Trees: How a system determines its course of action.

While an FSM organizes states and transitions, a decision tree structures conditions and outcomes hierarchically. The system evaluates a condition and follows a specific path until an action is selected. In the case of a police officer, for example, the system might check whether a crime was witnessed, if a suspect has been identified, and whether the conditions are right to initiate a pursuit. Also used in classification and machine learning, decision trees can be constructed manually or learned from data. Thus, while a decision tree can be a component of an AI system, not every decision tree represents machine learning.


GTA V: Understanding intelligence in practice.

A well-known example from Grand Theft Auto V is its police pursuit system.


Imagine you cause an accident in Los Santos and a police officer witnesses the event. The officer might identify the incident, initiate a pursuit, and attempt to keep up with your vehicle. If you change direction or move out of the officer's field of view, the situation may shift—the pursuit might end, or the officers might continue searching for the suspect. Behavior combines the interpretation of events, decision-making, and execution—such as movement, navigation, driving, and animations. The player does not need to know the rules; they only perceive their consequences. The integration between systems makes the programmed behavior appear natural.


This representation is a didactic model of Game AI, not a confirmed description of the source code or the internal architecture used by Rockstar in GTA V.