search
HomeTechnology peripheralsAIXishanju AI technical expert Huang Hongbo: Practical integration of reinforcement learning and behavior trees in games

​On August 6th and 7th, 2022,​​AISummit Global Artificial Intelligence Technology Conference​​will be held as scheduled. At the "Artificial Intelligence Frontier Exploration" sub-forum held on the afternoon of the 7th, Xishanju AI technical expert Huang Hongbo brought a theme sharing of "Practical Combination of Reinforcement Learning and Behavior Trees in Games" and shared in detail the impact of reinforcement learning in the game field. value.

Huang Hongbo said that the implementation of reinforcement learning technology does not lie in changing the algorithm to be more powerful, but in combining reinforcement learning technology with deep learning and game planning to form a complete set of solutions and Make it happen.

Reinforcement learning makes the game smarter

The implementation of reinforcement learning in the game can make the game smarter and more playable. This is The main purpose of using reinforcement learning in games.

"Reinforcement learning is a machine learning paradigm that trains the agent's strategy so that a series of decisions can be made." Huang Hongbo said that the purpose of the agent is to output actions based on observations of the environment. These actions will lead to more observations and rewards. Training involves a lot of trial and error as the agent interacts with the environment, and the strategy can be improved with each iteration.

In a game, the agent that takes action or performs a behavior is the game agent. Consider a character or a robot in a game, it has to understand the state of the game, where the player is, and then based on this observation, it should make decisions based on the situation of the game. In reinforcement learning, decisions are driven by rewards, which can be provided in the game as high scores or for reaching new levels to reach specific goals.

Huang Hongbo said that the coolest thing about the game situation is that the agent’s strategy is trained under the pressure of the game. For example, it could learn how to handle an attack, or how to behave to achieve a specific goal.

The role of behavior tree in the game

The behavior tree is a tree structure containing logical nodes and behavior nodes. Usually, you can abstract each situation into a type of node, write the nodes according to the specifications, and then connect these nodes into a tree. Every time the user looks for a behavior, he will start from the root node of the tree and find a behavior consistent with the current data from each node.

To put it simply, when the coupling degree of each AI module is high and the granularity is large, a change often involves a large number of modifications, and it is easy for a large amount of duplicate code to appear. The emergence of behavior trees has provided a "square notebook" for the majority of game developers, allowing AI developers to more conveniently build a set of AI frameworks that are reusable, easy to expand and maintain. It can be said that reinforcement learning is obtained through training, and the behavior tree is a combination of several else and if statements.

Xishanju AI technical expert Huang Hongbo: Practical integration of reinforcement learning and behavior trees in games

As shown in the picture above, there is a root node in the picture, and there is a tree node below. The tree nodes include escape, attack, wandering, etc. Think of the picture above as an AI or robot and let it patrol the jungle. When the AI ​​sees an ORC orc and determines that it cannot defeat the ORC, when this condition is triggered, the AI ​​will run away and execute the Run action when escaping. When it is judged that it is easier to fight, the Fight operation will be performed.

In the above figure, there are two nodes, one is Root, which is the root node; one is the Selector node, which is the logical node. All nodes are executed in a certain order from left to right. This is a behavior tree. Therefore, you only need to write the corresponding logic in each node to allow the AI ​​to perform some related actions. Several behavior trees finally form a game.

The combination of reinforcement learning and behavior trees makes the game richer

How to use the combination of reinforcement learning and behavior trees to make the game richer? This is a difficult application that needs to be discussed in many games.

Before that, we might as well discuss when it is better to use reinforcement learning and under what circumstances it is better to use behavior trees. Huang Hongbo said that if there is no way to achieve the goal using behavior trees, reinforcement learning can be used. For example, in FPS (first-person shooter games), how much firepower should be used, who should be fired at, what kind of weapons should be used, etc. It is more difficult to make decisions through behavior trees. Generally speaking, it is better to use reinforcement learning.

When to use behavior trees? For example, if you encounter an obstacle in the game and need to jump over it, you can choose to use reinforcement learning to do it, or you can choose to use a behavior tree to do it. But if we use reinforcement learning to do it, training will be very troublesome. Since there is only one option in this situation, which is to skip, it is simpler to use a behavior tree.

It is not difficult to find that if reinforcement learning and behavior trees are combined and used in games, it is a better solution. Huang Hongbo said that there are two relatively large implementation methods for combining reinforcement learning with behavior trees: one is based on reinforcement learning and supplemented by behavior trees; the other is based on behavior trees and supplemented by reinforcement learning.

Behavior tree side: With behavior tree as the main AI movement method, the behavior tree receives obs input from the game client, and writes corresponding behavior tree behaviors for obs according to its own target situation. In each behavior of the behavior tree, some nodes that require reinforcement learning to make decisions are handed over to reinforcement learning. Then here, reinforcement learning is required to perform corresponding training for some specific scenarios.

Reinforcement learning side: The overall strategy becomes to train several models, each model executes a strategy, and then is embedded into the behavior tree.

Huang Hongbo said that among these two different implementation methods, which one is better requires different considerations based on different situations, different applications, and different games, so it cannot be generalized.

Xishanju AI technical expert Huang Hongbo: Practical integration of reinforcement learning and behavior trees in games

In the following time, Huang Hongbo introduced in detail the technical framework adopted by Xishanju in reinforcement learning and behavior trees, and combined with a large number of game cases, introduced in detail How behavior trees and reinforcement learning are combined in the game to make the game richer. Users who are interested in case practice may wish to pay attention to the wonderful sharing videos of the AISummit Global Artificial Intelligence Technology Conference. (https://www.php.cn/link/53253027fef2ab5162a602f2acfed431)

The above is the detailed content of Xishanju AI technical expert Huang Hongbo: Practical integration of reinforcement learning and behavior trees in games. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
How to Build Your Personal AI Assistant with Huggingface SmolLMHow to Build Your Personal AI Assistant with Huggingface SmolLMApr 18, 2025 am 11:52 AM

Harness the Power of On-Device AI: Building a Personal Chatbot CLI In the recent past, the concept of a personal AI assistant seemed like science fiction. Imagine Alex, a tech enthusiast, dreaming of a smart, local AI companion—one that doesn't rely

AI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityAI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityApr 18, 2025 am 11:49 AM

Their inaugural launch of AI4MH took place on April 15, 2025, and luminary Dr. Tom Insel, M.D., famed psychiatrist and neuroscientist, served as the kick-off speaker. Dr. Insel is renowned for his outstanding work in mental health research and techno

The 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentThe 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentApr 18, 2025 am 11:44 AM

"We want to ensure that the WNBA remains a space where everyone, players, fans and corporate partners, feel safe, valued and empowered," Engelbert stated, addressing what has become one of women's sports' most damaging challenges. The anno

Comprehensive Guide to Python Built-in Data Structures - Analytics VidhyaComprehensive Guide to Python Built-in Data Structures - Analytics VidhyaApr 18, 2025 am 11:43 AM

Introduction Python excels as a programming language, particularly in data science and generative AI. Efficient data manipulation (storage, management, and access) is crucial when dealing with large datasets. We've previously covered numbers and st

First Impressions From OpenAI's New Models Compared To AlternativesFirst Impressions From OpenAI's New Models Compared To AlternativesApr 18, 2025 am 11:41 AM

Before diving in, an important caveat: AI performance is non-deterministic and highly use-case specific. In simpler terms, Your Mileage May Vary. Don't take this (or any other) article as the final word—instead, test these models on your own scenario

AI Portfolio | How to Build a Portfolio for an AI Career?AI Portfolio | How to Build a Portfolio for an AI Career?Apr 18, 2025 am 11:40 AM

Building a Standout AI/ML Portfolio: A Guide for Beginners and Professionals Creating a compelling portfolio is crucial for securing roles in artificial intelligence (AI) and machine learning (ML). This guide provides advice for building a portfolio

What Agentic AI Could Mean For Security OperationsWhat Agentic AI Could Mean For Security OperationsApr 18, 2025 am 11:36 AM

The result? Burnout, inefficiency, and a widening gap between detection and action. None of this should come as a shock to anyone who works in cybersecurity. The promise of agentic AI has emerged as a potential turning point, though. This new class

Google Versus OpenAI: The AI Fight For StudentsGoogle Versus OpenAI: The AI Fight For StudentsApr 18, 2025 am 11:31 AM

Immediate Impact versus Long-Term Partnership? Two weeks ago OpenAI stepped forward with a powerful short-term offer, granting U.S. and Canadian college students free access to ChatGPT Plus through the end of May 2025. This tool includes GPT‑4o, an a

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use