Game role behavior control method and device, electronic equipment and storage medium
By evaluating the feasibility of temporal paths and interaction points in game scenarios, the game characters are controlled to perform optimal behaviors in asymmetric competitive games, which solves the problems of short-sighted and rigid AI decision-making and improves the anthropomorphism and interactive experience of AI characters in asymmetric competitive games.
Patent Information
- Application Number
- CN202510918695.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-26
AI Technical Summary
Existing game AI characters have problems with short-sighted or rigid decision-making in asymmetric competitive games and are unable to dynamically evaluate the value of paths, resulting in poor anthropomorphism and gaming experience.
By obtaining multiple timing paths in the game scene, evaluating the strategic value and access feasibility of the interaction points, determining the target timing path and the access timing of the interaction points, and controlling the game characters to perform the target behavior.
It improves the anthropomorphism and interactive experience of AI characters in asymmetric competitive games, solves the problems of short-sighted and rigid decision-making, and reduces computing resource consumption.
Smart Images

Figure CN120695450A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of game technology, and in particular to a method, device, electronic device and storage medium for controlling the behavior of a game character. Background Art
[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No statement herein is admitted to be prior art by inclusion in this section.
[0003] In game development, especially in asymmetric competitive games, intelligent control of AI characters is a key technology for enhancing the gaming experience. Related technologies include: real-time calculation of locally optimal interaction points, closed-point routes annotated by human experts, and supervised learning to generate routes.
[0004] All three of the aforementioned approaches have limitations. The local optimal strategy only calculates the current optimal interaction point, ignoring the value of subsequent paths, leading to short-sighted AI behavior. The fixed-path strategy relies on manually labeled fixed routes and cannot dynamically evaluate path value, resulting in rigid AI behavior. The supervised learning strategy relies on a large amount of high-level player data for training, and when data is scarce, the supervised learning network struggles to converge. These shortcomings limit the performance and anthropomorphism of existing game AI characters, impacting the player experience. Summary of the Invention
[0005] In this context, embodiments of the present invention are intended to provide a method, apparatus, electronic device, and storage medium for controlling the behavior of a game character, so as to at least partially solve the above-mentioned problems existing in the related art.
[0006] In a first aspect of an embodiment of the present invention, a method for controlling the behavior of a game character is provided, comprising: obtaining a plurality of timing paths generated based on interaction points in a game scene, where the interaction points are scene components for the game character to interact with; determining the strategic value and access feasibility of each interaction point on each timing path; determining the overall strategic value of each timing path based on the strategic value of the interaction point; determining the target timing path and the access timing of the interaction points on the path based on the overall strategic value of the timing path and the access feasibility of each interaction point; and controlling the game character to perform the target behavior based on the target timing path and the access timing of the interaction points on the path.
[0007] In a second aspect of an embodiment of the present invention, a game character behavior control device is provided, comprising: a path acquisition module for acquiring multiple time-series paths generated based on interaction points in a game scene, where interaction points are scene components for game characters to interact with; a parameter determination module for determining the strategic value and access feasibility of each interaction point on each time-series path; a path evaluation module for determining the overall strategic value of each time-series path based on the strategic value of the interaction point; a path selection module for determining the target time-series path and the access timing of the interaction points on the path based on the overall strategic value of the time-series path and the access feasibility of each interaction point; and a behavior control module for controlling the game character to perform a target behavior based on the target time-series path and the access timing of the interaction points on the path.
[0008] In a third aspect of the embodiment of the present invention, an electronic device is provided, comprising: a memory storing computer-executable instructions that can be executed by a processor; and a processor for executing the computer-executable instructions to perform the steps in any one of the above-mentioned game character behavior control methods.
[0009] In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, storing a computer program, which implements the steps of any of the above-mentioned game character behavior control methods when executed by a processor.
[0010] This disclosure solves the problem of short-sighted or rigid AI decision-making in existing technologies through the overall strategic value evaluation of time-series paths, enabling AI characters to select the optimal path based on long-term benefits. At the same time, by dynamically calculating the feasibility of access, it avoids decision failures caused by infeasible paths, thereby improving the real-time adaptability and realism of AI behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily apparent by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present invention are shown by way of example and not limitation, in which:
[0012] Figure 1 A schematic diagram of an implementation environment for a game character behavior control method provided by an embodiment of the present disclosure;
[0013] Figure 2 A flowchart of a method for controlling game character behavior provided by an embodiment of the present disclosure;
[0014] Figure 3 A player trajectory diagram provided in an embodiment of the present disclosure;
[0015] Figure 4 A schematic diagram of a time sequence path obtained according to a player's trajectory provided in an embodiment of the present disclosure;
[0016] Figure 5 A schematic diagram of calculating the feasibility of access to an interaction point provided in an embodiment of the present disclosure;
[0017] Figure 6 A schematic diagram of calculating the feasibility of interaction point access according to another embodiment of the present disclosure;
[0018] Figure 7 A schematic diagram of the structure of a game character behavior control device provided by an embodiment of the present disclosure;
[0019] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
[0020] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] The accompanying drawings are schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art will appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or that other methods, components, devices, steps, etc. may be used to replace one or more specific details.
[0024] Figure 1 The system architecture diagram of the operating environment of this exemplary embodiment is shown. The system architecture may include a terminal device 110 and a server 120. Among them, the terminal device 110 may be a mobile phone, tablet computer, personal computer, smart wearable device, game console and other devices, which have a display function and can display a graphical user interface. The graphical user interface may include an operating system interface or an application interface, etc. An application is installed on the terminal device 110, such as a game program. The server 120 generally refers to the background system that provides application services in this exemplary embodiment, and can be a single server or a cluster of multiple servers. For example, a game server program is deployed on the server 120 for executing game data processing on the server side. The terminal device 110 and the server 120 can be connected via a wired or wireless communication link for data transmission. The method in one of the exemplary embodiments of the present disclosure can be executed by any one or more of the terminal device 110 and the server 120.
[0025] In one embodiment, the above method can be implemented and executed based on a cloud interaction system. The cloud interaction system can be the above system architecture. Various cloud applications, such as cloud gaming, can be run within the cloud interaction system. Taking cloud gaming as an example, cloud gaming can be a gaming method based on cloud computing. In the cloud gaming operating mode, the main body of the game program and the main body of the game screen presentation are separated. The storage and operation of the in-game control and interaction methods are completed on the cloud gaming server (such as the aforementioned server 120). The cloud gaming client (such as the aforementioned terminal device 110) is responsible for receiving and sending data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; while the cloud gaming server in the cloud performs information processing. When playing the game, the user operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client via the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0026] In one embodiment, the above method can be implemented solely by the terminal device 110. For example, without deploying the server 120, the terminal device 110 can run an application in a standalone environment to implement the game function and execute the above method.
[0027] With the development of the gaming industry, asymmetric competitive games, such as 1v4 games, are becoming increasingly popular. In these games, players can play as either a hunter or a survivor. Due to the imbalance in player numbers, AI-controlled characters often need to be added to the battle to ensure the smooth progress of the game. Due to the inherent imbalance of asymmetric competitive play, survivors, the hunter's target, can only use interactive controls in the game scene, such as windows and terrain, to delay the hunter as much as possible, thereby buying other survivors more time to repair the cipher machine and ultimately win.
[0028] Regarding the crucial survival AI's pivot point generation and integration, there are three main approaches. Option 1 directly calculates the optimal local interaction point in real time based on the current survival position, but by focusing solely on the next step, it ignores long-term value. Option 2 randomly uses closed pivot points labeled by human experts without evaluating their value, making it impossible to obtain the optimal pivot point. Option 3, while employing supervised learning to directly generate pivot points from high-level player videos, requires a vast amount of data from high-level players due to the large number of interaction points in the game, resulting in a high number of combinations. This requires a significant amount of data from high-level players, and insufficient data makes it difficult for the supervised learning network to fit the optimal pivot point.
[0029] In view of this, the present disclosure provides a game character behavior control method to achieve dynamic decision-making based on temporal paths and improve the anthropomorphism level of AI characters.
[0030] In this embodiment, a game character behavior control method is provided. Figure 2 is a flow chart of a method for controlling the behavior of a game character according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0031] Step S110: obtaining a plurality of temporal paths generated based on interaction points in the game scene, where the interaction points are scene components that can be used for game characters to interact.
[0032] Step S120 , determining the strategic value and access feasibility of each interaction point on each timing path.
[0033] Step S130 : determining the overall strategic value of each time sequence path based on the strategic value of the interaction point.
[0034] Step S140 : determining the target timing path and the access timing of the interaction points on the path based on the overall strategic value of the timing path and the access feasibility of each interaction point.
[0035] Step S150: Control the game character to execute the target behavior based on the target timing path and the access timing of the interaction points on the path.
[0036] The method provided in this embodiment enables game AI to make intelligent decisions based on the overall strategic value and access feasibility of temporal paths. This not only enhances the interactive experience, allowing players to experience a richer and more intelligent confrontation with AI, but also increases the richness of the game, allowing AI characters in the game to exhibit more diverse and advanced behavioral characteristics. Furthermore, this method effectively solves the problem of AI decision-making only considering short-term value while ignoring long-term planning. Finally, this method does not require large amounts of data for supervised learning training, reducing computing resource consumption.
[0037] The above steps are described in detail below.
[0038] In step S110, a plurality of temporal paths generated based on interaction points in the game scene are obtained, where the interaction points are scene components that can be used for game characters to interact.
[0039] Optionally, interaction points refer to scene components that game characters can interact with, such as wooden boards, windows, and destructible walls. These components can be used by game characters to avoid threats and contain opposing characters.
[0040] Optionally, the game scene refers to the virtual environment in which the characters in the game move, including various terrains, obstacles, and interactive components. The game scene provides the physical space and interactive foundation for the characters' behavior.
[0041] Optionally, a temporal path is an ordered sequence connecting multiple interaction points, representing the route a game character takes through those interaction points in a specific time sequence. These paths can be generated based on the movement trajectories of high-level players in historical game data, reflecting successful evasive strategies of high-level players, thereby providing reusable high-level player behavior patterns for AI characters.
[0042] Optionally, multiple time-series paths represent different evasion routes for different players, each path representing a possible behavioral strategy. Diverse path selection increases the complexity and unpredictability of AI behavior.
[0043] In step S120 , the strategic value and access feasibility of each interaction point on each timing path are determined.
[0044] Optionally, Strategic Value is a quantitative assessment of the usefulness of an interaction point, calculated based on a variety of factors, including its availability, surrounding environment characteristics, and pre-set attribute levels. Interaction points with high Strategic Value are more likely to help characters avoid threats and successfully contain opponents.
[0045] Optionally, access feasibility indicates the likelihood of a game character safely reaching a specific interaction point. This is assessed by calculating the time difference between the game character and the threat character reaching the interaction point, as well as whether there is a risk of interception. Interaction points with high access feasibility allow the game character to safely access and utilize the interaction point's functionality.
[0046] In step S130 , the overall strategic value of each temporal path is determined based on the strategic value of the interaction point.
[0047] Optionally, the overall strategic value evaluates the overall value of the sequential path, taking into account not only the value of the current interaction point but also the future value of subsequent interaction points along the path. This provides a long-term value assessment for path selection, preventing short-term decisions that focus solely on short-term gains.
[0048] In step S140 , based on the overall strategic value of the timing path and the access feasibility of each interaction point, the target timing path and the access timing of the interaction points on the path are determined.
[0049] Optionally, the interaction point access sequence specifies the order in which the game character should access interaction points along the target temporal path, including the first access point. By calculating the access feasibility of each interaction point along the temporal path, choosing a reasonable access sequence can help avoid interception by the threatening character and improve the success rate of evasion.
[0050] Optionally, the target timing path is the optimal path selected from all available timing paths, taking into account the overall strategic value and the access feasibility of the first access interaction point. This path balances value and risk, providing optimal action guidance for the game character.
[0051] In step S150 , the game character is controlled to perform a target behavior based on the target timing path and the access timing of the interaction points on the path.
[0052] Optionally, the target behavior is a series of actions that the game character performs according to the selected path, including movement, interaction, and evasion. The execution of the target behavior enables the game character to achieve the desired evasion effect. Controlling the game character to perform the target behavior based on the target timing path and the access timing of the interaction points on that path means controlling the survival AI to move and interact between each interaction point according to the determined target timing path and the access timing of the interaction points. This ensures that the survival AI can move according to the optimal path and sequence when evading the supervisor, improving the evasion effect and success rate.
[0053] In a specific application of this embodiment, in an asymmetric competitive game, when a survival character is pursued by a supervisory character, the system first obtains a movement trajectory that reflects the behavioral patterns of a high-level survival character player. Based on the interaction points (such as wooden boards and windows) in the game scene that the trajectory passes through and the order in which each interaction point is passed, the system sequentially connects these interaction points to generate multiple closed temporal paths consisting of the interaction points. The system then calculates the strategic value of each interaction point, taking into account the current availability of the interaction point, the surrounding environment characteristics, and the preset attribute level. It also evaluates the access feasibility of each interaction point, analyzing the time difference between the game character and the threat character arriving at the interaction point and the potential interception risk. Based on the access feasibility of each interaction point, the system determines the first access point on each temporal path and updates the access order of the interaction points on each temporal path based on the determined first access point. For example, a closed temporal path A includes interaction points A1, A2, A3, A4, A5, and A6, and its access sequence is A1→A2→A3→A4→A5→A6→A1. Based on the access feasibility calculation results of the six interaction points, A3 is determined to be the optimal first access point. The access sequence of the interaction points on path A is then modified to A3→A4→A5→A6→A1→A2→A3. Finally, by comprehensively considering the overall strategic value of each temporal path and the access feasibility of the first access interaction point determined for each temporal path, the system selects the optimal target temporal path and controls the survivor to perform avoidance behaviors according to this path and its updated access sequence of interaction points.
[0054] In an optional embodiment, obtaining multiple temporal paths generated based on interaction points in the game scene includes: determining the movement trajectory of a target game character in a target behavior state from historical game data; and generating multiple temporal paths based on the positional relationship between the movement trajectory and each interaction point in the game scene. In this way, by analyzing the movement trajectory of real players in historical game data to generate temporal paths, it is possible to more accurately reflect the behavioral patterns in actual games and improve the behavioral fidelity of the AI character.
[0055] Exemplarily, the system extracts the movement trajectory data of the survival character when being pursued from the real player game database stored in the game server, and filters out the complete trajectory records of those who successfully avoided the pursuit. The system calculates the distance between these recorded location points and various interaction points in the map (such as wooden boards, windows, destructible dangerous walls, etc.). When the distance between a certain location point and a specific interaction point is less than a preset threshold, it is determined that the location point corresponds to the player's use of the interaction point. Then, according to the time sequence of the location points in the trajectory, the corresponding interaction points are connected to form multiple paths with a temporal relationship. These temporal paths extracted from real player behavior are used as a reference for the actions of AI characters when being pursued, enabling AI to imitate the turning point strategy of real players.
[0056] Optionally, historical game data can include high-level player game replays, training data, or simulated game records. This data records the behavior of game characters in different states, particularly the movement paths when being pursued. By analyzing this real player behavior data, effective movement patterns can be extracted, providing AI characters with reference paths that are more consistent with human player behavior. This data can be stored in the game server database and categorized and indexed by dimensions such as character type and game state, facilitating rapid retrieval and matching of relevant data for the current scenario.
[0057] Optionally, a target behavior state refers to a state in which a game character is in a specific behavior strategy, such as being pursued, searching for a target, or executing a mission. In these states, the character's movement trajectory often exhibits specific patterns and regularities. Target behavior states can be triggered by a variety of game conditions, such as the distance from the threatening character, the occurrence of specific events on the map, and changes in the status of teammates. The system can identify and determine the target behavior state in which the target game character is currently located and then select the appropriate behavior control strategy. Target behavior states typically have clear start and end conditions. For example, the "avoid pursuit" state begins when the distance between the game character and the threatening character falls below a certain threshold and ends when the distance exceeds another threshold and persists for a period of time. Different behavior states correspond to different movement trajectory analysis strategies to ensure that the generated temporal path meets the requirements of the current situation.
[0058] Optionally, a movement trajectory is a continuous record of the game character's position in the scene, including timestamps and coordinate information. The system can smooth this trajectory data, remove noise points, and extract key turning points. By analyzing the distribution density, movement direction, and speed changes of trajectory points, the character's behavioral intention within a specific interval can be identified, such as fast movement in a straight line indicating escape, or curved movement indicating avoidance. These analysis results can be used to determine the correlation between the trajectory and the interaction point.
[0059] Optionally, positional relationship analysis includes calculating the spatial distance, azimuth angle, and reachability between the movement trajectory point and each interaction point. The system uses various spatial distance calculation methods when performing positional relationship analysis, such as Euclidean distance, Manhattan distance, or actual reachable distance that accounts for terrain obstacles. Dynamic changes in positional relationships reflect the changing trends in the character's proximity to interaction points during movement. These patterns of change are important for identifying the order in which interaction points are visited. By establishing a quantitative assessment model for positional relationships, the system can accurately determine whether a character passes through or approaches specific interaction points during movement. Positional relationship analysis also considers the effective range of the interaction point and the character's interaction radius to ensure that the identified interaction points are meaningful. The system sets appropriate positional relationship judgment thresholds based on the characteristics of different interaction point types to improve the accuracy and reliability of interaction point identification. Analysis of the temporal characteristics of positional relationships helps establish connections between interaction points, forming a time-ordered path structure.
[0060] Optionally, when generating multiple temporal paths, the system will connect eligible interaction points in chronological order based on the temporal characteristics of the movement trajectory. Each temporal path represents a possible course of action, including the order in which the interaction points are used. The system generates multiple candidate paths based on the multiple movement trajectories of the target game character in the target behavior state for subsequent evaluation. These paths differ in the selection of interaction points and the order of connection, providing diverse options for AI decision-making. When generating paths, the interaction points can be connected in sequence to form a closed path. A closed path represents a containment strategy.
[0061] In an optional embodiment, the movement trajectory of the target game character in the target behavior state is determined from historical game data. This includes: starting to record the target game character's real-time location when the target game character enters a dangerous state; stopping recording the target game character's real-time location when the target game character exits the dangerous state; and obtaining multiple movement position sequences of the target game character based on the recorded real-time locations and corresponding recording times. This can accurately capture the behavior patterns of the game character in critical states, providing a more realistic and reasonable behavioral reference for the AI character.
[0062] For example, see Figure 3In an asymmetric competitive game, the system sets a variable parameter μ, representing the maximum distance at which the threat character can perceive the survivor. When the distance between the survivor and the threat character is less than or equal to μ / 2, the system determines that the survivor character has entered a "dangerous state" and immediately begins recording the character's real-time location coordinates and corresponding timestamp. During this period, the system continuously tracks and records the character's data until the distance between the survivor and the threat character exceeds μ again and remains in this state for a certain period of time. At this point, the system determines that the survivor character has successfully escaped the dangerous state and stops recording data. The system integrates the position coordinates and time information collected during this dangerous period into a complete movement sequence, representing a successful evasive maneuver. By collecting a large number of such sequences, the system can construct a variety of different path evasion strategies, which serve as the basis for AI behavior control.
[0063] Optionally, a dangerous state refers to a game state in which a character is threatened and requires evasive action. In multiplayer games, dangerous states are typically triggered by the spatial relationship and interaction between characters. Typically, this occurs when the distance between a character and a threatening character (such as a pursuer) falls below a preset threshold. Dangerous states can be determined not only based on simple spatial distance but also by a variety of factors, such as the threatening character's orientation, movement speed, and the use of special abilities. The system comprehensively assesses the character's current risk level based on these factors and triggers a dangerous state when the risk reaches a specific threshold. In dangerous states, characters often need to quickly change their behavior, switching from regular activities (such as repairing equipment or gathering resources) to evasive action. Accurately determining dangerous states is crucial for generating effective evasive action paths, as a player's evasive actions are only valuable in situations of genuine threat. The system can dynamically adjust the threshold for determining dangerous states based on game balance and difficulty settings.
[0064] Optionally, real-time position refers to the coordinate position of the game character in a three-dimensional or two-dimensional game space, typically expressed as (x, y, z) or (x, y) coordinates. Real-time position data is the basic element for constructing a movement trajectory. The system forms a complete movement trajectory by continuously sampling the character's position coordinates at different time points. When recording real-time position, the system uses a fixed or dynamic sampling frequency to ensure that sufficiently detailed movement information is captured. For scenarios with high-speed movement or complex operations, the system may increase the sampling frequency to avoid missing key position changes. Real-time position data not only includes the character's spatial coordinates, but can also include information about the character's status at that location, such as movement speed, direction, and whether interactive operations are in progress. This additional information helps to more fully understand the character's behavior patterns. In addition, in addition to the position coordinate data, each position record must also record the timestamp corresponding to each position to facilitate subsequent timing analysis.
[0065] Optionally, a double confirmation mechanism is used to determine whether a player has escaped a dangerous state, avoiding data fragmentation caused by frequent state switching. The system first detects whether the distance between the target game character and the threatening character exceeds a safety threshold. Once the distance condition is met, the system also needs to verify whether this safe state can be maintained for a certain period of time, usually set as an observation window of 3-5 seconds. Only when the character maintains a safe distance within the observation window does the system officially determine that the player has escaped the dangerous state and stop recording the location. This mechanism effectively avoids the frequent state switching caused by the threatening character wandering near the boundary distance, ensuring that each recorded movement trajectory has complete behavioral semantics. The judgment of escaping the state also takes into account the behavioral changes of the threatening character. If the threatening character significantly changes its target or enters a non-pursuit state, the system will adjust the conditions for escaping the judgment accordingly.
[0066] Optionally, a movement position sequence refers to a collection of location points arranged in chronological order, representing the complete movement trajectory of a game character over a period of time. Each movement position sequence typically contains multiple location points, each consisting of spatial coordinates and a corresponding timestamp, in the form {(x,y,z,t),(x,y,z,t),...,(x,y,z,t)}. The system collects multiple movement position sequences as data samples. These sequences can come from different game matches, different players, or different game scenes of the same player. Multiple movement position sequences can be clustered to identify common behavioral patterns or strategic characteristics.
[0067] In an optional embodiment, multiple temporal paths are generated based on the positional relationship between the movement trajectory and each interaction point in the game scene, including: determining the distance between each real-time position in each movement position sequence and each interaction point in the game scene; if the distance meets a first preset condition, then the interaction point is used as a candidate interaction point corresponding to the real-time position; based on the timing of each candidate interaction point and its corresponding real-time position in its movement position sequence, multiple temporal paths corresponding to each movement position sequence are generated. In this way, by accurately calculating the positional relationship and screening the interaction points that meet the conditions, more reasonable and effective temporal paths can be generated, thereby improving the accuracy of AI character behavior control.
[0068] For example, see Figure 4 , the game system records the formation of two closed moving position sequence data, for each position x in each moving trajectory i Calculate the difference between all white points p j The distance d ij , d ij The calculation method uses Euclidean distance: Among them, d ij is the i-th position x i and the jth white point p jThe Euclidean distance between them. ij <θ, it is considered that the survival character has passed the white point p j , calculate whether all position points meet the conditions one by one, and after the calculation, each position x can be obtained i Is there a corresponding p j The obtained p j The timing used is still based on the corresponding position x i Timing: Based on the timing, we can create a closed line connecting the two white points on the left and right sides of the example. Each line represents a temporal path that reflects the order in which the player actually used the interaction points. By performing the same process on multiple movement position sequences, the system ultimately generates multiple temporal paths for the AI to choose from.
[0069] Optionally, the first preset condition refers to a criterion for determining whether a real-time location point in the movement sequence is associated with a specific interaction point. This is typically expressed as the distance between the two points being less than a specific threshold θ. The setting of this threshold requires consideration of various factors, including the scale of the game scene, the effective interaction distance of the character, and the influence range of the interaction point. In practical applications, the first preset condition can be a fixed value or a dynamic value that varies based on the type of interaction point. For example, a higher threshold might be set for large interaction points (such as doors) and a lower threshold for small interaction points (such as windows). The strictness of the first preset condition directly affects the screening results of candidate interaction points: overly loose conditions can lead to misjudgments, including points that the player has not actually interacted with; overly strict conditions may omit some valid interaction points. The system needs to dynamically adjust the first preset condition based on different game maps, different game modes, or different character types to ensure the accuracy of the screening results. The first preset condition can also take into account time factors, such as requiring the player to stay within a specific distance for a certain period of time before being considered associated with the interaction point.
[0070] Optionally, candidate interaction points are those that meet the first pre-set criteria by comparing them to real-time locations in the mobile location sequence. Candidate interaction points represent interactive facilities that players may have used during actual gameplay and serve as the foundation for constructing temporal paths. Each candidate interaction point contains not only its spatial location information on the game map but also the timestamp of its corresponding real-time location in the mobile location sequence. This temporal association is key to establishing the temporal relationship between interaction points. Candidate interaction points can have various attributes, such as interaction type (window, board, wall, etc.), interaction status (intact, damaged, used, etc.), and interaction intensity (high, medium, low). These attributes influence the subsequent evaluation of the interaction point's value. A real-time location point may be located at a distance from multiple interaction points that all meet the first pre-set criteria. In this case, the system needs to apply additional rules (such as selecting the closest interaction point or based on dwell time) to determine the final candidate interaction point. Conversely, some real-time locations may have no corresponding candidate interaction points, indicating that the player has not performed any interactive actions at those locations. The system retains this many-to-many relationship between location points and candidate interaction points for subsequent analysis.
[0071] Optionally, a temporal path is a sequence of candidate interaction points arranged in chronological order, representing the chronological order of a character's interactions in a specific situation (e.g., when being pursued). Each temporal path has a clear starting point and end point. The starting point is typically the first point a character interacts with after entering a specific behavioral state (e.g., a dangerous state), while the end point is the last point a character interacts with before completing a specific behavior (e.g., successfully avoiding an enemy). Each node (candidate interaction point) in a temporal path has a defined predecessor and successor relationship, which reflects the decision-making patterns and operational habits of high-level players when faced with similar situations. When generating behavioral paths for actual AI characters, after connecting each node sequentially, the starting point and end point can also be connected at the end to form a closed path. This path can then be reused by the AI character to engage with threatening characters. Multiple temporal paths generated by the system may overlap or branch. For example, different paths may share the same starting segment but choose different directions after a fork. Each temporal path can be considered a possible behavioral strategy, and the system selects the optimal path to execute based on the overall value of the path and the current situation. The quality of the timing path directly affects the rationality and anthropomorphism of the AI character's behavior, so the system will continuously collect new high-level player data to enrich and optimize the timing path library.
[0072] In an optional embodiment, the strategic value of an interaction point is determined based on at least one of the following factors: the current availability of the interaction point; environmental characteristics surrounding the interaction point; and the preset attribute level of the interaction point. This multi-dimensional assessment of the strategic value of an interaction point can more comprehensively reflect the actual utility of the interaction point and provide a more accurate basis for route selection.
[0073] For example, the system first determines the factors that affect the strategic value of each interaction point, and establishes a corresponding evaluation score system for different influencing factors. Then, it determines the corresponding scores of different influencing factors based on the current state attributes of the interaction point, and finally determines the current strategic value of the interaction point by combining all factor scores. For example: for the value v of interaction point i i , the calculation formula is v i =F1+F2+F3, where F1, F2, and F3 represent different influencing factors. F1 represents whether the interaction point is destroyed; F2 indicates whether the environment around the interaction point is favorable or dangerous; and F3 represents the strength of the interaction point, with different scores assigned based on the strength. When evaluating the strategic value of a particular wooden board interaction point, the system first checks the board's current usability. If it is destroyed, a -5-point value adjustment is applied; if it is intact, no adjustment is made (0 points). Next, the system analyzes the board's surroundings and finds that a teammate is repairing important equipment nearby. Considering the potential for attracting the attention of a threatening character, the system assigns a -10-point environmental feature adjustment. Finally, based on the board's preset strength level (high-strength board, providing a longer delay), the system grants a +5-point attribute bonus. After comprehensive calculations, the final strategic value of this interaction point is -10 points, indicating that although the board itself has high strength properties, its overall strategic value is low due to its destruction and unfavorable surrounding environment.
[0074] Optionally, the current availability status refers to the specific usage and availability of an interaction point in the real-time game environment, directly impacting its actual value in the current game situation. The availability status of an interaction point is typically categorized into various types, such as intact, partially damaged, and completely destroyed. During gameplay, the availability status of an interaction point changes dynamically based on the interactions of game characters. For example, an intact plank may become unusable after being destroyed by a threatening character, or certain interaction points with a cooldown period may become temporarily unusable after being used. The system monitors and updates the availability status of all interaction points in real time to ensure that value assessments are based on the most up-to-date status. The impact of availability status on the value of an interaction point is often direct and significant: completely unusable interaction points are often assigned extremely low or negative value scores because they provide no evasion or delaying functionality; whereas interaction points in their optimally available state receive a higher base value score. Furthermore, certain special types of interaction points may have multiple availability states, such as those that can be used repeatedly but with diminishing effectiveness. The system adjusts their value score based on their current number of uses and remaining effectiveness.
[0075] Environmental characteristics, which are optional, refer to the game environment surrounding the interaction point, including the layout of the scene, the location and behavior of other game characters, and the distribution of special environmental elements. These factors collectively constitute the context for the interaction point's use. The evaluation of environmental characteristics is a dynamic and multidimensional process, and the system considers multiple environmental factors and their combined effects. First, the presence of nearby friendly characters. If a friendly character is performing an important task (such as repairing equipment) near the interaction point, using that interaction point may attract the attention of a threatening character, thereby disrupting the friendly character. In this case, the system will assign a negative environmental score. Second, terrain and visibility factors, such as whether the interaction point is located in an open area and whether there are shelters providing additional protection, directly impact the safety of the interaction. Third, resource distribution, such as the presence of other interaction points or escape routes nearby, influences the strategic value and substitutability of the interaction point. Furthermore, the distance between the interaction point and key game objectives (such as escape points and resource points) is also a key consideration. The system establishes a composite scoring model that weights various environmental characteristics to produce a comprehensive environmental score. During the game, as the environment changes, the environmental feature scores of the same interaction point will also be adjusted accordingly to ensure the real-time and accuracy of value assessment.
[0076] Optionally, preset attribute levels refer to the inherent characteristics and performance levels of interaction points predefined in the game design, reflecting the fundamental value and functional positioning of the interaction point within the game mechanics. Preset attribute levels are typically determined by game developers during the design phase and serve as an important foundational dimension for evaluating the value of interaction points. Preset attribute levels can be divided according to various criteria, the most common being the strength of the gameplay effect provided by the interaction point, such as high (+5 points), medium (+2 points), and low (-1 point). Interaction points with high attributes typically provide significant gameplay advantages, such as long delays to threatening characters, large-scale line of sight obstruction, or expanded safe zones; interaction points with medium attributes provide moderate effects; and interaction points with low attributes have limited effects and may even have negative consequences in some cases. In addition to the basic strength level, preset attributes may also include special functional attributes, such as certain interaction points that may have unique triggering effects or interaction mechanisms with other systems.
[0077] Optionally, the strategic value of an interaction point can be quantified using a weighted scoring approach, where each influencing factor is assigned a specific weight coefficient and dynamically adjusted based on actual detection results. For example, current availability may carry a larger weight because it directly affects the immediate usability of the interaction point; while preset attribute levels may serve as a stable reference, preventing drastic fluctuations in path evaluation due to short-term changes. This multi-dimensional evaluation mechanism can effectively improve the robustness and stability of path selection. This calculation method is highly flexible and scalable, allowing the system to freely add or subtract evaluation factors based on the complexity of the game mechanics. In actual applications, in addition to the three basic factors (current availability, environmental characteristics, and preset attribute levels), more detailed factors can be considered, such as the historical usage of the interaction point, the complexity of the interaction operation, and synergy with specific character abilities. The system can use either static preset weights or dynamic adaptive weights to assign weights to each factor. Static weights are pre-set by the game designer based on experience and balance considerations; dynamic weights can be adjusted in real time based on game progress, character status, or historical data.
[0078] In an optional embodiment, determining the overall strategic value of each temporal path based on the strategic value of the interaction points includes: for each temporal path, updating the temporal relationship of each interaction point on the temporal path based on the access feasibility of each interaction point on the temporal path; determining the temporal value of each interaction point based on the updated temporal relationship and the strategic value of each interaction point; and determining the overall strategic value of the temporal path based on the temporal value of each interaction point. In this way, by comprehensively considering the access feasibility and strategic value of the interaction points, the overall utility of the temporal path can be more accurately assessed, providing a more scientific decision-making basis for path selection.
[0079] For example, when a game character is threatened, the system dynamically adjusts the order of multiple interaction points in the temporal path based on their strategic value and access feasibility, and assigns a corresponding temporal value to each interaction point. For example, the system performs an overall strategic value assessment on a temporal path consisting of a wooden board, a window, and a wall. The initial access sequence of each interaction point on this temporal path is wall → wooden board → window. The system detects that the second interaction point on the path (the wooden board) has the highest access feasibility, so it updates the original temporal relationship, advancing the access sequence of the wooden board to become the first access point on the path, and updating the access sequence of the interaction points on the path to wooden board → window → wall. Next, based on the updated temporal relationship and combining the strategic value of each interaction point (wooden board: +3 points, window: +5 points, wall: +2 points), the system calculates the temporal value of each interaction point under the new temporal relationship. Taking into account the time decay factor, the system uses the decay coefficient α = 0.8, and calculates the time value of the wood board to be 3 points, the time value of the window to be 5 × 0.8 = 4 points, and the time value of the wall to be 2 × 0.8 2 = 1.28 points. Finally, the system adds up these timing values and obtains the overall strategic value of the timing path as 8.28 points.
[0080] Optionally, the temporal relationship of interaction points refers to the order and relative position of the interaction points along the temporal path, formed by the chronological arrangement of the interaction points. This relationship reflects the order in which the game character should visit these interaction points. The process of updating the temporal relationship of the interaction points along each temporal path involves optimizing the order of the interaction points within the path to adapt to real-time environmental changes and security requirements. This process typically determines which interaction points are more suitable for priority access based on access feasibility information for each interaction point, such as time difference and the presence of interception points. For example, if an interaction point has high strategic value but low access feasibility (e.g., a supervisor may arrive before the character), the access order position of the interaction point may be moved back or removed from the path. There are many ways to rearrange the access order of interaction points. A common strategy is to prioritize access to interaction points with high access feasibility and postpone access to interaction points with low access feasibility, or to select only the interaction point with the highest access feasibility as the first access interaction point, while preserving the adjacent relationship between the interaction points, or to completely skip interaction points with extremely low access feasibility. This disclosure does not limit this. This dynamic adjustment mechanism ensures the timeliness and safety of the path, while avoiding invalid or dangerous behaviors caused by static path planning.
[0081] Optionally, the updated temporal relationship of the interaction points will serve as the basis for subsequent calculations to generate the temporal value of each interaction point. Optionally, the temporal value refers to the actual value of the interaction point at a specific temporal position, which comprehensively considers the strategic value of the interaction point itself and the influence of its position in the temporal path. The temporal value is closely related to the position of the interaction point in the path. The same interaction point may have different temporal values at different temporal positions. The calculation of the temporal value usually adopts an attenuation model, that is, the value of the interaction point at the later position in the path will be multiplied by an attenuation coefficient α less than 1. The formula is α (n-1) v n , where v n represents the strategic value of the nth interaction point on the temporal path, and α represents the decay coefficient (0<α<1). This decay mechanism reflects the concept of time value in the game: currently or recently accessible interaction points are more valuable than distant interaction points, because the game context may change at any time and long-term planning involves more uncertainty. The calculation of temporal value not only considers time decay but also the synergistic effects between interaction points. For example, the combined use of certain interaction points may generate additional strategic value, and this synergistic effect will be reflected in the temporal value calculation. The system may set different decay coefficients for different types of interaction points to reflect the different characteristics of their value changes over time.
[0082] Alternatively, determining the overall strategic value of a temporal path based on the temporal value of each interaction point is a comprehensive evaluation method that aims to reflect the potential and practicality of the entire path in a specific context. The overall strategic value is usually calculated using a weighted summation method, where the temporal value of each interaction point is linearly combined according to its importance. For example, the following formula is used: V i =v1+αv2+α 2 v3+…α (n-1) v n , where α is a constant between 0 and 1, V i represents the overall strategic value of the i-th time sequence path, v n represents the strategic value of the nth interaction point on the temporal path, and v1 represents the strategic value of the first access interaction point corresponding to the temporal connection graph, determined based on the access feasibility of each interaction point. In certain game mechanics, the overall strategic value of a path may not simply be a linear combination of the values of each point, but also need to consider the synergies or conflicts between interaction points. For example, some combinations of interaction points may generate additional strategic value, while others may offset each other. The system may also consider the completeness and coherence of the path, imposing appropriate value penalties on paths that contain breakpoints or require detours.
[0083] In an optional embodiment, the access feasibility of an interaction point is determined by: determining a first time difference between the game character and the threat character arriving at the interaction point; determining whether there is an interception point on the line connecting the game character and the interaction point, where the interception point is the projection of the threat character onto the line; if the interception point exists, determining a second time difference between the game character and the threat character arriving at the interception point; and determining the access feasibility of the interaction point based on either the first time difference, or the first and second time differences. This dual time difference assessment mechanism allows for more accurate assessment of the safety and accessibility of the interaction point, improving the reliability of character behavior decisions.
[0084] For example, when a survivor character needs to assess the feasibility of accessing a window interaction point ahead, the system first calculates that it takes the survivor character 5 seconds to reach the window, while it takes the threat character 7 seconds, resulting in a first time difference of 2 seconds (7-5=2), indicating that the survivor character can reach the window earlier than the threat character. Next, the system analyzes the line connecting the survivor character and the window and discovers that the threat character's current position projects onto this line, forming an interception point. The system calculates that it takes the survivor character 2 seconds to reach this interception point, while it takes the threat character 3 seconds, resulting in a second time difference of 1 second (3-2=1). The system uses the smaller of the two time differences, 1 second, as the final assessment basis and determines the feasibility of accessing this window interaction point as "medium risk." While the survivor character can reach the interception point and the window before the threat character, the time advantage is small, posing a certain risk.
[0085] Optionally, the calculation of the "first time difference" parameter involves the absolute time required for the game character and the threat character to reach the target interaction point, and the difference between the two is used as the basis for comparison. This calculation method usually relies on real-time character position data, speed estimation model, and obstacle information in the map. For example, the game character and the threat character are located on either side of the interaction point, and their distances to the interaction point are D_ s and D_ m , and their moving speeds are v_ s and v_ m , then the first time difference is T_1=(D_ m / v_ m )-(D_ s / v_ s If T_1 is greater than 0, it indicates that the threat character arrives at the interaction point later than the game character. Therefore, the game character can arrive first and use the interaction point for evasive or tactical maneuvers. Conversely, if T_1 is less than or equal to 0, it indicates that the threat character has a higher arrival priority. In this case, the access risk of this interaction point is higher, and it is necessary to carefully consider whether to include it in path planning.
[0086] Optionally, the "interception point" is determined based on the spatial position of the threat character relative to the line connecting the game character and the interaction point. Figure 5 , the system will use the position of the threatening character as the starting point and draw a perpendicular line to the direction of the line connecting the game character and the interaction point. The intersection of the perpendicular line and the line is the potential interception point. This process is essentially a three-dimensional geometric calculation problem and can be implemented through vector operations. For example, let the position of the game character be P_ s , the interaction point is P_ p , the threat role position is P_ m , then we can construct the vector V_ sp =P_ p -P_ s , and the vector V_ sm =P_ m -P_ s Next, calculate the vector V_ sm In V_ sp The projection length L on the intercept point is determined according to the projection length P_ i =P_ s +L*V_ sp / |V_ sp Once the interception point is determined, the time difference between the game character and the threat character arriving at that point can be calculated to determine the risk of interception. This geometric projection-based interception point identification mechanism effectively covers interception possibilities in a variety of complex scenarios, avoiding misjudgments or missed detections due to simple time difference analysis.
[0087] Optionally, the "second time difference" is a supplementary judgment made on the location of the interception point, used to verify whether the game character can still maintain a relative advantage even at non-target interaction points. For example, in some cases, although the threat character cannot arrive at the target interaction point first, it may try to change its own route through other means (such as detours, acceleration) on the way to the point, thereby shortening the actual arrival time. In this case, the time difference of the target interaction point alone is not enough to fully reflect the overall situation, so it is necessary to additionally introduce the time difference of the interception point to enhance the accuracy of the assessment. Specifically, if the threat character still cannot arrive before the game character at the interception point, it can be considered that the overall access risk of the interaction point is low and suitable for subsequent path planning. Conversely, if the time difference at the interception point is negative, it means that the threat character already has a certain interception capability before reaching the target interaction point, which may cause the game character to be forced to interrupt or adjust the original path while approaching the target interaction point.
[0088] Optionally, the process of determining the access feasibility of the interaction point based on the first time difference and the second time difference involves multiple algorithms and strategies. The most commonly used method is to take the minimum of the two time differences as the main basis for access feasibility, that is, min(T_ diff1 , T_ diff2 ), which embodies the "barrel principle"—the overall security of the system depends on the weakest link. The larger this minimum value, the higher the access feasibility of the interaction point. Specifically, the system may divide the access feasibility into multiple levels based on this minimum value, for example: greater than 3 seconds is "high security", 1-3 seconds is "medium security", 0-1 second is "low security", and less than 0 seconds is "inaccessible". In more complex implementations, the system may not simply take the minimum value, but instead use a weighted average or other combination function, for example: feasibility = w1×T_ diff1 +w2×T_ diff2 , where w1 and w2 are weight coefficients, reflecting the relative importance of the two time differences in decision making. Figure 6 As shown, the interception point may be located on the extension of the line connecting the game character and the interaction point, or in the opposite direction of the line. These situations generally do not constitute an actual interception risk. Therefore, the system checks whether the calculated interception point is located on the line segment between the game character and the interaction point. Only in this case is it considered a valid interception point. When there is no valid interception point, that is, when there is no interception risk, the access feasibility of the interaction point is determined solely based on the first time difference. In addition to the time difference itself, the system may also consider other factors to adjust the access feasibility assessment, such as the character's special abilities (some characters may have the ability to sprint quickly or pass through walls), terrain characteristics (some terrain may provide additional movement speed or obstruct vision), and the behavior patterns of threatening characters (some threatening characters may have more predictable pursuit strategies). This forms a more comprehensive path evaluation system, thereby improving the rationality and robustness of overall behavior control.
[0089] In an optional embodiment, a target temporal path and the access timing of the interaction points on the path are determined based on the overall strategic value of the temporal path and the access feasibility of each interaction point. This includes: determining the access timing of the interaction points on each temporal path and the corresponding first access interaction point based on the updated timing of each interaction point; and determining the target temporal path based on the overall strategic value of each temporal path and the access feasibility of its corresponding first access interaction point. In this way, by comprehensively considering the overall strategic value of the temporal path and the security of the first access interaction point, the system can select the optimal execution plan from among numerous candidate paths, ensuring the long-term strategic value of the path while ensuring that the game character can safely begin executing the path, thereby improving the behavioral rationality and survivability of the AI-controlled character.
[0090] For example, when a game character needs to avoid a threat, the system first ranks all available temporal paths, each consisting of a sequential access sequence consisting of multiple interaction points. The system prioritizes paths with high overall strategic value and a high access feasibility for the first interaction point in the path as candidates. For example, in a scenario, the access sequence for path A is window 1, board 2, window 3, while the access sequence for path B is board 1, window 2, board 3. The system identifies that the access feasibility time difference for the first access interaction point, window 1, on path A is 3 seconds, while the access feasibility time difference for the first access interaction point, board 1, on path B is 5 seconds. The system then evaluates path A's overall strategic value of 35 points and the access feasibility time difference of Window 1, and path B's overall strategic value of 28 points and the access feasibility time difference of board 1, 5 seconds. Through weighted calculation, the system determines path A as the target temporal path and controls the game character to perform avoidance actions according to the sequence of window 1, board 2, and window 3.
[0091] Optionally, the specific implementation of the operation of "updated timing of each interaction point" involves dynamic adjustment of the original interaction point order to adapt to the threat changes and path feasibility requirements in the current environment. This adjustment is usually based on the access feasibility information of each interaction point, such as time difference, interception risk, etc., to decide whether to rearrange or eliminate certain interaction points. There are many ways to rearrange the access order of interaction points. The specific methods can be found in the same part above, which will not be repeated here, and this disclosure does not limit this. This dynamic adjustment mechanism ensures the timeliness and security of the path.
[0092] Optionally, the selection of the "first access interaction point" is one of the key steps in the entire path selection process, which directly affects the feasibility and efficiency of the entire path. In order to select the optimal first access interaction point, the system will comprehensively consider the strategic value of the interaction point and the interception risk. For example, in a certain scenario, the system may face two options: one is a high-value but low-security interaction point, and the other is a medium-value but high-security interaction point. At this time, the system will give priority to the latter, because even if its immediate benefits are lower, it can ensure the smooth execution of subsequent paths, thereby achieving longer-term strategic goals. In addition, if the access feasibility of all candidate interaction points is lower than the threshold, the system will abandon the current path and look for other alternatives to ensure that the role is always under control.
[0093] Alternatively, a comprehensive judgment mechanism based on overall strategic value and the access feasibility of the first access interaction point is a multi-dimensional path evaluation method that can flexibly adjust path selection criteria in complex environments to adapt to changing game situations. During path selection, the system constructs a comprehensive scoring model for each candidate temporal path, combining the overall strategic value and the access feasibility of the first access interaction point according to preset weights. The strategic value weight reflects the emphasis on long-term benefits, while the access feasibility weight reflects the level of concern for immediate safety. Dynamic adjustment of these weights can adapt to different game scenarios and strategic requirements. For example, in a relatively safe game environment, the system may prefer paths with high strategic value. However, in high-risk environments, the weight of access feasibility is significantly increased, prioritizing the safety of the game character and reducing the possibility of failure. This approach not only improves the robustness of path selection but also enhances the anthropomorphism of AI behavior, enabling it to display more natural and reasonable strategies when facing different challenges.
[0094] In an optional embodiment, before determining the overall strategic value of each temporal path based on the strategic value of the interaction points, the following steps may be performed: if the access feasibility of all interaction points on the temporal path does not meet the second preset condition, the temporal path is abandoned; if no temporal path is available, the interaction point closest to the game character is selected as the emergency target point; and the game character is controlled to move toward the emergency target point. In this way, by establishing an emergency handling mechanism, the game character can still take reasonable actions when no path is available, avoiding the character from being unable to act, thereby improving the smoothness of the gaming experience.
[0095] Exemplarily, before the system evaluates the overall strategic value of multiple sequential paths, it first checks whether the access feasibility of each interaction point in each path meets the preset safety standards. For example, in a certain scenario, there are three candidate paths A, B, and C. The access feasibility of the three interaction points on path A are 0.2, 0.3, and 0.1, respectively, which are all lower than the set safety threshold of 0.5 (i.e., the second preset condition). Therefore, the system abandons path A; the access feasibility of two interaction points on path B is 0.4 and 0.3, which also do not meet the conditions and are abandoned; the access feasibility of the interaction points on path C are all lower than 0.5, and the system abandons all candidate sequential paths. At this time, the system activates the emergency mechanism, scans all interaction points in the game scene, and calculates that the closest one to the game character is a window located 10 meters to the left. The window is set as the emergency target point, and the character is controlled to go to the point immediately to avoid the threat.
[0096] Optionally, the specific setting of the judgment criterion of "second preset condition" can be dynamically adjusted according to factors such as the complexity of the game scene, the action capability of the threatening character, and the importance of the interaction point. Usually, this condition is a quantitative indicator, such as time difference, interception probability or accessibility score, which is used to measure whether the interaction point is safe enough for the character to use. For example, in a scene with high confrontation intensity, the system may set the second preset condition to a time difference of greater than or equal to 5 seconds, which means that only those interaction points where the game character arrives at least 5 seconds earlier than the threatening character are considered available; in scenes with low confrontation intensity, the condition may be relaxed to a time difference of greater than or equal to 2 seconds. This flexible condition setting ensures that the path screening mechanism is neither too conservative, resulting in path loss, nor too loose, resulting in potential risks.
[0097] The optional "abandon this timing path" action is a path elimination measure taken by the system after it determines that the path does not have basic safety. Its purpose is to prevent the AI character from failing or exposing itself by executing an unreliable path. Specifically, the system checks the access feasibility of each interaction point in the path one by one and summarizes the judgment results. If the access feasibility of all interaction points does not meet the second preset condition, the system will mark the path as invalid and remove it from the candidate list.
[0098] The optional "selecting the closest interaction point to the character as a temporary target" action is a fallback strategy activated by the system when all sequential paths are unavailable. This strategy aims to quickly respond to emergencies and minimize the character's exposure time. For example, in an extreme situation where the system detects that all paths have failed due to the close proximity of the threat character, it immediately switches to emergency mode and selects the nearest undamaged interaction point to the character's current location as a temporary target. This interaction point selection is typically based on real-time distance calculation and availability verification. For example, the system prioritizes undamaged wooden planks or windows over other interaction point types. Furthermore, this action may also be optimized based on the threat character's current location and movement trends, potentially selecting locations that are difficult for the threat character to reach directly, further reducing risk. Once the target point is selected, the system will immediately control the character to move toward it. Upon arrival, the system will reassess the current situation and decide on the next course of action.
[0099] Through the technical solutions publicly provided above, it is possible to generate time-series paths based on the historical data of high-level players, and to evaluate the value of these paths, while taking into account the access feasibility of the interaction points, so as to select the optimal time-series paths and access points to control the behavior of game characters. This method comprehensively considers multiple factors such as the current state of the interaction point, the characteristics of the surrounding environment, and the preset attributes when calculating the strategic value of the interaction point, and takes into account the balance between long-term value and current value when evaluating the overall value of the path, so that AI-controlled game characters can simulate the behavior patterns of high-level players and produce more intelligent and reasonable game character behavior decisions. This path selection method based on player data and multi-factor evaluation greatly improves the anthropomorphism and intelligence level of the game AI, reduces the computing pressure on the server, and improves the player's gaming experience.
[0100] Corresponding to the above method embodiment, the embodiment of the present invention provides a game character behavior control device, see Figure 7 The game character behavior control device includes: a path acquisition module, which is used to obtain multiple time-series paths generated based on interaction points in the game scene, where the interaction points are scene components that can be interacted with by the game character; a parameter determination module, which is used to determine the strategic value and access feasibility of each interaction point on each time-series path; a path evaluation module, which is used to determine the overall strategic value of each time-series path based on the strategic value of the interaction point; a path selection module, which is used to determine the target time-series path and the access timing of the interaction points on the path based on the overall strategic value of the time-series path and the access feasibility of each interaction point; and a behavior control module, which is used to control the game character to perform the target behavior based on the target time-series path and the access timing of the interaction points on the path.
[0101] In an optional embodiment, the path acquisition module includes: a trajectory determination unit, used to determine the movement trajectory of the target game character in the target behavior state from historical game data; and a path generation unit, used to generate multiple time-series paths based on the positional relationship between the movement trajectory and each interaction point in the game scene.
[0102] In an optional embodiment, the trajectory determination unit includes: a recording trigger subunit, which is used to start recording the real-time position of the target game character when it is detected that the target game character enters a dangerous state; a recording stop subunit, which is used to stop recording the real-time position of the target game character when it is detected that the target game character is out of the dangerous state; and a sequence generation subunit, which is used to obtain multiple moving position sequences of the target game character based on the recorded real-time positions and the corresponding recording times.
[0103] In an optional embodiment, the path generation unit includes: a distance calculation subunit, used to determine the distance between each real-time position in each mobile position sequence and each interaction point in the game scene; a candidate interaction point determination subunit, used to use the interaction point as a candidate interaction point corresponding to the real-time position when the distance meets a first preset condition; and a timing path generation subunit, used to generate multiple timing paths corresponding to each mobile position sequence based on the timing of each candidate interaction point and its corresponding real-time position in its mobile position sequence.
[0104] In an optional embodiment, the parameter determination module includes: a value evaluation unit for determining the strategic value of the interaction point based on at least one of the following factors: the current availability status of the interaction point, the environmental characteristics around the interaction point, and the preset attribute level of the interaction point.
[0105] In an optional embodiment, the path evaluation module includes: a timing update unit, which is used to update the timing relationship of each interaction point on each timing path based on the access feasibility of each interaction point on the timing path; a timing value calculation unit, which is used to determine the timing value of each interaction point based on the updated timing of each interaction point and the strategic value of each interaction point; and an overall value evaluation unit, which is used to determine the overall strategic value of the timing path based on the timing value of each interaction point.
[0106] In an optional embodiment, the path selection module includes: a timing determination unit, which is used to determine the access timing of the interaction points on each timing path and the corresponding first access interaction point based on the updated timing of each interaction point; a path decision unit, which is used to determine the target timing path based on the overall strategic value of each timing path and the access feasibility of its corresponding first access interaction point.
[0107] In an optional embodiment, the parameter determination module includes a feasibility calculation unit for determining the access feasibility of the interaction point in the following manner: determining a first time difference between the game character and the threat character arriving at the interaction point; determining whether there is an interception point on the line connecting the game character and the interaction point, the interception point being the projection point of the threat character on the line; if there is an interception point, determining a second time difference between the game character and the threat character arriving at the interception point; determining the access feasibility of the interaction point based on the first time difference, or the first time difference and the second time difference.
[0108] In an optional embodiment, it also includes: a path deletion module, which is used to abandon the timing path when the access feasibility of all interaction points on the timing path does not meet the second preset condition; an emergency processing module, which is used to select the interaction point closest to the game character as the emergency target point when there is no available timing path; and control the game character to move toward the emergency target point.
[0109] The game character behavior control device provided in the embodiment of the present disclosure has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding content in the aforementioned method embodiment.
[0110] It should be noted that although several units / modules or sub-units / modules of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules.
[0111] The embodiment of the present invention further provides an electronic device, such as Figure 8 The electronic device includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor. The processor executes the computer-executable instructions to implement any of the game character behavior control methods in the embodiments of the present disclosure. The specific implementation method and the resulting technical effects are described in the method embodiments and will not be repeated here.
[0112] Figure 8 1 is a schematic diagram of the structure of an electronic device. The electronic device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0113] The processor 1101 is the control center of the electronic device 1100. It uses various interfaces and lines to connect the various parts of the entire electronic device 1100. By running or loading software programs and / or modules stored in the memory 1102 and calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby monitoring the electronic device 1100 as a whole.
[0114] Optionally, the electronic device 1100 further includes: a touch screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107, respectively. Those skilled in the art will appreciate that Figure 8The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0115] The present invention also provides a computer-readable storage medium storing a computer program configured to execute any of the game character behavior control methods of the present invention when executed by a processor. The specific implementation methods and resulting technical effects are described in the method embodiments and are not further detailed here.
[0116] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, terminal device, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0117] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0118] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for controlling the behavior of a game character, characterized in that: include: Obtaining multiple temporal paths generated based on interaction points in the game scene, where the interaction points are scene components that can be interacted with by game characters; Determine the strategic value and access feasibility of each interaction point on each temporal path; Determining the overall strategic value of each temporal path based on the strategic value of the interaction point; Determine the target timing path and the access timing of the interaction points on the path based on the overall strategic value of the timing path and the access feasibility of each interaction point; Control the game character to execute the target behavior based on the target timing path and the interaction point access timing on the path.
2. The method according to claim 1, characterized in that The obtaining of multiple time sequence paths generated based on interaction points in the game scene includes: Determine the movement trajectory of the target game character in the target behavior state from historical game data; A plurality of temporal paths are generated according to the positional relationship between the movement trajectory and each interaction point in the game scene.
3. The method according to claim 2, characterized in that Determining the movement trajectory of the target game character in the target behavior state from the historical game data includes: When the target game character is detected to be in a dangerous state, the real-time position of the target game character is recorded; When it is detected that the target game character is out of danger, stop recording the real-time position of the target game character; A plurality of movement position sequences of the target game character are obtained based on the recorded real-time positions and the corresponding recording times.
4. The method according to claim 3, characterized in that The method of generating multiple time-series paths based on the positional relationship between the movement trajectory and each interaction point in the game scene includes: Determine the distance between each real-time position in each mobile position sequence and each interaction point in the game scene; If the distance satisfies a first preset condition, the interaction point is used as a candidate interaction point corresponding to the real-time position; Based on the time sequence of each candidate interaction point and its corresponding real-time position in its mobile position sequence, a plurality of time sequence paths corresponding to each mobile position sequence are generated.
5. The method according to claim 1, wherein The strategic value of the interaction point is determined based on at least one of the following factors: The current available status of the interaction point; Environmental characteristics surrounding the interaction point; The preset attribute level of the interaction point.
6. The method according to claim 1, wherein Determining the overall strategic value of each timing path based on the strategic value of the interaction point includes: For each timing path, the timing relationship of each interaction point on the timing path is updated based on the access feasibility of each interaction point on the timing path; Determine the timing value of each interaction point based on the updated timing of each interaction point and the strategic value of each interaction point; Based on the timing value of each interaction point, the overall strategic value of the timing path is determined.
7. The method according to claim 1, characterized in that The access feasibility of the interaction point is determined by: determining a first time difference between the game character and the threat character arriving at the interaction point; Determine whether there is an interception point on the line connecting the game character and the interaction point, the interception point being a projection point of the threatening character on the line; If the interception point exists, determining a second time difference between the game character and the threatening character arriving at the interception point; The access feasibility of the interaction point is determined based on the first time difference, or the first time difference and the second time difference.
8. The method according to claim 6, characterized in that The determining of the target timing path and the access timing of the interaction points on the path based on the overall strategic value of the timing path and the access feasibility of each interaction point includes: Determine the access timing of the interaction points on each timing path and the corresponding first access interaction point based on the updated timing of each interaction point; The target timing path is determined based on the overall strategic value of each timing path and the access feasibility of its corresponding first access interaction point.
9. The method according to claim 1, characterized in that Before determining the overall strategic value of each timing path based on the strategic value of the interaction point, the method further includes: If the access feasibility of all interaction points on the timing path does not meet the second preset condition, the timing path is abandoned; If there is no available temporal path, the interaction point closest to the game character is selected as the emergency target point; Control the game character to move toward the emergency target point.
10. A game character behavior control device, characterized in that: include: A path acquisition module is used to acquire multiple temporal paths generated based on interaction points in the game scene, where the interaction points are scene components that can be interacted with by game characters; Parameter determination module, used to determine the strategic value and access feasibility of each interaction point on each timing path; a path evaluation module, configured to determine an overall strategic value of each temporal path based on the strategic value of the interaction point; A path selection module, configured to determine a target time sequence path and an access timing of the interaction points on the path based on the overall strategic value of the time sequence path and the access feasibility of each interaction point; The behavior control module is used to control the game character to perform the target behavior based on the target timing path and the interaction point access timing on the path.
11. An electronic device, characterized in that: include: a memory storing computer-executable instructions that can be executed by a processor; A processor, configured to execute the computer-executable instructions to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that A computer program is stored, and when the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Role combat interaction method and device, equipment and medium
CN121550675A