Game object behavior planning system and method
Patent Information
- Application Number
- CN202610820445.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-06-06
- Filing Date
- 2026-06-08
- Publication Date
- 2026-09-01
AI Technical Summary
这种机械化的任务处理方式导致游戏对象交互单一、适应性差,降低了虚拟世界的沉浸感和交互体验
Smart Images

Figure CN122665335A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202510754825.0, entitled "Game Object Behavior Planning System and Method", filed on June 6, 2025. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a system and method for planning the behavior of game objects. Background Technology
[0003] In general, games pre-define tasks for game objects (non-player characters). The behaviors of these objects are based on fixed scripts or rule bases, mechanically triggered and executed by the system, lacking dynamic response and intelligent decision-making capabilities. This mechanized task processing method results in monotonous and unresponsive game object interactions, reducing immersion and interactive experience in the virtual world. Therefore, a game object behavior planning system is urgently needed to address these problems. Summary of the Invention
[0004] In view of this, embodiments of this application provide a game object behavior planning system to address the technical deficiencies existing in the prior art. Embodiments of this application also provide a game object behavior planning method, a computing device, a computer-readable storage medium, and a computer program product.
[0005] According to a first aspect of the embodiments of this application, a game object behavior planning system is provided, including an information acquisition module, a reflection module, and an execution module; The information acquisition module is used to collect environmental information of the target area where the game object is located, and to determine at least one interactive event based on the environmental information; The reflection module is used to extract historical interaction information matching the target interaction event from the knowledge base of the game object when there is a target interaction event that satisfies the reflection conditions in the at least one interaction event, generate reflection interaction information based on the target interaction event and the historical interaction information, and update the knowledge base. The execution module is used to drive the game object to perform interactive tasks in the target area by using the selected interaction information stored in the updated knowledge base when it detects that there is a player-controlled object whose distance from the game object is less than a preset distance threshold.
[0006] According to a second aspect of the embodiments of this application, a game object behavior planning method is provided, including an information collection module, a reflection module, and an execution module.
[0007] The information acquisition module collects environmental information of the target area where the game object is located, and determines at least one interactive event based on the environmental information. When the reflection module finds a target interaction event that meets the reflection conditions in at least one interaction event, it extracts historical interaction information that matches the target interaction event from the knowledge base of the game object, generates reflection interaction information based on the target interaction event and the historical interaction information, and updates the knowledge base. When the execution module detects a player-controlled object whose distance from the game object is less than a preset distance threshold, it uses the selected interaction information stored in the updated knowledge base to drive the game object to perform an interaction task within the target area.
[0008] According to a third aspect of the embodiments of this application, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions to implement the steps of the game object behavior planning method.
[0009] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the game object behavior planning method.
[0010] According to a fifth aspect of the present application, a chip is provided that stores a computer program, which, when executed by the chip, implements the steps of the game object behavior planning method.
[0011] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described game object behavior planning method.
[0012] The game object behavior planning system provided in this application includes an information acquisition module, a reflection module, and an execution module. The information acquisition module is used to acquire environmental information of the target area where the game object is located, and determine at least one interactive event based on the environmental information. The reflection module is used to extract historical interaction information matching the target interaction event from the game object's knowledge base when there is a target interaction event that meets the reflection conditions in at least one interaction event, generate reflected interaction information based on the target interaction event and the historical interaction information, and update the knowledge base. The execution module is used to drive the game object to perform an interaction task in the target area by using the selected interaction information stored in the updated knowledge base when a player-controlled object with a distance of less than a preset distance threshold is detected.
[0013] The game object behavior planning system provided in this application can collect environmental information in the game scene and generate interactive events based on this information for subsequent decision-making. Simultaneously, the target interactive events can also trigger reflection in the game object. When reflection is triggered, the game object can automatically analyze the behavioral results and update its knowledge base. The reflection results directly affect subsequent decisions (such as avoiding repeating mistakes). This enables the game object to possess long-term learning capabilities. The system innovatively utilizes large-scale modeling technology to plan the behavior of game objects, overcoming the limitations of traditional game object behavior. Through the powerful understanding and decision-making capabilities of large-scale models, game objects can make more natural and diverse behaviors based on complex game scenarios. During the game object's actions, it can also interact with the player-controlled object, greatly enhancing player satisfaction with the depth of game interaction. This innovative interactive experience enriches gameplay, enhances player participation and engagement, and brings players new gaming fun and emotional resonance. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the structure of a game object behavior planning system provided in one embodiment of this application; Figure 2 This is a schematic diagram illustrating the prioritization of intelligent agents according to an embodiment of this application; Figure 3 This is a flowchart of a game object behavior planning method provided in an embodiment of this application; Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation
[0015] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0016] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.
[0017] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first.
[0018] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0019] First, the terminology used in one or more embodiments of the present invention will be explained.
[0020] Game objects: also known as intelligent agents, are programmed entities that have the ability to autonomously perceive the environment, make decisions, and execute actions. They simulate human or other role behaviors in games or related systems and interact with the environment. NPCs are also a type of intelligent agent.
[0021] Embedding (Perception Score): A quantitative value assigned to the description of a perceived event, used to measure the characteristics or importance of the event in a specific dimension, helping the agent to evaluate and process the event.
[0022] EventPoignancy: Represents the degree to which an event stimulates the agent. By calculating the new event stimulus value and the agent's current stimulus value, it is determined whether the agent needs to activate the reflection mechanism.
[0023] Persona: In an agent system, a persona is a comprehensive description of the agent's role characteristics, including current stimulus values and other state information, which influences the agent's response to events and behavioral decisions.
[0024] Large Language Model (LLM): A deep learning-based artificial intelligence model with powerful language understanding and generation capabilities, capable of processing natural language text.
[0025] oneapi: A unified and flexible programming model and toolset for managing server cluster computing resources. It efficiently handles a large number of concurrent requests through a load balancing mechanism, thereby improving the overall performance of the server.
[0026] Streaming Dialogue Logic: When agents are having a dialogue, one party can continuously output subsequent content without waiting for the other party to fully receive and process it, simulating smooth real-world dialogue, reducing dialogue planning time, and updating dialogue content in real time.
[0027] This application provides a game object behavior planning system, and also relates to a game object behavior planning method, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0028] See Figure 1 , Figure 1 A schematic diagram of the structure of a game object behavior planning system provided in an embodiment of this application is shown, as follows: Figure 1 As shown, the game object behavior planning system 100 includes an information acquisition module 110, a reflection module 120, and an execution module 130. The information acquisition module 110 is used to acquire environmental information of the target area where the game object is located, and determine at least one interactive event based on the environmental information. The reflection module 120 is used to extract historical interaction information matching the target interaction event from the game object's knowledge base when there is a target interaction event that meets the reflection conditions among the at least one interaction event, generate reflection interaction information based on the target interaction event and the historical interaction information, and update the knowledge base. The execution module 130 is used to drive the game object to perform an interaction task in the target area by using the selected interaction information stored in the updated knowledge base when a player-controlled object with a distance less than a preset distance threshold is detected.
[0029] Generally, NPCs in games simply perform tasks according to scripts, unable to interact with the environment or players in real time, and lacking dynamic responsiveness and intelligent decision-making capabilities. This mechanical task processing method results in monotonous and unresponsive game objects, reducing the immersion and interactive experience of the virtual world.
[0030] Based on this, this application provides a game object behavior planning system. Through in-depth development and optimization of large-scale models, it overcomes the challenges of integrating large-scale model technology with the Unreal Engine, significantly enhancing the naturalness and diversity of NPC behavior. Compared to traditional behavior tree architectures, it greatly improves the adaptability of NPC behavior in complex game scenarios, effectively enhancing their ability to cope with complex scenes. This application constructs an intelligent agent system covering environmental perception, dynamic planning, and real-time interaction. While maintaining high-fidelity visual effects, the system endows NPCs with more natural behavioral logic and more intelligent interactive capabilities, significantly improving the game's immersion and playability.
[0031] The game object behavior planning system provided in this application can collect environmental information in the game scene and generate interactive events based on this information for subsequent decision-making. Simultaneously, the target interactive events can also trigger reflection in the game object. When reflection is triggered, the game object can automatically analyze the behavioral results and update its knowledge base. The reflection results directly affect subsequent decisions (such as avoiding repeating mistakes). This enables the game object to possess long-term learning capabilities. The system innovatively utilizes large-scale modeling technology to plan the behavior of game objects, overcoming the limitations of traditional game object behavior. Through the powerful understanding and decision-making capabilities of large-scale models, game objects can make more natural and diverse behaviors based on complex game scenarios. During the game object's actions, it can also interact with the player-controlled object, greatly enhancing player satisfaction with the depth of game interaction. This innovative interactive experience enriches gameplay, enhances player participation and engagement, and brings players new gaming fun and emotional resonance.
[0032] The game object behavior planning system includes an information acquisition module, a reflection module, and an execution module. The information acquisition module collects environmental information about the target area where the game object is located and determines at least one interactive event based on this information. The reflection module, when a target interactive event satisfying the reflection conditions exists among the at least one interactive event, extracts historical interaction information matching the target interactive event from the game object's knowledge base, generates reflected interaction information based on the target interactive event and the historical interaction information, and updates the knowledge base. The execution module, when detecting a player-controlled object whose distance from the game object is less than a preset distance threshold, uses the selected interaction information stored in the updated knowledge base to drive the game object to perform an interactive task within the target area.
[0033] The information acquisition module collects environmental information from the target area, prioritizes and filters it, and decomposes events into structured elements. The reflection module then compares this information with historical events in memory. If a new event is identified, an embedding is generated, and the event poignancy value is calculated. The event information is then stored in the knowledge base, and relevant player data is updated. Finally, the updated knowledge base provides a basis for subsequent decision-making. The execution module controls the agent's interaction with the player. This process implements environmental perception, memory comparison, and data updating, ensuring the agent can continuously optimize its behavioral strategies based on dynamic information.
[0034] First, let's introduce the functions of the information collection module. This module comprehensively collects information about items within the area currently occupied by the intelligent agent. Specifically, it needs to record the location information of each item in detail, accurate to coordinates or its relative position to surrounding landmarks; clearly define the item names to ensure their accuracy and uniqueness; and carefully track the usage of the items, such as whether they are currently being used and how frequently they are used.
[0035] Within the current area, collect basic information about other agents. This includes their location, appearance, and behavioral status. Simultaneously, delve into the overlaps in their memories with this agent, such as shared tasks or previously discussed topics. From the agent's network, identify the closest agent and obtain its current time information. Time information includes, but is not limited to, the current time and whether it is in a busy period. For example, the closest agent might be currently at 10 AM, busy handling an urgent task.
[0036] All the perceived information is sorted in order of proximity to the agent. The sorting can be based on spatial distance or the degree of correlation between the information and the agent. Simultaneously, based on a pre-configured upper limit for the number of events that can be perceived, the currently perceived events are selected. For example, if the maximum number of perceptible events is 5, then the 5 events that best meet the criteria are selected from all perceived information as at least one interaction event.
[0037] The reflection module is described below. It calculates the event stimulus value for each of the at least one interactive events, compares the event stimulus value of each interactive event with the current stimulus value of the game object, and selects, based on the comparison result, an interactive event whose stimulus value is less than or equal to the current stimulus value and for which there is associated interactive information in the knowledge base as the target interactive event. Simultaneously, it identifies associated interactive events (excluding the target interactive event) among the at least one interactive event, determines the associated interactive information corresponding to these associated interactive events, and stores the associated interactive information in the knowledge base.
[0038] Each perceived interaction event is broken down into a subject-verb-object description. For example, the event "Agent A picks up a file in the office" is broken down into "Agent A" as the subject, "picks up" as the verb, and "file" as the object. This clearly presents the core elements of the event. Based on the number of recent events that can be retrieved, the most recently perceived events are extracted from the agent's memory. These interaction events are compared with the interaction events predicted in the previous round. If the current interaction event is not in the list of recent events, further processing is performed on that event. For example, if the goal is to retrieve the three most recent interaction events, after retrieving the three most recent interaction events from memory, if the newly perceived interaction event is not among them, the next processing step is initiated.
[0039] The system checks if the perceived interaction event description has an embedding (perception score). If not, it requests one from the relevant system or model. Simultaneously, it calculates the EventPoignancy (representing the stimulus value of the event). The Persona maintains the current stimulus value for each character. When a new interaction event is triggered, the current Persona stimulus value is subtracted from the new event's stimulus value. When the Persona's stimulus value is less than 0, it indicates that the agent needs to initiate reflection. For example, if the new interaction event's stimulus value is calculated to be 5, and the current Persona stimulus value is 3, the subtraction results in a new Persona stimulus value of 2. If the new interaction event's stimulus value is 1, and the current Persona stimulus value is 3, the subtraction results in -2, at which point the agent needs to initiate the reflection mechanism.
[0040] The calculated event information, including current time, event time, subject, verb, object, detailed description, keywords, and EventPoignancy, is fully incorporated into the agent's knowledge base. Simultaneously, based on the event's impact on the player's stimulus value and the number of important elements, the player's stimulus value and the number of important elements are modified accordingly. For example, if an event significantly stimulates the player, substantially increasing the stimulus value, and introduces a new important element, then these two values are updated in the player's data.
[0041] Based on the subject, verb, and object of the retrieved event, the system compares it with existing events and reflection nodes in the agent's knowledge base to find related event nodes. These related event nodes are then fed into the agent's planning module, providing crucial information for the agent's next decision-making and action planning. For example, by comparing the subject, verb, and object of the current event and finding similarities to elements of a failed event in the knowledge base, the system identifies the corresponding event node and updates the knowledge base. This allows the agent to refer to past experiences when taking action, avoiding repeating mistakes or optimizing its action strategy.
[0042] As shown in the figure, after the agent completes its action, the system first determines whether the reflection conditions are met. If the conditions are met, it extracts three key points and related nodes from the knowledge base, then filters out key statements and derives deeper insights. Subsequently, the system extracts the insights into a subject-verb-object structure, calculates a memory depth score based on the agent's attributes, and finally stores the complete reflection result in the knowledge base. If the conditions are not met, the reflection process is skipped. This mechanism enables the agent to continuously learn from experience, providing an optimization basis for subsequent decisions through structured memory storage, and realizing an autonomous learning closed loop of "action-evaluation-evolution".
[0043] The planning process of an intelligent agent encompasses a series of steps, from perceiving information about the external environment to formulating action plans based on this information, and then reflecting on the results of the execution. Only when all these steps are successfully completed can the intelligent agent be considered to have completed a full planning process. Ideally, if the operation of the intelligent agent is entirely based on pre-computed logic, it can indeed proceed in an orderly manner, and each plan can rely on a large amount of accurate data as a solid basis.
[0044] Real-time performance is a crucial consideration. If the agent's computational planning process is too slow, it will inevitably lead to a noticeable disconnect in the player's gaming experience, severely impacting the game's smoothness and immersion. Therefore, to effectively address this issue, an innovative strategy is adopted for the agent's reflection logic. Specifically, after the agent completes its current action, the system activates a separate thread dedicated to calculating the reflection logic. In this thread, the agent deeply analyzes the action process and its results, and upon completion of the reflection, promptly adds the key information generated to the agent's latest knowledge base. This approach significantly improves the game's real-time response speed without sacrificing computational accuracy, thus successfully achieving a delicate balance between real-time performance and accuracy.
[0045] The following describes the detailed process of the agent's reflection logic.
[0046] (1) Reflecting on the triggering conditions An agent's reflection process doesn't initiate automatically; it requires specific conditions. First, the stimulus value of the interaction event must be less than or equal to the agent's current stimulus value. This means that in the current action context, the importance of certain key factors has decreased to a certain threshold, prompting the agent to reflect. Simultaneously, at least one of the event memory node or reflection memory node must be non-empty. This is because reflection needs to be based on past event experiences or previous reflection results; without relevant information in memory, reflection is impossible. Only when both conditions are met will the agent initiate the reflection process.
[0047] (2) Key point extraction and memory node extraction Once the reflection trigger condition is met, the agent extracts three key points from its extensive knowledge base. These key points are like crucial pieces in a memory puzzle, helping the agent quickly locate related memory nodes. For example, in a cooking scenario, these three key points might be errors in ingredient handling, improper heat control, or an unsatisfactory final product taste. Based on these extracted key points, the agent can accurately extract closely related memory nodes from the knowledge base. These memory nodes contain detailed information about the event, providing ample data support for subsequent in-depth analysis.
[0048] (3) Key Statements and In-Depth Insights From the extracted memory nodes, the agent further filters out key statements. These key statements are precise summaries of the core content of the event and serve as bridges to deeper insights. By conducting in-depth logical analysis and reasoning on these key statements, the agent attempts to uncover the character's deeper insights throughout the event. For example, from the key statement "not paying attention to the freshness of ingredients during cooking resulted in poor-tasting dishes," the agent may deduce a new understanding of the importance of controlling ingredient quality—that only by ensuring the freshness of ingredients can delicious dishes be cooked.
[0049] (4) In-depth insights: subject-verb-object extraction To more clearly understand and process deep insights, the agent needs to structure them. Specifically, this involves extracting the subject-verb-object structure from the deep insights. For example, in the statement "The character realizes that the freshness of ingredients has a decisive impact on the taste of the dish," the subject is "character," the verb is "realizes," and the object is "The freshness of ingredients has a decisive impact on the taste of the dish." In this way, the agent can present complex deep insights in a concise and clear manner, facilitating subsequent analysis and application.
[0050] (5) Calculation of event / memory profundity score By combining deep insights with the agent's own information, such as its attributes, past experiences, and goal preferences, the agent uses a specific algorithmic model to calculate an event / memory depth score. This score intuitively reflects the importance of the current reflective event to the agent and the degree to which it leaves a deep impression on its memory. For example, if the agent's goal is to become a top chef, reflective events related to improving cooking skills may receive a relatively high depth score; while events less relevant to the core cooking goal will receive a lower score.
[0051] (6) Information storage After a series of complex and sophisticated operations, the agent stores the calculated event / memory depth scores, along with related insights, key statements, and other important information, into its knowledge base. This newly stored information will become an important reference for the agent's future decisions and actions, helping it to continuously optimize its behavioral strategies and improve its performance in game scenarios.
[0052] Through this complete and rigorous reflection process, the intelligent agent can, in the game environment, ensure real-time performance while deeply summarizing lessons learned, gradually improving its own capabilities, and bringing players a smoother and more in-depth gaming experience.
[0053] The execution module is described below. It establishes a correspondence between distance ranges and planned update strategies. The planned update strategy includes a planned duration and a planned update frequency. When the object distance between the game object and the player-controlled object is within a target distance range, a target planned update strategy corresponding to the target distance range is determined based on the correspondence. This target planned update strategy includes a target planned duration and a target planned update frequency. Interaction information corresponding to the target planned duration is selected from the updated knowledge base according to the target planned update frequency, and this selected interaction information drives the game object to perform an interaction task within the target area. If the duration for which the object distance is within the target distance range satisfies the object driving condition corresponding to the target distance range, the step of determining the target planned update strategy corresponding to the target distance range based on the correspondence is executed within the driving cooldown time.
[0054] A diagram illustrating the prioritization of agents is shown below. Figure 2 As shown, the icon at the center of the circle represents the player-controlled object, and the other icons represent intelligent agents. The priority of intelligent agents is determined based on the distance between the intelligent agent and the player-controlled object. The priority of intelligent agents located inside the small circle is defined as 1, the priority of intelligent agents located between the small circle and the large circle is 2, and the priority of intelligent agents located outside the large circle is 3.
[0055] The relevant settings for different levels of intelligent agents are shown in the table below:
[0056] As shown in the table, different priority levels of intelligent agents correspond to different plan durations and plan update frequencies. The higher the priority level, the closer the agent is to the player-controlled object, the shorter the plan duration, and the shorter the plan update frequency, thus enabling the intelligent agent to respond to the player-controlled object's behavior more quickly.
[0057] The setting and adjustment of agent priorities aim to enable them to operate more efficiently in different scenarios and flexibly and accurately adapt to task requirements. Priorities are divided into three levels: 1, 2, and 3. Each level differs significantly in terms of planned duration, distance from the player-controlled object, and planned update frequency. Specifically, priority 1 has a planned duration of 5 minutes, a distance of 0 meters from the player-controlled object, and a planned update frequency of 5 seconds; priority 2 has a planned duration of 15 minutes, a distance of 150 meters from the player-controlled object, and a planned update frequency of 15 seconds; priority 3 has a planned duration of 30 minutes, a distance of 300 meters from the player-controlled object, and a planned update frequency of 30 seconds. When an agent's priority changes, its established plan must be re-planned to fit the new priority requirements. Different priority change scenarios have specific response plans.
[0058] When an agent's priority is raised from 3 to 2, it signifies increased task urgency and more frequent interactions with the player-controlled object. At this point, the parameters of the new plan need immediate adjustment. Under priority 3, the plan duration is 30 minutes, and the update frequency is 30 seconds; under priority 2, the plan duration is shortened to 15 minutes, and the update frequency becomes 15 seconds. After the adjustment, the currently executing plan remains unaffected and continues to proceed as planned, ensuring the continuity of task execution. Subsequent newly generated plans will strictly adhere to the priority 2 standard, namely a 15-minute plan duration and a 15-second update frequency, thereby improving the agent's responsiveness to player needs.
[0059] If an agent's priority increases from 3 or 2 to 1, it indicates a significant increase in the urgency of the task, requiring immediate proximity to the player-controlled object and frequent responses. In this case, the duration of the new plan should be adjusted to 5 minutes, and the plan update frequency reduced to 5 seconds. Next, the remaining duration of the currently executing plan needs to be accurately queried. Calculating the remaining time may require considering multiple factors, including plan execution records and task progress indicators.
[0060] Assuming the minimum granularity time is set to 5 minutes, if the query finds that the current plan has less than 5 minutes remaining (e.g., 3 minutes), then the 3-minute plan will continue to execute until completion. Subsequently, a new plan will be quickly generated based on priority 1 to ensure that task execution closely adheres to the new priority requirements.
[0061] If the current plan has more than 5 minutes remaining, for example, 8 minutes remaining, the current plan will continue to execute until the next multiple of 5 minutes, i.e., until the 10th minute. From the 10th minute onwards, the subsequent plan will be regenerated according to the priority 1 rule to fully ensure the efficient operation of the agent and timely response to the player.
[0062] To avoid frequent and disorderly changes in agent priorities, the system employs a carefully designed update mechanism and timer settings. When an agent needs to change its priority, a timer is started. The timer's duration serves as the object-driven condition. An agent is considered to meet the object-driven condition if it remains in the new priority state for a duration greater than or equal to the timer's duration. The initial timer duration is set to 5 seconds. Within these 5 seconds, if the agent remains in the state corresponding to the new priority, the priority update operation is executed after the 5-second countdown ends. For example, if an agent changes from priority 3 to priority 2, after starting the timer, if the distance between the agent and the player-controlled object remains around 150 meters within 5 seconds, and the planned execution conforms to the characteristics of priority 2, the priority is officially updated after 5 seconds. However, if the agent's priority changes again within these 5 seconds, or reverts to the original priority, the timer will be automatically canceled to avoid unnecessary priority updates and ensure system stability.
[0063] The cooldown time setting for the plan re-dismantling logic is designed to prevent excessively frequent operations from wasting system resources and disrupting plan execution, given that priority updates may trigger plan re-dismantling. The specific duration of the cooldown time can be flexibly adjusted based on actual conditions, for example, set to 10 seconds. During the cooldown time, if an event causing plan re-dismantling due to a priority update is triggered again, the system will not respond until the cooldown time ends. For example, if the agent's priority drops from 2 to 1 during the cooldown time, although the plan needs to be re-dismantled, the system will ignore the request until the 10-second cooldown time expires, at which point the plan will be re-dismantled and adjusted according to the new priority of 1, thus ensuring the stable and efficient operation of the agent.
[0064] In one specific embodiment provided in this application, the game object behavior planning system may further include a dialogue module, used to generate dialogue information corresponding to the first game object and the second game object respectively using a large language model when there are multiple game objects and the first game object and the second game object among the multiple game objects have a dialogue requirement, determine the first dialogue time and the first dialogue position corresponding to the first game object, and the second dialogue time and the second dialogue position corresponding to the second game object, control the first game object to move to the first dialogue position at the first dialogue time, control the second game object to move to the second dialogue position at the second dialogue time, and control the first game object and the second game object to perform dialogue interaction according to the dialogue information after moving.
[0065] In the rich world of AI games, dialogue between intelligent agents is arguably one of the core elements. Players are often filled with curiosity about the interactions between agents during gameplay. These dialogues not only provide a window into whether an agent possesses "thought," but also greatly enrich the narrative layers and the game's engaging nature. When agents can engage in natural, logical, and in-depth conversations, the game world seems to come alive, and the player's immersion is significantly enhanced. For example, in AI simulation games, conversations between agents about daily routines, hobbies, or dreams allow players to gain a deeper understanding of each agent's unique personality and background. This transforms the gaming experience from merely completing mechanical tasks into a wondrous journey filled with emotion and story.
[0066] However, a review of the traditional intelligent agent dialogue computation model reveals several pressing issues. First, before initiating a dialogue, a series of complex judgments are required, such as determining whether the current scene is suitable for dialogue, whether the relationship between the agents is conducive to conversation, and whether a specific event triggers the dialogue requirement. These judgments are not simple conditional filtering but involve data interaction and complex calculations across multiple system modules, consuming significant computing resources and time. Second, once dialogue is determined, the agent must collect a wealth of information to carefully plan the dialogue content, including its own memory, environmental information of the current scene, and characteristic information of the dialogue partner. Furthermore, the dialogue process proceeds in a traditional, back-and-forth alternation pattern, requiring recalculation and processing for each round, which undoubtedly further exacerbates the computational burden, resulting in extremely time-consuming overall dialogue computation. This high-cost computation model severely impacts the real-time performance of fast-paced games, causing players to experience lag and stuttering while waiting for the agent's dialogue response.
[0067] Given the aforementioned challenges, and to meet the game's stringent requirements for real-time feedback, we innovatively introduced streaming dialogue logic. This logic is tightly integrated into the agent's overall planning system. Within the agent's planning process, a dedicated step determines whether dialogue needs to be triggered. Once the determination is affirmative, the relevant dialogue task is directly added to the agent's schedule, much like arranging a pre-planned activity. When the game progresses to the preset dialogue time, the relevant agents meet at the designated location. At this point, the system cleverly pre-sets two agents based on Large Language Models (LLM), who will take on the responsibility of dialogue. They communicate in a streaming manner, meaning that one agent can generate dialogue content while the other does not need to wait for the other to fully receive and process the dialogue, and can continuously calculate subsequent agent plans. This approach, much like fluent and natural conversation in real life, greatly reduces the waiting time during dialogue calculation, fundamentally shortening the time required for agent dialogue planning. Meanwhile, because streaming dialogue is dynamically generated in real-time based on the current context and agent state, it effectively solves the previous problem that even if other agents' plans are modified, the dialogue content can still be updated synchronously and remain consistent with the actual development of the game. Through this innovative streaming dialogue logic, we have significantly improved the real-time interactive performance of the game while ensuring the richness and logic of agent dialogue, creating a smoother, more vivid, and more engaging AI game experience for players.
[0068] When a large number of agents need to be planned, the front-end interface first receives the request, and then OneAPI accurately routes the request to the optimal computing node based on the real-time parsed request type, priority and server status data. Subsequently, the computing node plans the agent behavior through a large language model.
[0069] When a large number of agents need to perform planning, a significant amount of data needs to be collected. After processing, the agents send the data to the server hosting the Large Language Model (LLM) via HTTP request protocol. Each agent has the ability to independently send HTTP requests, resulting in a large number of concurrent requests due to the sheer number of agents. These requests carry detailed information descriptions and task instructions, hoping to obtain the corresponding processing results from the LLM.
[0070] When a massive influx of requests from intelligent agents floods the server, OneAPI technology emerges as a powerful support. OneAPI constructs a highly unified and flexible programming model and toolset, providing comprehensive support for the management of computing resources in server clusters. Its load balancing mechanism is achieved through the following closely coordinated steps: (1) Request Reception and Distribution. A dedicated request reception interface is deployed on the server front end. When an HTTP request from the agent arrives, the oneapi load balancing module is quickly activated. This module uses a real-time monitoring algorithm to parse the key information of each request in milliseconds, including the request type (whether it is an environmental data request, a traffic data request, or another type), the urgency of the request (such as requests involving urgent security events have higher priority), and the current load status of each computing node on the server (obtained by real-time monitoring of indicators such as CPU utilization and memory usage). Based on this detailed information, the load balancing module accurately directs the request to the most suitable computing node according to the pre-set complex distribution rules, ensuring that the request can be processed in a timely and efficient manner.
[0071] (2) Resource Allocation and Scheduling. OneAPI implements dynamic and refined management of computing resources in the server cluster. For each incoming request, it rationally allocates key computing resources such as CPU, memory, and GPU according to the task type and expected processing difficulty. For example, for complex image recognition requests, more GPU resources will be allocated to accelerate computing; for data analysis requests with large amounts of data, sufficient memory resources will be prioritized. When the load of a computing node reaches a pre-set threshold, such as CPU utilization exceeding 80%, OneAPI's intelligent scheduling algorithm will be activated immediately, automatically scheduling subsequent new requests to nodes with lower current load and more abundant resources, thereby maintaining the load balance of the entire server cluster and preventing processing delays or even crashes of a single node due to overload.
[0072] (3) Performance Monitoring and Feedback. OneAPI has a built-in comprehensive performance monitoring system that continuously monitors key performance indicators of each computing node, including response time, throughput, and resource utilization. By collecting and analyzing this data in real time, OneAPI can keenly observe the operating status of the server cluster. Once it detects an abnormal increase in the response time of a node or a throughput lower than expected, OneAPI will react quickly and adjust the load distribution strategy in real time. For example, it may reduce the number of new requests allocated to that node or optimize its resource configuration, thereby continuously optimizing the overall processing efficiency of the server cluster for agent requests, ensuring that the system can still operate stably and efficiently under the severe test of high concurrency requests.
[0073] Through the deep collaborative operation of the above-mentioned intelligent agent information processing and server-side OneAPI load balancing technology, an efficient and stable data interaction bridge between a large number of intelligent agents and LLM has been successfully built, laying a solid foundation for the intelligent operation and development of games.
[0074] The game object behavior planning system provided in this application can collect environmental information in the game scene and generate interactive events based on this information for subsequent decision-making. Simultaneously, the target interactive events can also trigger reflection in the game object. When reflection is triggered, the game object can automatically analyze the behavioral results and update its knowledge base. The reflection results directly affect subsequent decisions (such as avoiding repeating mistakes). This enables the game object to possess long-term learning capabilities. The system innovatively utilizes large-scale modeling technology to plan the behavior of game objects, overcoming the limitations of traditional game object behavior. Through the powerful understanding and decision-making capabilities of large-scale models, game objects can make more natural and diverse behaviors based on complex game scenarios. During the game object's actions, it can also interact with the player-controlled object, greatly enhancing player satisfaction with the depth of game interaction. This innovative interactive experience enriches gameplay, enhances player participation and engagement, and brings players new gaming fun and emotional resonance.
[0075] Figure 3 The flowchart shown illustrates a game object behavior planning method according to an embodiment of this application. The game object behavior planning method includes an information acquisition module, a reflection module, and an execution module, and specifically includes the following steps: Step 302: The information acquisition module acquires environmental information of the target area where the game object is located, and determines at least one interactive event based on the environmental information; Step 304: If there is a target interaction event that meets the reflection conditions in the at least one interaction event, the reflection module extracts historical interaction information that matches the target interaction event from the knowledge base of the game object, generates reflection interaction information based on the target interaction event and the historical interaction information, and updates the knowledge base. Step 306: When the execution module detects that there is a player-controlled object whose distance from the game object is less than a preset distance threshold, it uses the selected interaction information stored in the updated knowledge base to drive the game object to perform an interaction task in the target area.
[0076] In an optional embodiment, when there are multiple game objects and a first game object and a second game object among them have a dialogue requirement, the dialogue module uses a large language model to generate dialogue information corresponding to the first game object and the second game object respectively, determines the first dialogue time and the first dialogue position corresponding to the first game object, and the second dialogue time and the second dialogue position corresponding to the second game object, controls the first game object to move to the first dialogue position at the first dialogue time, controls the second game object to move to the second dialogue position at the second dialogue time, and controls the first game object and the second game object to perform dialogue interaction according to the dialogue information after moving.
[0077] In an optional embodiment, the reflection module calculates the event stimulus value of each interaction event in the at least one interaction event, compares the event stimulus value of each interaction event with the current stimulus value of the game object, and selects the interaction event that is less than or equal to the current stimulus value and has associated interaction information in the knowledge base as the target interaction event based on the comparison result.
[0078] In an optional embodiment, the reflection module determines, in the at least one interaction event, an associated interaction event other than the target interaction event, determines the associated interaction information corresponding to the associated interaction event, and stores the associated interaction information in the knowledge base.
[0079] In an optional embodiment, the execution module establishes a correspondence between distance ranges and planned update strategies. The planned update strategy includes a planned duration and a planned update frequency. When the object distance between the game object and the player-controlled object is within a target distance range, a target planned update strategy corresponding to the target distance range is determined according to the correspondence. The target planned update strategy includes a target planned duration and a target planned update frequency. Interaction information corresponding to the target planned duration is selected from the updated knowledge base according to the target planned update frequency as the selected interaction information. Based on the selected interaction information, the game object is driven to perform an interaction task within the target area.
[0080] In an optional embodiment, the execution module, when the duration for which the object distance is within the target distance range satisfies the object driving condition corresponding to the target distance range, performs the step of determining the target plan update strategy corresponding to the target distance range based on the correspondence within the driving cooldown time range.
[0081] First, the agent collects environmental information, prioritizes and filters it, identifies interaction events, and decomposes these events into structured elements. Then, it compares these events with historical interactions in memory. If a target interaction event is identified, the agent reflects on it, providing a basis for subsequent decisions. The event information is then stored in a knowledge base. This process realizes environmental perception, memory comparison, and data updating, ensuring the agent can continuously optimize its behavioral strategies based on dynamic information. Furthermore, the agent can interact with the game control object when the distance between them is less than a distance threshold.
[0082] The game object behavior planning system provided in this application plans the behavior of game objects, collects environmental information in the game scene, and generates interactive events based on this information for subsequent decision-making. The target interactive events can also trigger reflection in game objects; when reflection is triggered, the game object can automatically analyze the behavioral results and update its knowledge base. The reflection results directly affect subsequent decisions (such as avoiding repeating mistakes). This enables game objects to possess long-term learning capabilities. The innovative use of large-scale modeling technology in games to plan the behavior of game objects overcomes the limitations of traditional game object behavior. Through the powerful understanding and decision-making capabilities of large-scale models, game objects can make more natural and diverse behaviors based on complex game scenarios. During the game object's actions, it can also interact with the player-controlled object, greatly enhancing player satisfaction with the depth of game interaction. This innovative interactive experience enriches gameplay, enhances player participation and engagement, and brings players new gaming fun and emotional resonance.
[0083] Figure 4 A structural block diagram of a computing device 400 according to an embodiment of this application is shown. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and a database 450 is used to store data.
[0084] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0085] In one embodiment of this application, the aforementioned components of the computing device 400 and Figure 4 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 4 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0086] The computing device 400 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 400 can also be a mobile or stationary server.
[0087] The processor 420 is used to execute computer-executable instructions for the game object behavior planning method.
[0088] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the game object behavior planning method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the game object behavior planning method described above.
[0089] An embodiment of this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used for a game object behavior planning method.
[0090] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the game object behavior planning method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the game object behavior planning method described above.
[0091] An embodiment of this application also provides a chip that stores a computer program, which, when executed by the chip, implements the steps of the game object behavior planning method.
[0092] An embodiment of this specification also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described game object behavior planning method.
[0093] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the game object behavior planning method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the game object behavior planning method described above.
[0094] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0095] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0096] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0097] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0098] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. A game object behavior planning system, characterized in that, It includes an information collection module, a reflection module, and an execution module; The information acquisition module is used to collect environmental information of the target area where the game object is located, and to determine at least one interactive event based on the environmental information; The reflection module is used to extract historical interaction information matching the target interaction event from the knowledge base of the game object when there is a target interaction event that satisfies the reflection conditions in the at least one interaction event, generate reflection interaction information based on the target interaction event and the historical interaction information, and update the knowledge base. The execution module is used to drive the game object to perform interactive tasks in the target area by using the selected interaction information stored in the updated knowledge base when it detects that there is a player-controlled object whose distance from the game object is less than a preset distance threshold.
2. The game object behavior planning system according to claim 1, characterized in that, It also includes a dialogue module; The dialogue module is used for: When there are multiple game objects and the first and second game objects among them have a dialogue requirement, the large language model is used to generate the dialogue information corresponding to the first game object and the second game object respectively. Determine the first dialogue time and first dialogue position corresponding to the first game object, and the second dialogue time and second dialogue position corresponding to the second game object; Control the first game object to move to the first dialogue position during the first dialogue time, and control the second game object to move to the second dialogue position during the second dialogue time; After being moved, the first and second game objects interact with each other according to the dialogue information.
3. The game object behavior planning system according to claim 1, characterized in that, The reflection module is also used for: Calculate the event stimulus value for each of the at least one interactive events, and compare the event stimulus value for each interactive event with the current stimulus value of the game object; Based on the comparison results, the interaction event that is less than or equal to the current stimulus value and has associated interaction information in the knowledge base is selected as the target interaction event.
4. The game object behavior planning system according to claim 1, characterized in that, The reflection module is also used for: Among the at least one interactive event, identify the associated interactive event other than the target interactive event; Determine the associated interaction information corresponding to the associated interaction event, and store the associated interaction information in the knowledge base.
5. The game object behavior planning system according to any one of claims 1 to 4, characterized in that, The execution module is further configured to: Establish a correspondence between distance range and plan update strategy, wherein the plan update strategy includes plan duration and plan update frequency; When the object distance between the game object and the player-controlled object is within the target distance range, the target plan update strategy corresponding to the target distance range is determined according to the correspondence, wherein the target plan update strategy includes the target plan duration and the target plan update frequency; According to the target plan update frequency, select the interaction information corresponding to the target plan duration in the updated knowledge base as the selected interaction information; Based on the selected interaction information, the game object is driven to perform interactive tasks within the target area.
6. The game object behavior planning system according to claim 5, characterized in that, The execution module is further configured to: If the duration during which the object distance is within the target distance range satisfies the object driving condition corresponding to the target distance range, the step of determining the target plan update strategy corresponding to the target distance range based on the correspondence is executed within the driving cooldown time range.
7. A method for planning the behavior of game objects, characterized in that, It includes an information collection module, a reflection module, and an execution module; The information acquisition module collects environmental information of the target area where the game object is located, and determines at least one interactive event based on the environmental information. When the reflection module finds a target interaction event that meets the reflection conditions in at least one interaction event, it extracts historical interaction information that matches the target interaction event from the knowledge base of the game object, generates reflection interaction information based on the target interaction event and the historical interaction information, and updates the knowledge base. When the execution module detects a player-controlled object whose distance from the game object is less than a preset distance threshold, it uses the selected interaction information stored in the updated knowledge base to drive the game object to perform an interaction task within the target area.
8. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the method of claim 7.
9. A computer-readable storage medium storing computer instructions, characterized in that, When executed by the processor, this instruction implements the steps of the method of claim 7.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method of claim 7.