Game design method and system based on AI intelligent agent
Through AI agents, the racing map and models are analyzed, and optimization control instructions are generated, which solves the problem of player reaction time limit in racing games, achieving the fastest completion time and improving the gaming experience.
Patent Information
- Application Number
- CN202411703108.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
AI Technical Summary
In racing games, players pursue the shortest time to complete the race, but due to the limitation of reaction time, they cannot complete the race in the shortest time.
The racing map is characterized by AI agents, and the relevant parameters of the racing map are determined, and the racing model is analyzed and processed to determine the fastest completion time for a lap. The AI agent generates racing control instructions, and players regulate according to the instructions, obtain real-time completion time for single laps, and obtain racing optimization control instructions through comparison and judgment to optimize players' reaction time.
It realizes that players complete the game as fast as possible, improves the game experience, and optimizes the reaction time and improves the game efficiency through coordinated control between AI agents and players.
Smart Images

Figure CN119548829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a game design method and system based on AI agents. Background Art
[0002] With the continuous development of artificial intelligence technology, AI agents are being used more and more widely in game design, which can greatly enhance the interactivity, immersion and intelligence of games.
[0003] AI agents are virtual characters or systems driven by algorithms and models that are able to make autonomous decisions, learn, and adapt behaviors in games. AI agents are not limited to controlling enemy characters, but also teammates, the environment of the game world, and the task generation system.
[0004] In racing games, players strive to complete the race in the shortest time. However, when players operate the game, they need a certain amount of reaction time. When the reaction time is too long, the race cannot be completed in the shortest time. Therefore, AI agents send operation instructions to players so that they can complete the race in the shortest time. Summary of the invention
[0005] In order to solve the above technical problems, a game design method and system based on AI intelligent agent are provided. This technical solution solves the problem raised in the above background technology that in racing games, players strive to complete the race in the shortest time, but when players operate the game, they need a certain reaction time. When the reaction time is too long, the game cannot be completed in the shortest time.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is: A game design method based on AI agent, comprising: Determine the racing map based on the player's operation instructions; Based on the AI agent, feature analysis is performed on the racing map to determine parameters related to the racing map, wherein the map related parameters include racing track data, obstacle locations, speed bump locations, and wall locations; wherein the racing track data includes track straight position, track straight length, track curve position, and track curve length; Obtain the racing model. The AI agent analyzes and processes the racing map parameters and the racing model to determine the fastest lap time. Based on the AI agent, the relevant parameters of the racing map are analyzed and processed to determine the racing control instructions. The player adjusts the racing model according to the racing control instructions to obtain the real-time completion time of a single lap; wherein the racing control instructions include the racing lane change instructions, the racing acceleration instructions and the racing deceleration instructions; Based on AI agents, the fastest lap completion time and real-time lap completion time are compared and judged to obtain the optimized control instructions for the racing car; Players can make secondary adjustments to the racing model based on the racing optimization control instructions to obtain the best single lap completion time.
[0007] Preferably, determining the racing map based on the player's operation instruction specifically includes the following steps: Get a list of racing map options; The player makes a selection based on the selection list of the racing map, and obtains the click position and first click time of the selection list of the racing map; The selection list of racing maps is locked based on the first click time; The selection list of the racing map is positioned according to the click position of the selection list of the racing map to determine the racing map.
[0008] Preferably, the method of performing feature analysis on the racing map based on the AI agent and determining the parameters related to the racing map specifically comprises the following steps: Based on the AI agent, the racing map is binarized to obtain a grayscale image of the racing map; Based on the AI agent, a data reading instruction is issued to the database to obtain pixel values of parameters related to the racing map, where the pixel values of the parameters related to the racing map include racing track pixel values, obstacle pixel values, speed bump pixel values, and wall pixel values; The AI agent locates the features of the grayscale image of the racing map according to the pixel values of the relevant parameters of the racing map, and determines the position of the straight track, the length of the straight track, the position of the curve, the length of the curve, the position of obstacles, the position of speed bumps and the position of walls.
[0009] Preferably, the obtaining of the racing model, the AI agent analyzing and processing the racing map-related parameters and the racing model to determine the fastest lap completion time specifically comprises the following steps: Get the racing model; Based on the AI agent, a speed analysis is performed on the racing car model to obtain the maximum speed of the racing car model, wherein the maximum speed of the racing car model includes the maximum speed of the racing car on a straight road and the maximum speed of the racing car on a curve; Based on the AI agent, the maximum speed of the racing model and the racing track data are calculated and processed to obtain the fastest single lap completion time.
[0010] Preferably, the AI agent-based method of calculating and processing the maximum speed of the racing model and the racing track data to obtain the fastest single lap completion time specifically includes the following steps: Based on the AI agent, the straight positions and the curve positions of the runway are summed up to obtain the number of straight lines and the number of curves on the runway. Based on the AI agent, the number of straights on the runway, the length of the straights on the runway and the maximum speed of the car on the straights are calculated and processed to obtain the fastest completion time of the car on the straights; Based on AI agents, the number of track bends, the length of track bends and the maximum speed of the car bends are calculated and processed to obtain the fastest completion time of the car bends; Based on the AI agent, the fastest straight-line completion time and the fastest curve completion time of the car are summed up to obtain the fastest single-lap completion time.
[0011] Preferably, the AI agent is used to analyze and process the relevant parameters of the racing map, determine the racing control instructions, and the player controls the racing model according to the racing control instructions to obtain the real-time completion time of a single lap, which specifically includes the following steps: Based on AI agents, the system analyzes and processes the obstacle positions, straight track positions, and curve positions to obtain lane change instructions, acceleration instructions, and deceleration instructions for the racing car. The player controls the racing model according to the lane change instructions and obstacle positions to obtain obstacle avoidance time; The player controls the car model according to the car acceleration instructions and the straight position of the runway to obtain the straight completion time; The player controls the racing car model according to the racing car deceleration instructions and the track curve position to obtain the curve completion time; Based on the AI agent, the obstacle avoidance time, straight line completion time and curve completion time are summed up and calculated to obtain the real-time completion time of a single lap.
[0012] Preferably, the AI agent-based method of comparing and judging the fastest lap completion time and the real-time lap completion time to obtain the racing car optimization control instruction specifically includes the following steps: Based on the AI agent, the fastest lap completion time and the real-time lap completion time are calculated to obtain the lap completion time difference; Based on the AI agent, the lap completion time difference and the set time threshold are compared and judged; If the lap completion time difference is greater than or equal to the set time threshold, the player's fastest reaction time is obtained; The AI agent adjusts the sending time of the car control command according to the player's fastest reaction time to obtain the car's optimized control command; If the lap completion time difference is less than the set time threshold, there is no need to optimize the car control instructions.
[0013] Preferably, obtaining the fastest reaction time of the player specifically comprises the following steps: Based on the AI agent, the time it takes for the player to complete the lane change command, the acceleration command, and the deceleration command is collected to obtain the completion time of the player's command; Based on AI agents, the completion time of player commands is filtered and processed to obtain the player's fastest reaction time.
[0014] Preferably, the specific calculation formula for obtaining the fastest reaction time of the player is:
[0015] In the formula, The fastest reaction time for players; is the time it takes for a player's command to be completed; n is the number of times a player's command is completed.
[0016] Furthermore, a game design system based on an AI agent is proposed, which is used to implement the game design method based on an AI agent as described above, including: An AI agent, wherein the AI agent analyzes a racing map and determines parameters related to the racing map, and the AI agent performs a comprehensive analysis based on the parameters related to the racing map and a racing model to determine a racing control instruction; A data calculation module, wherein the data calculation module performs calculations based on the straight position, the straight length, the maximum speed of the car on the straight, and the curve position, the curve length, and the maximum speed of the car on the curve to obtain the fastest straight completion time and the fastest curve completion time of the car. The data calculation module performs sum calculations on the obstacle avoidance time, the straight completion time, and the curve completion time to obtain the real-time completion time of a single lap; An instruction generation model, wherein the instruction generation module generates a lane change instruction, a car acceleration instruction, and a car deceleration instruction according to the obstacle position, the straight position of the runway, and the curve position of the runway; An image processing module, wherein the image processing module performs binarization processing on the racing map to obtain a grayscale image of the racing map; A comparison and judgment module, which performs comparison and judgment based on the single lap completion time difference and a set time threshold, and selects whether to optimize the racing car control command; A database is used to store pixel values of parameters related to the racing map.
[0017] Compared with the prior art, the present invention provides a game design method and system based on AI agent, which has the following beneficial effects: The present invention analyzes the game map selected by the player through an AI agent to determine the structure of the game map, and then analyzes the racing car model selected by the player and the structure of the game map through the AI agent to determine the fastest completion time of a single lap, and then generates a racing car control instruction according to the obstacle position and the runway curve position, and the player competes according to the racing car control instruction to obtain the real-time completion time of a single lap, and finally, the fastest completion time of a single lap is compared with the real-time completion time of a single lap to determine the fastest reaction time of the player, and the AI agent optimizes the racing car control instruction according to the fastest reaction time of the player, so that the player can complete the race in the fastest time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of steps S100-S600 in a game design method based on an AI agent proposed in the present invention; Figure 2 This is a flow chart of steps S101-S104 in a game design method based on an AI agent proposed in the present invention; Figure 3 This is a flowchart of steps S201-S203 in a game design method based on an AI agent proposed by the present invention; Figure 4 This is a flowchart of steps S301-S303 in a game design method based on an AI agent proposed by the present invention; Figure 5 This is a flowchart of steps S3031-S3034 in a game design method based on an AI agent proposed in the present invention; Figure 6 This is a flow chart of steps S401-S405 in a game design method based on an AI agent proposed in the present invention; Figure 7 This is a flow chart of steps S501-S505 in a game design method based on an AI agent proposed in the present invention; Figure 8 This is a flowchart of steps S5031-S5032 in a game design method based on an AI agent proposed by the present invention; Fig. 9 This is a structural block diagram of a game design system based on AI agent proposed by the present invention. DETAILED DESCRIPTION
[0019] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0020] Reference Figure 1As shown, a game design method based on AI agent includes: S100, determining a racing map based on the player's operation instruction; S200, based on the AI agent, perform feature analysis on the racing map to determine parameters related to the racing map, where the map related parameters include racing track data, obstacle locations, speed bump locations, and wall locations; wherein the racing track data includes track straight position, track straight length, track curve position, and track curve length; S300: obtaining a racing model, and the AI agent performs analysis and processing based on the racing map-related parameters and the racing model to determine the fastest single-lap completion time; S400, based on the AI agent, analyzing and processing the relevant parameters of the racing map, determining the racing control instructions, and the player controls the racing model according to the racing control instructions to obtain the real-time completion time of a single lap; wherein the racing control instructions include a racing lane change instruction, a racing acceleration instruction, and a racing deceleration instruction; S500, based on AI agent, compares and judges the fastest lap time and real-time lap time to obtain the optimized control instructions of the racing car; S600, players can adjust the car model again according to the car optimization control instructions to obtain the best lap completion time; Those skilled in the art can understand that, in a racing game, if a player wants to complete the race in the fastest time, the player's reaction time needs to be analyzed to determine the player's fastest reaction time, and a racing control instruction is sent to the player through the player's fastest reaction time. Then, the player controls the car according to the racing control instruction, and tries not to slow down while the car avoids obstacles and goes through corners, so that the car can complete the race at the fastest speed. In this way, the player can complete the race in the fastest time. At the same time, the player's experience of the racing game is improved through collaborative control between the AI agent and the player.
[0021] Reference Figure 2 As shown, based on the player's operation instructions, determining the racing map specifically includes the following steps: S101, obtaining a selection list of racing maps; S102, the player makes a selection according to the selection list of the racing map, and obtains the click position and the first click time of the selection list of the racing map; S103, locking the selection list of the racing map according to the first click time; S104, positioning the selection list of the racing map according to the click position of the selection list of the racing map, and determining the racing map; In this embodiment, in order to avoid command confusion, when the player selects a map, the time when the player first clicks to determine the map is recorded, and the selection list of the racing map is locked according to the first click time to avoid subsequent players continuing to select other maps and causing command confusion. In addition, the racing map selected by the player is determined based on the click position.
[0022] Reference Figure 3 As shown, based on the AI agent, the characteristic analysis of the racing map and the determination of the relevant parameters of the racing map specifically include the following steps: S201, based on the AI agent, binarize the racing map to obtain a grayscale image of the racing map; S202, based on the AI agent, issuing a data reading instruction to the database to obtain pixel values of parameters related to the racing map, where the pixel values of the parameters related to the racing map include racing track pixel values, obstacle pixel values, speed bump pixel values, and wall pixel values; S203, the AI agent performs feature positioning on the grayscale image of the racing map according to the pixel values of the relevant parameters of the racing map, and determines the straight position of the runway, the straight length of the runway, the curve position of the runway, the curve length of the runway, the obstacle position, the speed bump position and the wall position; In this embodiment, in the racing game, the racing map is obtained by calling from a map designed by the outside world, and the pixel values of the racing track, obstacles, speed bumps and walls are different. Therefore, the racing map is binarized to obtain a grayscale image of the racing map, and then the grayscale image of the racing map is calculated to obtain the pixel value of each area. Finally, it is compared with the pixel value in the database to determine the straight position of the track, the curve position of the track, the obstacle position, the speed bump position and the wall position.
[0023] Reference Figure 4 As shown, the racing model is obtained, and the AI agent analyzes and processes the racing map-related parameters and the racing model to determine the fastest lap completion time, which specifically includes the following steps: S301, obtaining a racing car model; S302, based on the AI agent, performing speed analysis on the racing car model to obtain the maximum speed of the racing car model, wherein the maximum speed of the racing car model includes the maximum speed of the racing car on a straight road and the maximum speed of the racing car on a curve; S303, based on the AI agent, calculating and processing the maximum speed of the racing model and the racing track data to obtain the fastest single lap completion time; In this embodiment, the speed of the car on the straight and the curve is different. The fastest speed on the straight may not be able to safely pass the curve. Therefore, the maximum speed of the straight and the curve is calculated to obtain the fastest theoretical single lap completion time.
[0024] Reference Figure 5 As shown, based on the AI agent, the maximum speed of the racing model and the racing track data are calculated and processed to obtain the fastest single lap completion time, which specifically includes the following steps: S3031. Based on the AI agent, respectively sum up the positions of the straight lines and the positions of the curves on the runway to obtain the number of straight lines and the number of curves on the runway; S3032, based on the AI agent, calculating and processing the number of straights on the runway, the length of the straights on the runway, and the maximum speed of the car on the straights, to obtain the fastest completion time of the car on the straights; S3033, based on the AI agent, calculating and processing the number of track bends, the length of track bends and the maximum speed of the car bends, and obtaining the fastest completion time of the car bends; S3034. Based on the AI agent, the fastest straight road completion time and the fastest cornering time of the car are summed up and calculated to obtain the fastest single lap completion time.
[0025] Reference Figure 6 As shown, based on the AI agent, the relevant parameters of the racing map are analyzed and processed to determine the racing control instructions. The player controls the racing model according to the racing control instructions. The specific steps of obtaining the real-time completion time of a single lap are as follows: S401, based on the AI agent, analyzing and processing according to the obstacle position, the straight position of the runway, and the curve position of the runway, to obtain the lane change instruction, the acceleration instruction, and the deceleration instruction of the racing car; S402, the player controls the racing car model according to the racing car lane change instruction and the obstacle position to obtain the obstacle avoidance time; S403, the player controls the racing car model according to the racing car acceleration instruction and the straight position of the runway to obtain the straight completion time; S404, the player controls the racing car model according to the racing car deceleration instruction and the track curve position to obtain the curve completion time; S405, based on the AI agent, summing up the obstacle avoidance time, the straight road completion time and the curve completion time to obtain the real-time completion time of a single lap; In this embodiment, the straight completion time and the curve completion time may include the time for the car to pass through the speed bump, the car to collide with the wall, and the car to collide with the obstacle, and then adjust the position of the car to complete the straight and the curve. Therefore, the above time is included in the straight completion time or the curve completion time.
[0026] Reference Figure 7 As shown in the figure, based on the AI agent, the fastest lap completion time and the real-time lap completion time are compared and judged, and the optimized control instructions of the racing car are obtained, which specifically includes the following steps: S501, based on the AI agent, performing a difference calculation between the fastest lap completion time and the real-time lap completion time to obtain a lap completion time difference; S502, based on the AI agent, comparing and judging the single lap completion time difference and the set time threshold; S503: If the single lap completion time difference is greater than or equal to the set time threshold, the fastest reaction time of the player is obtained; S504, the AI agent adjusts the sending time of the car control command according to the fastest reaction time of the player, and obtains the car optimization control command; S505: If the lap completion time difference is less than the set time threshold, there is no need to optimize the racing car control command; In this embodiment, when there is a certain difference between the real-time completion time of a lap and the fastest completion time of a lap, the fastest completion time of a lap is obtained without considering the reaction time of the player, which cannot be obtained in real life. Therefore, the difference between the real-time completion time of a lap and the fastest completion time of a lap is used to judge whether the player completes the game in the shortest time. When the player does not complete the game in the shortest time, the car control instructions need to be optimized, and everyone's reaction time is different. Therefore, the player's game is analyzed by the AI agent to obtain multiple groups of reaction times of the player, and then the multiple groups of reaction times are screened to obtain the player's fastest reaction time. Finally, the AI agent issues the car control instructions in advance with the player's fastest reaction time, thereby realizing the regulation of the car and enabling the player to control the car to complete the game in the shortest time. Through the coordinated control of the player and the AI agent, not only can the player complete the game in a record-breaking manner, but also the player's gaming experience can be improved.
[0027] Reference Figure 8 As shown, obtaining the fastest reaction time of a player specifically includes the following steps: S5031. Based on the AI agent, the time taken by the player to complete the lane change command, the acceleration command, and the deceleration command of the car is collected to obtain the completion time of the player's command; S5032. Based on the AI agent, filter and process the completion time of the player's command to obtain the fastest reaction time of the player; Among them, the specific calculation formula for obtaining the player's fastest reaction time is:
[0028] In the formula, The fastest reaction time for players; is the time it takes for a player's command to be completed; n is the number of times a player's command is completed.
[0029] Reference Fig. 9As shown, a game design system based on AI agent is used to implement the game design method based on AI agent as described above, including: An AI agent, wherein the AI agent analyzes a racing map and determines parameters related to the racing map, and the AI agent performs a comprehensive analysis based on the parameters related to the racing map and a racing model to determine a racing control instruction; A data calculation module, wherein the data calculation module performs calculations based on the straight position, the straight length, the maximum speed of the car on the straight, and the curve position, the curve length, and the maximum speed of the car on the curve to obtain the fastest straight completion time and the fastest curve completion time of the car. The data calculation module performs sum calculations on the obstacle avoidance time, the straight completion time, and the curve completion time to obtain the real-time completion time of a single lap; An instruction generation model, wherein the instruction generation module generates a lane change instruction, a car acceleration instruction, and a car deceleration instruction according to the obstacle position, the straight position of the runway, and the curve position of the runway; An image processing module, wherein the image processing module performs binarization processing on the racing map to obtain a grayscale image of the racing map; A comparison and judgment module, which performs comparison and judgment based on the single lap completion time difference and a set time threshold, and selects whether to optimize the racing car control command; A database is used to store pixel values of parameters related to the racing map.
[0030] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A game design method based on AI agent, characterized in that: include: Determine the racing map based on the player's operation instructions; Based on the AI agent, feature analysis is performed on the racing map to determine parameters related to the racing map, wherein the map related parameters include racing track data, obstacle locations, speed bump locations, and wall locations; wherein the racing track data includes track straight position, track straight length, track curve position, and track curve length; Obtain the racing model. The AI agent analyzes and processes the racing map parameters and the racing model to determine the fastest lap time. Based on the AI agent, the relevant parameters of the racing map are analyzed and processed to determine the racing control instructions. The player adjusts the racing model according to the racing control instructions to obtain the real-time completion time of a single lap; wherein the racing control instructions include the racing lane change instructions, the racing acceleration instructions and the racing deceleration instructions; Based on AI agents, the fastest lap completion time and real-time lap completion time are compared and judged to obtain the optimized control instructions for the racing car; Players can make secondary adjustments to the racing model based on the racing optimization control instructions to obtain the best single lap completion time.
2. The game design method based on AI agent according to claim 1, characterized in that: Determining the racing map based on the player's operation instruction specifically includes the following steps: Get a list of racing map options; The player makes a selection based on the selection list of the racing map, and obtains the click position and first click time of the selection list of the racing map; The selection list of racing maps is locked based on the first click time; The selection list of the racing map is positioned according to the click position of the selection list of the racing map to determine the racing map.
3. The game design method based on AI agent according to claim 1, characterized in that: The method of performing feature analysis on the racing map based on the AI agent and determining the relevant parameters of the racing map specifically includes the following steps: Based on the AI agent, the racing map is binarized to obtain a grayscale image of the racing map; Based on the AI agent, a data reading instruction is issued to the database to obtain pixel values of parameters related to the racing map, where the pixel values of the parameters related to the racing map include racing track pixel values, obstacle pixel values, speed bump pixel values, and wall pixel values; The AI agent locates the features of the grayscale image of the racing map according to the pixel values of the relevant parameters of the racing map, and determines the position of the straight track, the length of the straight track, the position of the curve, the length of the curve, the position of obstacles, the position of speed bumps and the position of walls.
4. The game design method based on AI agent according to claim 1, characterized in that: The obtaining of the racing model, the AI agent analyzing and processing the racing map-related parameters and the racing model, and determining the fastest lap completion time specifically include the following steps: Get the racing model; Based on the AI agent, a speed analysis is performed on the racing car model to obtain the maximum speed of the racing car model, wherein the maximum speed of the racing car model includes the maximum speed of the racing car on a straight road and the maximum speed of the racing car on a curve; Based on the AI agent, the maximum speed of the racing model and the racing track data are calculated and processed to obtain the fastest single lap completion time.
5. The game design method based on AI agent according to claim 4, characterized in that: The AI agent-based method of calculating and processing the maximum speed of the racing model and the racing track data to obtain the fastest single lap completion time specifically includes the following steps: Based on the AI agent, the straight positions and the curve positions of the runway are summed up to obtain the number of straight lines and the number of curves on the runway. Based on the AI agent, the number of straights on the runway, the length of the straights on the runway and the maximum speed of the car on the straights are calculated and processed to obtain the fastest completion time of the car on the straights; Based on AI agents, the number of track bends, the length of track bends and the maximum speed of the car bends are calculated and processed to obtain the fastest completion time of the car bends; Based on the AI agent, the fastest straight-line completion time and the fastest curve completion time of the car are summed up to obtain the fastest single-lap completion time.
6. The game design method based on AI agent according to claim 1, characterized in that: The AI agent-based method of analyzing and processing the relevant parameters of the racing map, determining the racing control instructions, and the player regulating the racing model according to the racing control instructions to obtain the real-time completion time of a single lap specifically includes the following steps: Based on AI agents, the system analyzes and processes the obstacle positions, straight track positions, and curve positions to obtain lane change instructions, acceleration instructions, and deceleration instructions for the racing car. The player controls the racing model according to the lane change instructions and obstacle positions to obtain obstacle avoidance time; The player controls the car model according to the car acceleration instructions and the straight position of the runway to obtain the straight completion time; The player controls the racing car model according to the racing car deceleration instructions and the track curve position to obtain the curve completion time; Based on the AI agent, the obstacle avoidance time, straight line completion time and curve completion time are summed up and calculated to obtain the real-time completion time of a single lap.
7. The game design method based on AI agent according to claim 1, characterized in that: The AI agent-based method of comparing and judging the fastest lap completion time and the real-time lap completion time to obtain the racing car optimization control instruction specifically includes the following steps: Based on the AI agent, the fastest lap completion time and the real-time lap completion time are calculated to obtain the lap completion time difference; Based on the AI agent, the lap completion time difference and the set time threshold are compared and judged; If the lap completion time difference is greater than or equal to the set time threshold, the player's fastest reaction time is obtained; The AI agent adjusts the sending time of the car control command according to the player's fastest reaction time to obtain the car's optimized control command; If the lap completion time difference is less than the set time threshold, there is no need to optimize the car control instructions.
8. The game design method based on AI agent according to claim 7, characterized in that: The method of obtaining the fastest reaction time of the player specifically includes the following steps: Based on the AI agent, the time it takes for the player to complete the lane change command, the acceleration command, and the deceleration command is collected to obtain the completion time of the player's command; Based on AI agents, the completion time of player commands is filtered and processed to obtain the player's fastest reaction time.
9. The game design method based on AI agent according to claim 8, characterized in that: The specific calculation formula for obtaining the player's fastest reaction time is: In the formula, The fastest reaction time for players; is the time it takes for a player's command to be completed; n is the number of times a player's command is completed.
10. A game design system based on AI agent, used to implement a game design method based on AI agent as claimed in any one of claims 1 to 9, characterized in that: include: An AI agent, wherein the AI agent analyzes a racing map and determines parameters related to the racing map, and the AI agent performs a comprehensive analysis based on the parameters related to the racing map and a racing model to determine a racing control instruction; A data calculation module, wherein the data calculation module performs calculations based on the straight position, the straight length, the maximum speed of the car on the straight, and the curve position, the curve length, and the maximum speed of the car on the curve to obtain the fastest straight completion time and the fastest curve completion time of the car. The data calculation module performs sum calculations on the obstacle avoidance time, the straight completion time, and the curve completion time to obtain the real-time completion time of a single lap; An instruction generation model, wherein the instruction generation module generates a lane change instruction, a car acceleration instruction, and a car deceleration instruction according to the obstacle position, the straight position of the runway, and the curve position of the runway; An image processing module, wherein the image processing module performs binarization processing on the racing map to obtain a grayscale image of the racing map; A comparison and judgment module, which performs comparison and judgment based on the single lap completion time difference and a set time threshold, and selects whether to optimize the racing car control command; A database is used to store pixel values of parameters related to the racing map.