Complete Technical Paper Content — Npc Behavior Ai
1. Executive Abstract, Problem Formulation & Background
Artificial intelligence (AI) in video games refers to the computational systems that control non-player characters (NPCs), generate dynamic game behavior, or simulate strategic decision-making. In practice, the term covers a broad range of techniques drawn from computer science, control theory, and robotics rather than "true" artificial intelligence. Moreover, academic AI—aimed at developing autonomous reasoning or learning—is distinct from game AI, whose goal is to deliver engaging, believable, and efficient behavior for players. The term CPU (central processing unit) in video games refers to the AI that control an NPC that could be a playable character in some other situations. In general, game AI does not, as might be thought and sometimes is depicted to be the case, mean a realization of an artificial person corresponding to an NPC in the manner of the Turing test or an artificial general intelligence (AGI).
It was during the golden age of video arcade games that the idea of AI opponents was largely popularized, due to the success of Space Invaders (1978), which sported an increasing difficulty level, distinct movement patterns, and in-game events dependent on hash functions based on the player's input. Galaxian (1979) added more complex and varied enemy movements, including maneuvers by individual enemies who break out of formation. Pac-Man (1980) introduced AI patterns to maze games, with the added quirk of different personalities for each enemy. The ghosts also alternate between a "chase" mode, in which each pursues the player using its own targeting behavior, and a "scatter" mode, in which they retreat to their own corners of the maze, giving the player a short respite from the pursuit. Karate Champ (1984) later introduced AI patterns to fighting games. First Queen (1988) was a tactical action RPG (role-playing game) which featured characters that can be controlled by the computer's AI in following the leader. The RPG Dragon Quest IV (1990) introduced a "Tactics" system, where the user can adjust the AI routines of non-player characters during battle, a concept later introduced to the action RPG genre by Secret of Mana (1993). Games like Madden Football (1988), Earl Weaver Baseball (1987), and Tony La Russa Baseball (1991) used AI in an attempt to duplicate the coaching or managerial style of the selected celebrity. Madden, Weaver, and La Russa all worked with the game development teams to maximize the accuracy of the games. Later sports titles allowed users to "tune" variables in the AI to produce a player-defined managerial or coaching strategy. The emergence of new game genres in the 1990s prompted the use of formal AI tools like finite-state machines. Real-time strategy games taxed the AI with many objects, incomplete information, pathfinding problems, real-time decisions, and economic planning, among other things. The first games of the genre had notorious problems. Herzog Zwei (1989), for example, had almost broken pathfinding and very basic three-state state machines for unit control, and Dune II (1992) attacked the players' base in a beeline and used numerous cheats. Later games in the genre exhibited more sophisticated AI. Later games have used bottom-up AI methods, such as the emergent behavior and evaluation of player actions in games like Creatures or Black & White. Façade was released in 2005 and used interactive multiple way dialogs and AI as the main aspect of game.
Games have provided an environment for developing AI with potential applications beyond gameplay. Examples include Watson, a Jeopardy!-playing computer; and the RoboCup tournament, where robots are trained to compete in soccer.
Game AI/heuristic algorithms are used in a wide variety of disparate fields inside a game. The most obvious is in the control of NPCs in a game, although "scripting" (decision tree) is a common means of control. These handwritten decision trees often result in "artificial stupidity" such as repetitive behavior, loss of immersion, or abnormal behavior in situations the developers did not plan for. Pathfinding, another common use for AI, is widely seen in real-time strategy games. Pathfinding is the method for determining how to get an NPC from one point on a map to another, taking into consideration the terrain, obstacles, and possibly "fog of war". Commercial video games often use fast and simple "grid-based pathfinding", wherein the terrain is mapped onto a rigid grid of uniform squares and a pathfinding algorithm, such as A* or IDA*, is applied to the grid. Instead of just a rigid grid, some games use irregular polygons and assemble a navigation mesh out of the areas of the map that NPCs can walk to. As a third method, it is sometimes convenient for developers to manually select "waypoints" that NPCs should use to navigate; the cost is that such waypoints can create unnatural-looking movement. Also, waypoints tend to perform worse than navigation meshes in complex environments. Beyond static pathfinding, navigation is a sub-field of Game AI focusing on giving NPCs the capability to navigate in a dynamic environment, finding a path to a target while avoiding collisions with other entities (other NPC, players, etc.) or collaborating with them (group navigation). Navigation in dynamic strategy games with large numbers of units, such as Age of Empires (1997) or Civilization V (2010), often performs poorly, as units often get in the way of other units. Rather than improve the Game AI to properly solve a difficult problem in the virtual environment, it is often more cost-effective to modify the scenario to be more tractable. If pathfinding gets bogged down over a specific obstacle, a developer may end up moving or deleting the obstacle. In Half-Life (1998), the pathfinding algorithm sometimes failed to find a reasonable way for all the NPCs to evade a thrown grenade; rather than allow the NPCs to attempt to bumble out of the way and risk appearing stupid, the developers instead scripted the NPCs to crouch down and cover in place in that situation.
Player-experience modeling: Discerning the ability and emotional state of the player, so as to tailor the game appropriately. This can include dynamic game difficulty balancing, which consists in adjusting the difficulty in a video game in real-time based on the player's ability. Game AI may also help deduce player intent (like gesture recognition). Procedural-content generation: Creating elements of the game environment like environmental conditions, levels, and music in an automated way. AI methods can generate new content or interactive stories. Data mining on user behavior: Game designers explore how people use the game, what parts they play most, and what causes them to stop playing, allowing developers to tune gameplay or improve monetization. Alternate approaches to NPCs: Changing the game set-up to enhance NPC believability and exploring social rather than individual NPC behavior. Rather than procedural generation, some researchers have used generative adversarial networks (GANs) to create new content. In 2018, researchers at Cornwall University trained a GAN on 1,000 human-created levels for Doom; following training, the neural net prototype was able to design new playable levels on its own. Similarly, researchers at the University of California prototyped a GAN to generate levels for Super Mario. In 2020, Nvidia displayed a GAN-created clone of Pac-Man; the GAN learned how to recreate the game by watching 50,000 (mostly bot-generated) playthroughs.
Behavior trees were developed to address the limits of FSMs. Instead of representing actions as states, a behavior tree organizes it in a hierarchical structure of nodes, called a decision tree, where individual behaviors and actions are at the end of the tree making adding new behaviors more modular. They function by having control-flow nodes, which determine which branch or action to take, and execution nodes, which execute the action. Researchers say the most common types of control flow nodes for NPCs are sequences, where the success of one action is needed for the next, fallbacks, where it checks the whole tree until one of its child nodes succeeds, and parallel where it executes all of its child nodes simultaneously. For example, a guard may use a fallback decision to first check if a player is visible, then investigate a noise, and then if both of those fail, resume patrolling. Rule-based systems assign each potential action a numerical score which is then chosen based on the highest-scoring, although it is not a common approach as they are less efficient and harder to implement. Goal-oriented action planning defines actions by how likely they are to help accomplish a given goal. A planner program decides what sequence of actions an NPC should take to achieve a goal, and those selected actions are then executed by the NPC. Each approach can be combined with another to create hybrid approaches, such as F.E.A.R. which combines the usage of FSM for NPC movement states, but utilize a goal-based system to transition between those states using the knowledge available to NPCs.
Applications of artificial intelligence Behavior selection algorithm – Algorithm that selects actions for intelligent agents Machine learning in video games Video game bot – Type of artificial intelligence-based expert system software Simulated reality – Concept of a false version of reality Utility system – robust technique for decision making in video games Kynapse – game AI middleware, specializing in path finding and spatial reasoning AiLive – suite of game AI middleware Artificial intelligence in architecture xaitment – graphical game AI software Lists List of emerging technologies List of game AI middleware Outline of artificial intelligence
Artificial intelligence (AI) and its subfields have been used in applications throughout industry and academia. Machine learning has been used for various scientific and commercial purposes, including language translation, image recognition, decision-making, credit scoring, and e-commerce. Since the 2020s, massive advancements have been made in the field of generative AI (GenAI) as a result of the 2017 inception of Transformer Model architecture. GenAI has the ability to create text, images, voice, music, videos, and other forms of data from chat-based prompting.
2. Related Work, Literature Survey & Algorithmic Foundations
In agriculture, AI has been proposed as a way for farmers to identify areas that need irrigation, fertilization, or pesticide treatments to increase yields, thereby improving efficiency. AI has been used to attempt to classify livestock pig call emotions, automate greenhouses, detect diseases and pests, and optimize irrigation.
A 2019 study found that generative AI increased productivity by 15% in contact centers. Another 2019 study found it increased productivity by up to 40% for writing tasks. An August 2025 review by MIT found that of surveyed companies, 95% did not report any improvement in revenue from the use of AI. In September 2025, a Harvard Business Review article described how increased use of AI does not automatically lead to increases in revenue or actual productivity. Referring to "AI generated work content that masquerades as good work, but lacks the substance to meaningfully advance a given task", the article coined the term workslop. Per studies done in collaboration with the Stanford Social Media Lab, workslop does not improve productivity and undermines trust and collaboration among colleagues. In telehealth, agentic AI is reportedly facilitating the creation of large business models (millions in annual profit) with 1–2 employees, such as MEDVi, which as of August 2025 only had 2 employees and ~$75M in annual profit for GLP-1 weight-loss telehealth services.
Research and development of quantum computers has been performed with machine learning algorithms. For example, there is a prototype, photonic, quantum memristive device for neuromorphic computers (NC)/artificial neural networks and NC-using quantum materials with some variety of potential neuromorphic computing-related applications. The use of quantum machine learning for quantum simulators has been proposed for solving physics and chemistry problems.
Artificial intelligence and machine learning are used in electronic design automation to assist with integrated circuit design, including floorplanning, placement, routing, functional verification, and optimization of power, performance, and chip area.
Time sharing Interactive interpreters Graphical user interfaces and the computer mouse Rapid application development environments The linked list data structure Automatic storage management Symbolic programming Functional programming Dynamic programming Object-oriented programming Optical character recognition Constraint satisfaction
AI programs have been used in hiring processes to screen resumes and rank candidates based on their qualifications, predict a candidate's likelihood of success in a given role, and automate repetitive communication tasks using chatbots. Studies on these programs have identified tendencies for gender bias, favoring male names and male-coded characteristics, as well as bias against disabled candidates and racial minorities.
AI underlies avatars (automated online assistants) on web pages. It can reduce operation and training costs. In 2016, Pypestream automated customer service for its mobile application to streamline communication with customers. A Google app analyzes language and converts speech into text. The platform can identify angry customers through their language and respond appropriately. Amazon uses a chatbot for customer service that can perform tasks like checking the status of an order, cancelling orders, offering refunds, and connecting the customer with a human representative.
In educational institutions, AI has been used to automate routine tasks such as attendance tracking, grading, and marking. AI tools have also been used to monitor student progress and analyze learning behaviors, with the goal of facilitating timely interventions for students facing academic challenges. As of 2025 and 2026, respectively, about 80% of high school students and nearly 60% of college students were also using AI. Some schools and universities proposed restrictions on students' usage due to issues with increased cheating, over-reliance on AI tools, and widening of digital inequities.
3. Dataset Ingestion, Preprocessing & Stochastic Augmentations
The U.S. Department of Energy wrote in an April 2024 report that AI may have applications in modeling power grids, reviewing federal permits with large language models (LLMs), predicting levels of renewable energy production, and improving the planning process for electrical vehicle charging networks. Other studies have suggested that machine learning can be used for energy consumption prediction and scheduling (e.g., to help with renewable energy intermittency management).
The late 1980s and early 1990s saw expert systems used in technical and environmental domains. For example, researchers built a fishway design advisor to recommend fish passage structures under varying hydraulic and biological conditions using the VP-Expert shell. Transportation researchers applied the same shell to balance airport capacity with noise-mitigation plans. In agriculture, a potato insect expert system (PIES) supported pest management decisions for Colorado potato beetle. The U.S. Environmental Protection Agency's CORMIX system for modeling pollutant discharges combined rules with Fortran hydrodynamic models. Autonomous ships that monitor the ocean, AI-driven satellite data analysis, passive acoustics or remote sensing and other applications of environmental monitoring make use of machine learning. For example, "Global Plastic Watch" is an AI-based satellite-monitoring platform for analysis/tracking of plastic waste sites to help with the prevention of plastic pollution—primarily ocean pollution—by helping identify who mismanages plastic waste and where dumping into oceans occurs.
AI applications analyze media content such as movies, TV programs, advertisement videos, and user-generated content. The solutions often involve computer vision. Typical scenarios include the analysis of images using object recognition or facial recognition techniques, or the analysis of video for recognizing scenes, objects, or faces. AI-based media analysis can facilitate media search, the creation of descriptive keywords for content, content policy monitoring (such as verifying the suitability of content for a particular TV viewing time), speech to text for archival or other purposes, and the detection of logos, products, or celebrity faces for ad placement.
Motion interpolation Pixel-art scaling algorithms Image scaling Image restoration Photo colorization Film restoration and video upscaling Photo tagging Text-to-image models (such as DALL-E, Midjourney, and Stable Diffusion) Image to video Text to video (such as Make-A-Video from Meta, Imagen video and Phenaki from Google) Text to music with AI models (such as MusicLM) Text to speech (such as ElevenLabs and 15.ai) Motion capture
AI has been used to compose music of various genres. David Cope created an AI called Emily Howell that became well known in the field of algorithmic computer music. The algorithm behind Emily Howell is registered as a US patent. In 2012, AI Iamus created the first complete classical album. AIVA (Artificial Intelligence Virtual Artist), composes symphonic music, mainly classical music for film scores. It became the first virtual composer to be recognized by a musical professional association. Melomics creates computer-generated music for stress and pain relief. The Watson Beat uses reinforcement learning and deep belief networks to compose music on a simple seed input melody and a select style. The software was open sourced, and musicians such as Taryn Southern collaborated with the project. South Korean singer Hayeon's debut song, "Eyes on You", was composed using AI which was supervised by real composers, including NUVO.
Narrative Science sells computer-generated news and reports. It summarizes sporting events based on statistical data from a game. It also creates financial reports and real estate analyses. Automated Insights generates personalized recaps and previews for Yahoo Sports Fantasy Football. Yseop uses AI to turn structured data into natural language comments and recommendations. It writes financial reports, executive summaries, and personalized sales or marketing documents in multiple languages, including English, Spanish, French, and German. TALESPIN made up stories similar to the fables of Aesop. The program started with a set of characters who wanted to achieve certain goals. Mark Riedl and Vadim Bulitko asserted that the essence of storytelling was experience management, or "how to balance the need for a coherent story progression with user agency, which is often at odds". While AI storytelling focuses on story generation (character and plot), story communication also received attention. In 2002, researchers developed an architectural framework for narrative prose generation. They faithfully reproduced text variety and complexity on stories such as Little Red Riding Hood. In 2016, a Japanese AI co-wrote a short story and almost won a literary prize. South Korean company Hanteo Global uses a journalism bot to write articles. Literary authors are also exploring uses of AI. An example is David Jhave Johnston's work ReRites (2017–2019), where the poet created a daily rite of editing the poetic output of a neural network to create a series of performances and publications.
In video games, AI is routinely used to generate behavior in non-player characters (NPCs). In addition, AI is used for pathfinding. Games with less typical AI include the AI director of Left 4 Dead (2008) and the neuroevolutionary training of platoons in Supreme Commander 2 (2010). In the 21st century, AIs have beaten human players in many games, including chess (Deep Blue), Jeopardy! (Watson), Go (AlphaGo), poker (Pluribus and Cepheus), E-sports (StarCraft), and general game playing (AlphaZero and MuZero). Kuki AI is a set of chatbots and other apps which were designed for entertainment and as a marketing tool.
The first AI art program, AARON, was developed by Harold Cohen in 1968 with the goal of being able to code the act of drawing. It started by creating simple black and white drawings, and later to painting using special brushes and dyes chosen by the program without mediation from Cohen. AI platforms such as DALL-E, Stable Diffusion, Imagen, and Midjourney have been used for generating visual images from inputs such as text or other images. Some AI tools allow users to input images and output changed versions, such as to display an object or product in different environments. AI image models can also attempt to replicate the specific styles of artists, and can add visual complexity to rough sketches. AI has been used to generate quantitative analysis of existing digital art collections. Two computational methods, close reading and distant viewing, are typical approaches used to analyze digitized art. While distant viewing includes the analysis of large collections, close reading involves one piece of artwork.
4. Neural Network Backbone, Layer Specifications & Loss Formulations
Banks use AI to organize operations for bookkeeping, investing in stocks, and managing properties. AI can adapt to changes during non-business hours.
The use of AI in applications such as online trading and decision-making has changed major economic theories. For example, AI-based buying and selling platforms estimate personalized demand and supply curves, thus enabling individualized pricing. AI systems reduce information asymmetry in the market and thus make markets more efficient. The application of AI in the financial industry can help alleviate financing constraints of non-state-owned enterprises, especially for smaller and more innovative enterprises. Large financial institutions use AI to assist with their investment practices. BlackRock's AI engine, Aladdin, is used both within the company and by clients to help with investment decisions. Its functions include the use of natural language processing to analyze text such as news, broker reports, and social media feeds. It then gauges the sentiment on the companies mentioned and assigns a score. Banks such as UBS and Deutsche Bank use SQREEM (Sequential Quantum Reduction and Extraction Model) to mine data to develop consumer profiles and match them with wealth management products.
AI in healthcare is often used for classification, such as to evaluate a CT scan or electrocardiogram or to identify high-risk patients for population health. Additional potential applications like robot-assisted surgery, virtual nursing assistants, and dosage error reductions could create billions in annual savings for U.S. health care. For certain disorders and diseases, AI algorithms can aid in diagnosis, recommended treatments, outcome prediction, and patient progress tracking. Early detection of diseases like cancer is made possible by AI algorithms, which diagnose diseases by analyzing complex sets of medical data. For example, Microsoft's AI project Hanover helps doctors choose cancer treatments from among the more than 800 medicines and vaccines. Studies have shown AI capable of identifying skin cancers and diagnosing eye conditions, similar to an ophthalmologist, and recommending treatment referrals via transfer learning. Another project monitors multiple high-risk patients by asking each patient questions based on data acquired from doctor/patient interactions. Artificial neural networks are used as clinical decision support systems for medical diagnosis, such as in concept processing technology in electronic medical record (EMR) software. Other healthcare tasks thought suitable for an AI that are in development include:
Screening Companion robots for elder care Drug creation (e.g. by identifying candidate drugs and by using existing drug screening data such as in life extension research) Clinical training Identifying genomic pathogen signatures of novel pathogens or identifying pathogens via physics-based fingerprints (including pandemic pathogens) Helping link genes to their functions, otherwise analyzing genes and identification of novel biological targets Help development of biomarkers Help tailor therapies to individuals in personalized medicine/precision medicine
AI-enabled chatbots decrease the need for humans to perform basic call center tasks, and machine learning in sentiment analysis can spot fatigue to prevent overwork. Decision support systems can potentially prevent industrial disasters and make disaster response more efficient. For manual workers in material handling, predictive analytics has been proposed to reduce musculoskeletal injury. AI can attempt to process workers' compensation claims. AI has been proposed for detection of accident near misses, which are underreported.
Speech translation technology attempts to convert one language into another. This could potentially reduce language barriers in global commerce and cross-cultural exchange, enabling speakers of various languages to communicate. AI has been used to automatically translate spoken language and textual content in products like Microsoft Translator, Google Translate, and DeepL Translator. Also, research and development are in progress to decode and conduct animal communication. Meaning is conveyed not only by text, but also through usage and context (see semantics and pragmatics). As a result, the two primary categorization approaches for machine translations are statistical machine translation (SMT) and neural machine translations (NMTs). The old method of performing translation was to use statistical methodology to forecast the best probable output with specific algorithms. However, with NMT, the approach employs dynamic algorithms to achieve better translations based on context.
AI facial recognition systems are used for mass surveillance, notably in China. In 2019, Bengaluru, India deployed AI-managed traffic signals that uses cameras to monitor traffic density and adjust signal timing based on the interval needed to clear traffic.
In the 1990s, early AI tools controlled toys like Aibo, a domestic robot in the form of a robotic dog with intelligent features and autonomy. In the mid-2010s, Mattel's Hello Barbie could "understand" conversations, give intelligent responses, and remember. AI in toys could offer personalized learning. However, in May 2026, after early tests to see how toddlers interact with AI, researchers called for tighter regulation on AI-powered toys. Similarly, nonprofit organization Common Sense Media warned against children under five using AI.
5. Training Protocol, Convergence Behavior & Experimental Evaluation
AI tools have been used to translate mathematical proofs into formal proofs to automatically verify them.
AI systems have also been used to search for improved algorithms and computational routines. AlphaTensor, AlphaDev, and AlphaEvolve have been applied to matrix multiplication algorithms, sorting routines, and broader scientific and algorithmic discovery.
Various countries are deploying AI military applications. Research is targeting intelligence collection and analysis, logistics, cyber operations, information operations, and semiautonomous and autonomous vehicles. AI has been used in military operations in Iraq, Syria, Israel, and Ukraine.
AI is used in robotics to help robots perceive their surroundings, plan actions, navigate, manipulate objects, and adapt to changing environments. AI systems are used to connect sensor data with physical action, especially in systems operating outside controlled factory settings.
Intelligent personal assistants use AI to attempt to respond to natural language requests. Siri, released in 2010 for Apple smartphones, popularized the concept. Bing Chat has used AI as part of its search engine.
Machine learning can be used to combat spam, scams, and phishing. It can scrutinize the content of spam and phishing attacks to attempt to identify malicious elements. Some models built via machine learning algorithms have over 90% accuracy in distinguishing between spam and legitimate emails. These models can be refined using new data and evolving spam tactics. Machine learning also analyzes traits such as sender behavior, email header information, and attachment types, potentially enhancing spam detection.
AI has been used in facial recognition systems. Some examples are Apple's Face ID and Android's Face Unlock, which are used to secure mobile devices. China has used facial recognition and AI technology in Xinjiang. In 2017, reporters visiting the region found surveillance cameras installed every hundred meters or so in several cities, as well as facial recognition checkpoints at areas like gas stations, shopping centers, and mosque entrances. Human rights groups have criticized the Chinese government for using AI facial recognition technology for use in political suppression. The Netherlands has deployed facial recognition and AI technology since 2016. As of 2019, the database of the Dutch police contained over 2.2M pictures of 1.3M Dutch citizens. This accounts for about 8% of the population. In The Netherlands, face recognition is not used by the police on municipal CCTV. Image labeling has been used by Google Image Labeler to detect products in photos and allow people to search based on a photo. Image labeling has also been demonstrated to generate speech to describe images to blind people.
Machine learning can help to restore and attribute ancient texts. It can help to index texts, e.g., to enable better and easier searching and classification of fragments.
Model Figures & Evaluation Curves (4 Images)
Deep Learning Execution Pipeline
(Preprocessing)
(Feature Extraction)
(Self-Attention)
(Loss Optimization)