Method, device and electronic device for controlling character behavior in football games

By obtaining the current position and environmental information of the role of the ball in football games, combining the ability of the stadium value area to evaluate the behavior ability, determine the target behavior, solve the problem of simple and fixed players in the existing technology, and achieve a more reasonable and random player. Behavior control enhances the real sense of the game.

CN114225396BActive Publication Date: 2025-01-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111506365.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-01-28
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

The lack of rationality and randomness of player behavior selection in existing football games, resulting in the behavioral performance being too simple and fixed, and it is impossible to truly simulate the random situation in football games.

Method used

By obtaining the current position and environmental information of the ball character, combined with the preset stadium value area, the ability to evaluate the ball character when performing different behaviors, determine the target behavior to control the behavior of the ball character in the game scene.

Benefits of technology

Realize the rationality and randomness of the player behavior, enhance the real sense and player experience in the game, and can control the player behavior more reasonably and randomly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114225396B_ABST
    Figure CN114225396B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and electronic device for controlling the behavior of a character in a football game, the method comprising: obtaining the first current position and current environment information corresponding to the character with the ball in the game scene in the current control cycle; determining the first ability evaluation values ​​corresponding to the character with the ball when performing multiple specified behaviors according to the first current position, the current environment information and the preset court value area; the court value area includes multiple sub-areas with corresponding regional values ​​evenly divided in the court; the multiple specified behaviors include: dribbling behavior, passing behavior and shooting behavior; determining the specified behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with the ball in the next control cycle, so as to control the character with the ball to perform the target behavior in the game scene. The present application can solve the problems of rationality and randomness of player behavior selection in football games.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game design technology, and in particular to a method, device and electronic equipment for controlling the behavior of a character in a football game. Background Art

[0002] In the process of football game design, the performance of the game is important and fundamental. In the 3D game performance screen, the movement of characters (players, referees) is the key to the performance of the game, that is, the AI ​​behavior design of the football game. Its purpose is to set basic football rules as the basis of the game battle and simulate the real and comprehensive football game process. Design an intelligent system that can show smooth games, thereby providing game players with a pleasant experience.

[0003] Currently, the football games on the market are mainly card games, and the AI ​​in the game is also based on simple calculations. Players mainly perform simple shooting, passing, dribbling, stealing, and saving. The behaviors of players in the game are relatively simple and basic, and in many cases, players cannot perform their behaviors reasonably, such as choosing to pass the ball when they should shoot, and choosing to dribble the ball when they should pass the ball. In addition, the tactics of players in the game are relatively fixed, which cannot reflect the random situations in real games. Summary of the invention

[0004] The purpose of the present application is to provide a method, device and electronic equipment for controlling character behavior in a football game, which can solve the problems of rationality and randomness of player behavior selection in a football game.

[0005] In a first aspect, an embodiment of the present application provides a method for controlling character behavior in a football game, the method comprising: obtaining a first current position and current environmental information corresponding to a character with a ball in a game scene in a current control cycle, the character with a ball being a non-player controlled character NPC in the game scene who has control over the football; determining first ability evaluation values ​​corresponding to the character with a ball when performing a plurality of designated behaviors according to the first current position, the current environmental information and a preset stadium value area; the stadium value area comprises a plurality of sub-areas with corresponding regional values ​​evenly divided in the stadium; the plurality of designated behaviors comprise: dribbling behavior, passing behavior and shooting behavior; determining the designated behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with a ball in the next control cycle, so as to control the character with a ball to perform the target behavior in the game scene.

[0006] Furthermore, the above-mentioned step of determining a first ability evaluation value corresponding to the dribbling character when performing dribbling behavior based on the first current position and current environmental information includes: determining an optional dribbling area corresponding to the dribbling character based on the first current position and the court value area; for each optional dribbling area, determining a second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area based on the area value corresponding to the optional dribbling area, the dribbling ability attribute of the dribbling character, and the current environmental information; and determining the highest second ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing dribbling behavior.

[0007] Furthermore, the above-mentioned step of determining the optional dribbling area corresponding to the dribbling character based on the first current position and the court value area includes: determining a first target sub-area corresponding to the first current position from the court value area; and determining an adjacent sub-area corresponding to the first target sub-area as the optional dribbling area corresponding to the dribbling character.

[0008] Further, the above-mentioned current environmental information includes: the number of defensive players in the optional dribbling area; the step of determining a second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the area value corresponding to the optional dribbling area, the dribbling ability attribute of the dribbling character, and the current environmental information, including: determining the area value corresponding to the optional dribbling area as the dribbling area value when the dribbling character dribbles the ball to the optional dribbling area; determining the dribbling ability value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the dribbling ability attribute of the dribbling character and the preset correspondence between the dribbling ability and the score; determining the dribbling environment value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the number of defensive players in the optional dribbling area and the preset correspondence between the number of defensive players and the score; and summing the dribbling area value, the dribbling ability value, and the dribbling environment value to obtain the second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area.

[0009] Furthermore, the above-mentioned current environmental information includes: a second current position of a player character who is on the same team as the dribbling character, and at least one of the following environmental parameters: a route distance between the first current position and the second current position, the number of defensive players on the route, and the orientation of the player character; a step of determining a first ability evaluation value corresponding to the dribbling character when performing a passing behavior based on the first current position and the current environmental information, comprising: determining an optional passing area corresponding to the dribbling character based on the second current position and the court value area; for each optional passing area, determining a third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area based on the area value corresponding to the optional passing area, the passing ability attributes of the dribbling character, and the environmental parameters; and determining the highest third ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing a passing behavior.

[0010] Furthermore, the above-mentioned step of determining the optional passing area corresponding to the dribbling character based on the second current position and the court value area includes: determining the second target sub-area corresponding to each second current position from the court value area; and determining all or all second target sub-areas within a preset range as the optional dribbling area corresponding to the dribbling character.

[0011] Furthermore, the above-mentioned step of determining the third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area based on the area value corresponding to the optional passing area, the passing ability attribute of the dribbling character, and the environmental parameters includes: determining the area value corresponding to the optional passing area as the area value when the dribbling character passes the ball to the optional passing area; determining the passing ability value corresponding to the dribbling character passing the ball to the optional passing area based on the passing ability attribute of the dribbling character and the preset corresponding relationship between the passing ability and the score; determining the passing environment value corresponding to the dribbling character passing the ball to the optional passing area based on the environmental parameters corresponding to the optional passing area and the preset corresponding relationship between the environmental parameter numerical range and the score; and summing the area value, the passing ability value, and the passing environment value to obtain the third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area.

[0012] Further, the above-mentioned current environmental information includes: including at least one of the following shooting environmental parameters: the number of defensive players, the angle between the first current position and the two sides of the goal, and the distance between the first current position and the goal; according to the first current position and the current environmental information, the step of determining the first ability evaluation value corresponding to the character with the ball when performing the shooting behavior includes: determining the area value corresponding to the character with the ball when performing the shooting behavior according to the first current position and the court value area; determining the shooting ability value corresponding to the character with the ball when performing the shooting behavior according to the shooting ability attribute of the character with the ball; determining the shooting environment value corresponding to the character with the ball when performing the shooting behavior according to the shooting environment parameters and the preset shooting environment parameter numerical segment and score correspondence; summing the area value, shooting ability value and shooting environment value to obtain the first ability evaluation value corresponding to the character with the ball when performing the shooting behavior.

[0013] Furthermore, the above-mentioned step of determining the area value corresponding to the character with the ball when performing a shooting action based on the first current position and the court value area includes: determining a third target sub-area corresponding to the first current position from the court value area; and determining the area value corresponding to the third target sub-area as the area value corresponding to the character with the ball when performing a shooting action.

[0014] Furthermore, the above-mentioned shooting environment parameters include: the distance between the first current position and the goal; the step of determining the shooting ability value corresponding to when the dribbling character performs a shooting behavior based on the shooting ability attribute of the dribbling character, including: determining the corresponding relationship between the corresponding shooting ability value segment and the score based on the first current position and the goal distance; determining the target score corresponding to the target shooting ability value segment to which the shooting ability attribute belongs; and determining the target score as the shooting ability value corresponding to when the dribbling character performs a shooting behavior.

[0015] Furthermore, after the above-mentioned step of determining the first ability evaluation values ​​corresponding to the dribbling character when performing multiple designated behaviors based on the first current position, current environmental information and a preset court value area, it also includes: if at least two of the first ability evaluation values ​​corresponding to the dribbling character when performing multiple designated behaviors are the same, determining the target behavior corresponding to the dribbling character according to the preset priority corresponding to the designated behavior in the current scene.

[0016] In a second aspect, an embodiment of the present application also provides a character behavior control device in a football game, the device comprising: an information acquisition module, used to obtain a first current position and current environmental information corresponding to a character with a ball in a game scene in a current control cycle, the character with a ball being a non-player controlled character NPC in the game scene who has control over the football; an evaluation value determination module, used to determine the first ability evaluation values ​​corresponding to the character with a ball when performing a plurality of designated behaviors according to the first current position, the current environmental information and a preset stadium value area; the stadium value area comprises a plurality of sub-areas with corresponding regional values ​​evenly divided in the stadium; the plurality of designated behaviors comprise: dribbling behavior, passing behavior and shooting behavior; a target behavior determination module, used to determine the designated behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with a ball in the next control cycle, so as to control the character with a ball to perform the target behavior in the game scene.

[0017] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method described in the first aspect above.

[0018] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method described in the first aspect above.

[0019] In the method, device and electronic device for controlling the behavior of a character in a football game provided by the embodiment of the present application, firstly, the first current position and current environment information corresponding to the character with the ball in the game scene in the current control cycle are obtained, and the character with the ball is a non-player controlled character NPC with control over the football in the game scene; then, according to the first current position, the current environment information and the preset court value area, the first ability evaluation values ​​corresponding to the character with the ball when performing multiple specified behaviors are determined; the court value area includes multiple sub-areas with corresponding regional values ​​evenly divided in the court, which are used to calculate the evaluation value, and the above-mentioned multiple specified behaviors include: dribbling behavior, passing behavior and shooting behavior; the specified behavior corresponding to the highest first ability evaluation value is determined as the target behavior corresponding to the character with the ball in the next control cycle, so as to control the character with the ball to perform the target behavior in the game scene. The embodiment of the present application can evaluate the ability value of dribbling behavior, passing behavior and shooting behavior in real time according to the current position and current environment information of the character with the ball, combined with the court value area, and control the behavior with the highest evaluation value as the target, which can solve the rationality and randomness of the selection of player behavior in football games. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a method for controlling character behavior in a football game provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a court value area provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of an optional ball-carrying area provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of an optional passing area provided in an embodiment of the present application;

[0025] Figure 5 A structural block diagram of a character behavior control device in a football game provided by an embodiment of the present application;

[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solution of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0028] Currently, the football games on the market are mainly card games, and the AI ​​in the game is also based on simple calculations. Players mainly perform simple shooting, passing, dribbling, stealing, and saving. The behavior of players in the game is relatively simple and basic, and is usually controlled through behavior trees, resulting in players being unable to perform reasonable behaviors in many situations, such as choosing to pass the ball when they should shoot, or choosing to dribble the ball when they should pass the ball. In addition, the tactics of players in the game are relatively fixed, which cannot reflect the random situations in real games.

[0029] Based on this, the embodiments of the present application provide a method, device and electronic device for controlling character behavior in a football game, which can solve the problems of rationality and randomness of player behavior selection in a football game.

[0030] To facilitate understanding of this embodiment, a method for controlling character behavior in a football game disclosed in an embodiment of the present application is first introduced in detail.

[0031] Figure 1 A method for controlling character behavior in a football game provided in an embodiment of the present application specifically comprises the following steps:

[0032] Step S102, obtaining the first current position and current environment information corresponding to the character with the ball in the game scene in the current control cycle.

[0033] The above-mentioned ball-carrying character is a non-player controlled character NPC that has control over the ball in the game scene. In a football game, the behavior control of the ball-carrying character is a continuously cyclic control process, which is calculated and controlled once every preset time. Therefore, there will be multiple control cycles, and in each control cycle, the first current position and current environment information corresponding to the ball-carrying character in the current control cycle will be obtained in real time.

[0034] The current environment information may have different settings according to different behaviors. For example, when calculating the first ability evaluation value of a dribbling character when performing a dribbling behavior, the current environment information needed to be used may include: the number of defensive players in the optional dribbling area; when calculating the first ability evaluation value of a dribbling character when performing a passing behavior, the current environment information needed to be used may include: the second current position of a player character of the same team as the dribbling character, and at least one of the following environment parameters: the route distance between the first current position and the second current position, the number of defensive players on the route, and the orientation of the player character; when calculating the first ability evaluation value of a dribbling character when performing a shooting behavior, the current environment information needed to be used may include: at least one of the following shooting environment parameters: the number of defensive players, the angle between the first current position and the two sides of the goal, and the distance between the first current position and the goal.

[0035] Step S104, determining the first ability evaluation values ​​corresponding to the dribbling character when performing multiple designated behaviors according to the first current position, current environmental information and a preset court value area; the court value area includes multiple sub-areas with corresponding regional values ​​evenly divided in the court; the multiple designated behaviors include: dribbling behavior, passing behavior and shooting behavior.

[0036] The above-mentioned stadium value areas are as follows Figure 2 As shown, in the embodiment of the present application, according to the length and width of the court (105*68), the court is equally divided into 96 sub-areas, the length and width of each sub-area are: h = 8.5m, w = 8.75m, and each sub-area corresponds to an independent value score, such as Figure 2 As shown in , the corresponding score of sub-area 1 is 59, and the corresponding score of sub-area 9 is 61. The principle of setting independent value scores in the court value area is basically that the scores gradually increase from left to right. In this way, the ability evaluation value is calculated based on the scores of this area, and the target behavior is determined, which can make the team as a whole move towards the direction of shooting.

[0037] Step S106, determining the designated behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with the ball in the next control cycle, so as to control the character with the ball to perform the target behavior in the game scene.

[0038] The method for controlling the behavior of a character in a soccer game provided by the embodiment of the present application first obtains the first current position and current environment information corresponding to the character with the ball in the game scene in the current control cycle, and the character with the ball is a non-player controlled character NPC who has control over the soccer ball in the game scene; then, according to the first current position, the current environment information and the preset court value area, the first ability evaluation values ​​corresponding to the character with the ball when performing a plurality of designated behaviors are determined; the court value area includes a plurality of sub-areas with corresponding regional values ​​evenly divided in the court, which are used to calculate the evaluation value, and the plurality of designated behaviors include: dribbling behavior, passing behavior and shooting behavior; the designated behavior corresponding to the highest first ability evaluation value is determined as the target behavior corresponding to the character with the ball in the next control cycle, so as to control the character with the ball to perform the target behavior in the game scene. The embodiment of the present application can evaluate the ability values ​​of dribbling behavior, passing behavior and shooting behavior in real time according to the current position and current environment information of the character with the ball, combined with the court value area, and control the behavior with the highest evaluation value as the target, which can solve the problems of rationality and randomness of player behavior selection in soccer games.

[0039] The embodiment of the present application also provides another method for controlling character behavior in a football game. This embodiment is implemented on the basis of the previous embodiment. This embodiment focuses on describing the process of determining the first ability evaluation value corresponding to the character with the ball when performing dribbling behavior, passing behavior, and shooting behavior, respectively.

[0040] The process of determining the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior is as follows:

[0041] (1) Determine an optional dribbling area corresponding to the dribbling character according to the first current position and the court value area.

[0042] In a specific implementation, a first target sub-region corresponding to the first current position is determined from the court value region; an adjacent sub-region corresponding to the first target sub-region is determined as an optional dribbling region corresponding to the dribbling character. The first target sub-region corresponds to four edges and four vertices, and the adjacent sub-region may be an adjacent sub-region that shares edges with the four edges of the first target sub-region, or may also include an adjacent sub-region that shares points with four vertices. Figure 3 As shown, the middle area is the first target sub-area corresponding to the first current position, and the surrounding 8 sub-areas are its adjacent sub-areas, that is, the optional ball-carrying areas.

[0043] (2) For each optional dribbling area, a second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area is determined based on the area value corresponding to the optional dribbling area, the dribbling ability attribute of the dribbling character, and the current environment information.

[0044] The above current environment information includes: the number of defensive players in the optional dribbling area; the calculation process of the second ability evaluation value is as follows:

[0045] A, the area value corresponding to the optional dribbling area is determined as the dribbling area value when the dribbling character dribbles the ball to the optional dribbling area; for example, Figure 2 The corresponding area in the court value area shown is sub-area 35. Figure 3 The 1 in the adjacent sub-area of ​​the dribbling character shown corresponds to sub-area No. 26, and its area value is 56.

[0046] B. According to the dribbling ability attribute of the dribbling character and the preset corresponding relationship between the dribbling ability and the score, determine the corresponding dribbling ability value when the dribbling character dribbles the ball to the optional dribbling area.

[0047] Refer to the corresponding relationship between dribbling ability and score shown in Table 1. For example, the dribbling character corresponds to XX, and its corresponding dribbling ability attribute is 95. Then it can be determined that its corresponding dribbling ability range is 90-100, and the corresponding score is 19. 19 is the corresponding dribbling ability value when the dribbling character dribbles the ball to the No. 26 sub-area.

[0048] Table 1

[0049] Dribbling Score (90,100] 19 (70,90] 16 (50,70] 5 (0,50] 0

[0050] C. According to the number of defensive players in the optional dribbling area and the preset corresponding relationship between the number of defensive players and the score, determine the corresponding dribbling environment value when the dribbling character dribbles the ball to the optional dribbling area.

[0051] Refer to the corresponding relationship between the number of defensive players and the score shown in Table 2. For example, the number of defensive players in the No. 26 sub-area is 2, and the corresponding score is 16, that is, 16 is the corresponding dribbling environment value when the dribbling character dribbles the ball to the No. 26 sub-area.

[0052] Table 2

[0053] Percentage of people Score 0 45 1 30 2 16 3+ 0

[0054] D. Sum the dribbling area value, dribbling ability value and dribbling environment value to obtain the second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area.

[0055] The sum of the dribbling area value 56, the dribbling ability value 19 and the dribbling environment value 2 is 77, which is the second ability evaluation value corresponding to the dribbling character dribbling the ball to the No. 26 sub-area.

[0056] (3) The highest second ability evaluation value is determined as the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior.

[0057] According to the above method, the second ability evaluation values ​​corresponding to the 1-8 adjacent sub-regions can be calculated respectively, and then the highest value among them is used as the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior.

[0058] The process of determining the first ability evaluation value corresponding to the dribbling character when performing the dribbling and passing behavior is as follows:

[0059] The above current environmental information includes: the second current position of the player character of the same team as the ball-carrying character, and at least one of the following environmental parameters: the route distance between the first current position and the second current position, the number of defensive players on the route, and the direction of the player character.

[0060] (1) Determine the optional passing area corresponding to the ball-carrying character according to the second current position and the court value area.

[0061] The above-mentioned second current position is the current position of each teammate corresponding to the dribbling character. When determining the optional dribbling area, it is necessary to traverse each teammate on the court and determine the second target sub-area corresponding to each second current position from the court value area; then all or all second target sub-areas within a preset range are determined as the optional dribbling areas corresponding to the dribbling character.

[0062] See also Figure 4 As shown, only three teammates are shown, and the route between the dribbling character and teammates is shown by the arrows in the figure, and the black icons represent the defensive players on the route, that is, the opposing players.

[0063] (2) For each optional passing area, a third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area is determined based on the area value corresponding to the optional passing area, the passing ability attribute of the dribbling character, and the environmental parameters.

[0064] A, the area value corresponding to the optional passing area is determined as the area value when the dribbling character passes the ball to the optional passing area. For example, the sub-area where the teammate in the upper right corner of the figure is located is Figure 2 The middle is sub-area 17, and the corresponding area value is from Figure 2 It can be found that it is 60.

[0065] B. According to the passing ability attribute of the dribbling character and the preset corresponding relationship between passing ability and score, determine the corresponding passing ability value when the dribbling character passes the ball to the optional passing area.

[0066] Refer to the corresponding relationship between passing ability and score shown in Table 3. For example, the character corresponding to the dribbling character is XX, and its corresponding passing ability attribute is 80. Then it can be determined that its corresponding short pass ability range is 70-90, and the corresponding score is 14. 14 is the corresponding passing ability value when the dribbling character passes the ball to the No. 17 sub-area.

[0067] Table 3

[0068]

[0069]

[0070] C. Determine the passing environment value corresponding to the optional passing area when the dribbling character passes the ball to the optional passing area according to the environmental parameters corresponding to the optional passing area and the preset corresponding relationship between the environmental parameter numerical segments and scores.

[0071] Refer to Table 4 for the corresponding relationships between the number of defensive players, route distance and direction and the score. For sub-area 17, the number of defensive players is 1. It can be seen from Table 4 that 23 points are obtained. For example, the route distance is 10m, in the range of 5-15, and the score is 21. For example, if the direction is frontal, 4 points are obtained, and the total score is 48 points. 48 points is the corresponding passing environment value when the dribbling character passes the ball to sub-area 17.

[0072] Table 4

[0073] Percentage of people Score Distance ratio Score Angle ratio Score 0 26 (0,5] 3 Orientation 4 1 23 (5,15] 21 Not facing 0 2 13 (15,30] 18 3+ 0 (30,∞] 12

[0074] D. Sum the area value, passing ability value and passing environment value to obtain the third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area.

[0075] The area value 60, the passing ability value 14 and the passing environment value 48 are summed to obtain the third ability evaluation value 122 corresponding to the dribbling character passing the ball to the No. 17 sub-area.

[0076] (3) The highest third ability evaluation value is determined as the first ability evaluation value corresponding to the ball-carrying character when performing the passing behavior.

[0077] According to the above method, the third ability evaluation value corresponding to each optional passing area can be calculated respectively, and then the highest value among them is used as the first ability evaluation value corresponding to the ball-carrying character when performing the passing behavior.

[0078] The process of determining the first ability evaluation value corresponding to the dribbling character when performing the dribbling shooting behavior is as follows:

[0079] The above-mentioned current environment information includes: at least one of the following shooting environment parameters: the number of defensive players, the angle between the first current position and both sides of the goal, and the distance between the first current position and the goal.

[0080] (1) According to the first current position and the court value area, determine the area value corresponding to the character with the ball when performing a shooting behavior. Determine the third target sub-area corresponding to the first current position from the court value area; determine the area value corresponding to the third target sub-area as the area value corresponding to the character with the ball when performing a shooting behavior. As mentioned above, the sub-area corresponding to the first current position is sub-area No. 35, from Figure 2 It can be seen that the corresponding regional value is 55.

[0081] (2) According to the shooting ability attribute of the dribbling character, the shooting ability value corresponding to the dribbling character when performing the shooting behavior is determined.

[0082] According to the first current position and the distance between the goal, determine the corresponding relationship between the shooting ability value segment and the score; determine the target score corresponding to the target shooting ability value segment to which the shooting ability attribute belongs; and determine the target score as the shooting ability value corresponding to the character with the ball performing the shooting behavior.

[0083] Refer to the corresponding relationship between shooting ability and score shown in Table 5. For example, if the first current position is within 30 meters of the goal, the middle corresponding relationship in Table 7 can be determined. The target shooting ability value segment of the shooting ability attribute of the dribbling character is 70-90, and the score is 13, which is the shooting ability value corresponding to the shooting behavior of the dribbling character.

[0084] Table 5

[0085]

[0086] (3) According to the shooting environment parameters and the preset corresponding relationship between the numerical range and score of the shooting environment parameters, the shooting environment value corresponding to the shooting behavior performed by the character with the ball is determined.

[0087] Refer to the corresponding relationship between environmental parameters and scores shown in Table 6. First, the distance from the current position to the goal is 20, which is 40 points. The number of defensive players on the shooting line is 3, which is 0 points. The shooting angle is 45 degrees, which is 3 points. The total score is 43 points. 43 points is the shooting environment value corresponding to the shooting behavior when the character with the ball performs the shooting behavior.

[0088] Table 6

[0089] Percentage of people Score Distance ratio Score Angle ratio Score 0 38 (0,11] 50 (0°,30°] 0 1 26 (11,20] 40 (30°,60°] 3 2 17 (20,35] 25 (60°,90°] 6 3+ 0 (35,∞] 0 (90°,180°] 10

[0090] (4) The area value, the shooting ability value, and the shooting environment value are summed to obtain the first ability evaluation value corresponding to the ball-carrying character when performing the shooting behavior.

[0091] The area value 55, the shooting ability value 13 and the shooting environment value 43 are summed to obtain the first ability evaluation value 81 corresponding to the ball-carrying character when performing a shooting behavior.

[0092] By calculating the ability evaluation values ​​of the above-mentioned three behaviors, the behavior with the highest score can be used to determine the target behavior corresponding to the dribbling character, that is, the behavior to be executed in the next control cycle. When calculating the ability evaluation values, it is inevitable that there will be situations where the scores are the same. If the dribbling character has at least two maximum values ​​of the first ability evaluation values ​​corresponding to the execution of multiple specified behaviors, the target behavior corresponding to the dribbling character is determined according to the preset priority corresponding to the specified behavior in the current scenario.

[0093] For example, the priority order is preset as follows in the relaxed area: passing behavior > dribbling behavior > shooting behavior; in the tense area, the priority order is: passing behavior > dribbling behavior > shooting behavior; in the dangerous area, the priority order is: shooting behavior > passing behavior > dribbling behavior. When the scores are the same, the target behavior can be determined according to the above priority order.

[0094] The character behavior control method in a football game provided in an embodiment of the present application can determine which target behavior to be executed in the next cycle based on the current position of the character with the ball in the current control cycle, current environmental information and a preset stadium value area, so as to control the player behavior. This method is more reasonable, more random and more realistic.

[0095] Based on the above method embodiment, the present application embodiment also provides a character behavior control device in a football game, see Figure 5 As shown, the device comprises:

[0096] The information acquisition module 52 is used to obtain the first current position and current environmental information corresponding to the character with the ball in the game scene in the current control cycle, wherein the character with the ball is a non-player controlled character NPC that has control over the football in the game scene; the evaluation value determination module 54 is used to determine the first ability evaluation values ​​corresponding to the character with the ball when performing multiple specified behaviors according to the first current position, the current environmental information and the preset stadium value area; the stadium value area includes multiple sub-areas with corresponding regional values ​​that are evenly divided in the stadium; the multiple specified behaviors include: dribbling behavior, passing behavior and shooting behavior; the target behavior determination module 56 is used to determine the specified behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with the ball in the next control cycle, so as to control the character with the ball to perform the target behavior in the game scene.

[0097] The above-mentioned evaluation value determination module 54 is also used to determine an optional dribbling area corresponding to the dribbling character based on the first current position and the court value area; for each optional dribbling area, the second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area is determined based on the area value corresponding to the optional dribbling area, the dribbling ability attribute of the dribbling character, and the current environmental information; the highest second ability evaluation value is determined as the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior.

[0098] The evaluation value determination module 54 is further used to determine a first target sub-region corresponding to the first current position from the court value region; and determine an adjacent sub-region corresponding to the first target sub-region as an optional dribbling region corresponding to the dribbling character.

[0099] The above-mentioned current environmental information includes: the number of defensive players in the optional dribbling area; the above-mentioned evaluation value determination module 54 is also used to determine the area value corresponding to the optional dribbling area as the dribbling area value when the dribbling character dribbles the ball to the optional dribbling area; according to the dribbling ability attribute of the dribbling character, and the preset correspondence between the dribbling ability and the score, determine the dribbling ability value corresponding to the dribbling character when dribbling the ball to the optional dribbling area; according to the number of defensive players in the optional dribbling area, and the preset correspondence between the number of defensive players and the score, determine the dribbling environment value corresponding to the dribbling character when dribbling the ball to the optional dribbling area; sum the dribbling area value, the dribbling ability value and the dribbling environment value to obtain a second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area.

[0100] The above-mentioned current environmental information includes: the second current position of the player character of the same team as the dribbling character, and at least one of the following environmental parameters: the route distance between the first current position and the second current position, the number of defensive players on the route and the direction of the player character; the above-mentioned evaluation value determination module 54 is also used to determine the optional passing area corresponding to the dribbling character based on the second current position and the court value area; for each optional passing area, the third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area is determined based on the area value corresponding to the optional passing area, the passing ability attributes of the dribbling character, and the environmental parameters; the highest third ability evaluation value is determined as the first ability evaluation value corresponding to the dribbling character when performing the passing behavior.

[0101] The evaluation value determination module 54 is further used to determine the second target sub-region corresponding to each second current position from the court value region; and determine all or all second target sub-regions within a preset range as optional dribbling regions corresponding to the dribbling character.

[0102] The above-mentioned evaluation value determination module 54 is also used to determine the area value corresponding to the optional passing area as the area value when the dribbling character passes the ball to the optional passing area; determine the passing ability value corresponding to the dribbling character passing the ball to the optional passing area according to the passing ability attribute of the dribbling character and the preset corresponding relationship between the passing ability and the score; determine the passing environment value corresponding to the dribbling character passing the ball to the optional passing area according to the environmental parameters corresponding to the optional passing area and the preset corresponding relationship between the environmental parameter numerical range and the score; sum the area value, the passing ability value and the passing environment value to obtain a third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area.

[0103] The above-mentioned current environment information includes: including at least one of the following shooting environment parameters: the number of defensive players, the angle between the first current position and the two sides of the goal, and the distance between the first current position and the goal; the above-mentioned evaluation value determination module 54 is also used to determine the area value corresponding to the character with the ball when performing a shooting behavior based on the first current position and the court value area; determine the shooting ability value corresponding to the character with the ball when performing a shooting behavior based on the shooting ability attribute of the character with the ball; determine the shooting environment value corresponding to the character with the ball when performing a shooting behavior based on the shooting environment parameters and the preset shooting environment parameter numerical segment and score correspondence; sum the area value, shooting ability value and shooting environment value to obtain the first ability evaluation value corresponding to the character with the ball when performing a shooting behavior.

[0104] The evaluation value determination module 54 is further used to determine a third target sub-region corresponding to the first current position from the court value region; and determine the region value corresponding to the third target sub-region as the region value corresponding to the ball-carrying character when performing a shooting action.

[0105] The above-mentioned shooting environment parameters include: the distance between the first current position and the goal; the above-mentioned evaluation value determination module 54 is also used to determine the corresponding relationship between the corresponding shooting ability value segment and the score according to the first current position and the distance between the goal; determine the target score corresponding to the target shooting ability value segment to which the shooting ability attribute belongs; and determine the target score as the shooting ability value corresponding to the dribbling character when performing a shooting behavior.

[0106] The target behavior determination module 56 is also used to determine the target behavior corresponding to the dribbling character according to the preset priority corresponding to the designated behavior in the current scenario if at least two of the first ability evaluation values ​​corresponding to the dribbling character when performing multiple designated behaviors are the same.

[0107] The device provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0108] The present application also provides an electronic device, such as Figure 6 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 61 and a memory 60, the memory 60 stores computer executable instructions that can be executed by the processor 61, and the processor 61 executes the computer executable instructions to implement the above method.

[0109] exist Figure 6 In the illustrated embodiment, the electronic device further includes a bus 62 and a communication interface 63 , wherein the processor 61 , the communication interface 63 and the memory 60 are connected via the bus 62 .

[0110] Among them, the memory 60 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 62 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 62 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0111] The processor 61 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 61. The above processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 61 reads the information in the memory and completes the steps of the method of the above embodiment in combination with its hardware.

[0112] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.

[0113] The computer program products of the methods, devices, and electronic devices provided in the embodiments of the present application include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0114] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0115] 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 non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. 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.

[0116] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0117] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for controlling character behavior in a football game, characterized in that: The method comprises: Acquire a first current position and current environment information corresponding to a character with a ball in a game scene in a current control cycle, wherein the character with a ball is a non-player controlled character NPC that has control over the ball in the game scene; Determine, according to the first current position, the current environment information and a preset court value area, first ability evaluation values ​​corresponding to the dribbling character when performing a plurality of designated behaviors; the court value area includes a plurality of sub-areas with corresponding regional values ​​evenly divided in the court; the plurality of designated behaviors include: dribbling behavior, passing behavior and shooting behavior; Determine the designated behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with the ball in the next control cycle, and if at least two of the first ability evaluation values ​​respectively corresponding to the character with the ball when performing multiple designated behaviors are the same, determine the target behavior corresponding to the character with the ball according to the preset priority corresponding to the designated behaviors in the current scene, so as to control the character with the ball to perform the target behavior in the game scene; The step of determining first ability evaluation values ​​corresponding to the ball-carrying character when performing a plurality of designated behaviors according to the first current position, the current environment information and a preset court value area comprises: The current environment information includes: the number of defensive players in the optional dribbling area; determining the optional dribbling area corresponding to the dribbling character according to the first current position and the court value area; for each of the optional dribbling areas, determining the area value corresponding to the optional dribbling area as the dribbling area value when the dribbling character dribbles the ball to the optional dribbling area; determining the dribbling ability value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the dribbling ability attribute of the dribbling character and the preset corresponding relationship between the dribbling ability and the score; determining the dribbling environment value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the number of defensive players in the optional dribbling area and the preset corresponding relationship between the number of defensive players and the score; summing the dribbling area value, the dribbling ability value and the dribbling environment value to obtain the second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area; determining the highest second ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior; The current environment information includes: a second current position of a player character of the same team as the dribbling character, and at least one of the following environment parameters: a route distance between the first current position and the second current position, the number of defensive players on the route, and the orientation of the player character; determining an optional passing area corresponding to the dribbling character according to the second current position and the court value area; for each optional passing area, determining a third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area according to the area value corresponding to the optional passing area, the passing ability attribute of the dribbling character, and the environment parameters; determining the highest third ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing a passing behavior; The current environment information includes: including at least one of the following shooting environment parameters: the number of defensive players, the angle between the first current position and the two sides of the goal, and the distance between the first current position and the goal; determining the area value corresponding to the character with the ball when performing a shooting behavior according to the first current position and the court value area; determining the shooting ability value corresponding to the character with the ball when performing a shooting behavior according to the shooting ability attribute of the character with the ball; determining the shooting environment value corresponding to the character with the ball when performing a shooting behavior according to the shooting environment parameters and the preset corresponding relationship between the numerical segments and scores of the shooting environment parameters; summing the area value, the shooting ability value and the shooting environment value to obtain a first ability evaluation value corresponding to the character with the ball when performing a shooting behavior.

2. The method according to claim 1, characterized in that The step of determining the optional dribbling area corresponding to the dribbling character according to the first current position and the court value area comprises: Determine a first target sub-area corresponding to the first current position from the court value area; An adjacent sub-region corresponding to the first target sub-region is determined as an optional dribbling region corresponding to the dribbling character.

3. The method according to claim 1, characterized in that The step of determining the optional passing area corresponding to the dribbling character according to the second current position and the court value area comprises: Determine a second target sub-area corresponding to each second current position from the court value area; The second target sub-areas within all or a preset range are determined as the optional dribbling area corresponding to the dribbling character.

4. The method according to claim 3, characterized in that The step of determining a third ability evaluation value corresponding to the ball-carrying character passing the ball to the optional passing area according to the area value corresponding to the optional passing area, the passing ability attribute of the ball-carrying character, and the environmental parameter comprises: Determine the area value corresponding to the optional passing area as the area value when the ball-carrying character passes the ball to the optional passing area; Determine the passing ability value corresponding to when the dribbling character passes the ball to the optional passing area according to the passing ability attribute of the dribbling character and the preset corresponding relationship between passing ability and score; Determine the passing environment value corresponding to when the dribbling character passes the ball to the optional passing area according to the environmental parameters corresponding to the optional passing area and the preset corresponding relationship between the environmental parameter value segments and the scores; The area value, the passing ability value and the passing environment value are summed to obtain a third ability evaluation value corresponding to the ball-carrying character passing the ball to the optional passing area.

5. The method according to claim 1, characterized in that The step of determining the area value corresponding to the ball-carrying character when performing a shooting action according to the first current position and the court value area comprises: Determine a third target sub-area corresponding to the first current position from the court value area; The area value corresponding to the third target sub-area is determined as the area value corresponding to the ball-carrying character when performing a shooting action.

6. The method according to claim 5, characterized in that The shooting environment parameters include: the distance between the first current position and the goal; and the step of determining the shooting ability value corresponding to the shooting behavior of the character with the ball when the character with the ball performs the shooting behavior according to the shooting ability attribute of the character with the ball, including: Determine a corresponding relationship between a corresponding shooting ability value segment and a score according to the first current position and the distance between the goal; Determine a target score corresponding to a target shooting ability value segment to which the shooting ability attribute belongs; The target score is determined as the shooting ability value corresponding to the shooting behavior performed by the dribbling character.

7. A character behavior control device in a football game, characterized in that: The device comprises: An information acquisition module, used to acquire a first current position and current environment information corresponding to a character with a ball in a game scene in a current control cycle, wherein the character with a ball is a non-player controlled character NPC having control over the ball in the game scene; An evaluation value determination module is used to determine the first ability evaluation values ​​corresponding to the ball-carrying character when performing multiple designated behaviors according to the first current position, the current environment information and a preset court value area; the court value area includes multiple sub-areas with corresponding regional values ​​evenly divided in the court; the multiple designated behaviors include: dribbling behavior, passing behavior and shooting behavior; a target behavior determination module, configured to determine the designated behavior corresponding to the highest first ability evaluation value as the target behavior corresponding to the character with the ball in the next control cycle, and if at least two of the first ability evaluation values ​​respectively corresponding to the character with the ball when performing multiple designated behaviors are the same, determine the target behavior corresponding to the character with the ball according to the preset priority corresponding to the designated behavior in the current scene, so as to control the character with the ball to perform the target behavior in the game scene; The evaluation value determination module is further used for: The current environment information includes: the number of defensive players in the optional dribbling area; determining the optional dribbling area corresponding to the dribbling character according to the first current position and the court value area; for each of the optional dribbling areas, determining the area value corresponding to the optional dribbling area as the dribbling area value when the dribbling character dribbles the ball to the optional dribbling area; determining the dribbling ability value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the dribbling ability attribute of the dribbling character and the preset corresponding relationship between the dribbling ability and the score; determining the dribbling environment value corresponding to the dribbling character dribbling the ball to the optional dribbling area according to the number of defensive players in the optional dribbling area and the preset corresponding relationship between the number of defensive players and the score; summing the dribbling area value, the dribbling ability value and the dribbling environment value to obtain the second ability evaluation value corresponding to the dribbling character dribbling the ball to the optional dribbling area; determining the highest second ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing the dribbling behavior; The current environment information includes: a second current position of a player character of the same team as the dribbling character, and at least one of the following environment parameters: a route distance between the first current position and the second current position, the number of defensive players on the route, and the orientation of the player character; determining an optional passing area corresponding to the dribbling character according to the second current position and the court value area; for each optional passing area, determining a third ability evaluation value corresponding to the dribbling character passing the ball to the optional passing area according to the area value corresponding to the optional passing area, the passing ability attribute of the dribbling character, and the environment parameters; determining the highest third ability evaluation value as the first ability evaluation value corresponding to the dribbling character when performing a passing behavior; The current environment information includes: including at least one of the following shooting environment parameters: the number of defensive players, the angle between the first current position and the two sides of the goal, and the distance between the first current position and the goal; determining the area value corresponding to the character with the ball when performing a shooting behavior according to the first current position and the court value area; determining the shooting ability value corresponding to the character with the ball when performing a shooting behavior according to the shooting ability attribute of the character with the ball; determining the shooting environment value corresponding to the character with the ball when performing a shooting behavior according to the shooting environment parameters and the preset corresponding relationship between the numerical segments and scores of the shooting environment parameters; summing the area value, the shooting ability value and the shooting environment value to obtain a first ability evaluation value corresponding to the character with the ball when performing a shooting behavior.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Simulation method and system for real-time broadcasting

    US20150019186A1

  • KR1019665600000B1