Intelligent agent game method and device, computer equipment and readable storage medium

By setting up a resource proxy in the agent game system, decoupling the interaction between the agent and the environment, the stability problems caused by excessive resource occupation or collapse of the agent are solved, and the stability and reliability of the system are improved.

CN119158248APending Publication Date: 2024-12-20PENG CHENG LAB
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411237695.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

During the game of agents, when an agent occupies too much computing resources or runs crash, it will reduce the stability and reliability of the system and affect the game environment and other agents.

Method used

By setting up a resource proxy, determine the call order and resource proxy of each game proxy agent, the interactive process decoupling between the agent and the game environment is realized, ensuring the resource independence of each agent, and avoiding excessive resource consumption or crashes. Impact on other agents and the environment.

Benefits of technology

It improves the stability and reliability of the system during gameplay by agents, ensuring that even if a certain agent consumes a large amount of resources or collapses, it will not directly affect the target game environment or other agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119158248A_ABST
    Figure CN119158248A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an agent game playing method and device, computer equipment and a readable storage medium. Comprising the following steps: in response to a game triggering operation for a target game environment, determining a calling sequence of game agent agents in the current target game environment; acquiring a current game state of the target game environment, and generating game action calling information of the corresponding game agent according to the game state; determining a resource agent end associated with each game agent agent, sending the game action calling information to the corresponding game agent agent through the resource agent end, and obtaining game action information returned by the game agent agent; the game action information received by the resource agent side is fed back to the target game environment through the connection interface, and game match information is formed according to the multiple pieces of game action information in the target game environment; and performing intelligent agent game playing in the target game playing environment based on the game playing information. Therefore, the stability and the reliability of the system during intelligent agent game playing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game confrontation technology, and in particular to an intelligent agent game method, device, computer equipment and readable storage medium. Background Art

[0002] Agent game refers to the process in which multiple agents (which can be software, robots, algorithm models, objects, etc.) interact in a specific game environment and try to make decisions through interaction and strategy selection. By simulating and optimizing the interaction process between agents, we can understand and optimize the strategy selection and benefit distribution in the agent system, so as to find more effective decision-making solutions in complex systems and improve the overall performance and efficiency of the system.

[0003] In the related art, during the game of intelligent agents, the game environment can provide the current state to the intelligent agent, and the intelligent agent can select the corresponding action according to the state, so that the game environment can update the state according to the action. However, this interaction method may directly affect the game environment or other intelligent agents when an intelligent agent occupies too many computing resources or crashes, thereby reducing the stability and reliability of the system. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose an intelligent agent game method, device, computer equipment and readable storage medium, which can improve the stability and reliability of the system during the intelligent agent game.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes an agent game method, the method comprising:

[0006] In response to a game triggering operation for a target game environment, determining a calling order of each game agent intelligent body in the current target game environment;

[0007] Acquire the current game state of the target game environment, and generate game action calling information of the game agent intelligent body corresponding to the calling sequence according to the game state;

[0008] Determine the resource agent terminal associated with each of the game agent intelligent entities, send the game action call information to the corresponding game agent intelligent entity through the resource agent terminal, and obtain the game action information returned by the game agent intelligent entity according to the game action call information;

[0009] Feeding back the game action information received by the resource agent to the target game environment through a connection interface, and forming game match information according to a plurality of game action information corresponding to a plurality of game agent intelligent entities in the target game environment;

[0010] Based on the game information, an intelligent agent game is performed in the target game environment.

[0011] Accordingly, a second aspect of the embodiment of the present application provides an intelligent agent game device, the device comprising:

[0012] A response module, used to respond to the game triggering operation for the target game environment and determine the calling order of each game agent intelligent body in the current target game environment;

[0013] A generation module, used to obtain the current game state of the target game environment, and generate game action call information of the game agent intelligent body corresponding to the call sequence according to the game state;

[0014] An acquisition module, used to determine the resource agent terminal associated with each of the game agent intelligent entities, send the game action call information to the corresponding game agent intelligent entity through the resource agent terminal, and obtain the game action information returned by the game agent intelligent entity according to the game action call information;

[0015] A feedback module, used to feed back the game action information received by the resource agent to the target game environment through a connection interface, and form game information according to a plurality of game action information corresponding to a plurality of game agent intelligent bodies in the target game environment;

[0016] A game module is used to conduct intelligent agent game in the target game environment based on the game match information.

[0017] In some implementations, the acquisition module is further used to:

[0018] According to the calling sequence of each game agent intelligent body, determine the agent identifier of the game agent intelligent body corresponding to the current calling sequence;

[0019] The resource agent corresponding to the agent identifier is determined through the total resource agent, and the game action call information is sent to the resource agent corresponding to the game agent agent through the connection interface, so that the resource agent sends the game action call information to the corresponding game agent agent; wherein the total resource agent is used to establish and store the corresponding relationship between multiple game agent agents and multiple resource agents in the target game environment.

[0020] In some implementations, each of the game agent agents is a machine agent agent or an object agent agent, and the acquisition module is further used to:

[0021] The obtaining of the game action information returned by the game agent according to the game action calling information comprises:

[0022] When the game agent is a machine agent, the game action information returned by the machine agent after selecting an action according to the game action call information is obtained through the resource agent.

[0023] When the game agent agent is an object agent agent, the game action information returned by the object agent agent according to the game action call information is obtained through the resource agent terminal; wherein, the game action information is received by the object agent agent through a long connection with the terminal after forwarding the game action call information to the terminal for action selection.

[0024] In some embodiments, the agent game device further includes a building module for:

[0025] Determine the service sub-node corresponding to the resource agent, and the client sub-node corresponding to each of the game agent intelligent entities;

[0026] Network communication between the resource agent and the corresponding game agent is established through the network interface between the service sub-node and each of the client sub-nodes.

[0027] In some embodiments, the establishing module is further used to:

[0028] Get the amount of available resources in the system;

[0029] Obtaining a preset resource amount threshold, and comparing the available resource amount with the resource amount threshold to obtain a comparison result;

[0030] Based on the comparison result, the service sub-node and the client sub-node are allocated to corresponding computing nodes for execution.

[0031] In some embodiments, the establishing module is further used to:

[0032] When the comparison result indicates that the available resource amount is greater than the resource amount threshold, the service sub-node and each of the client sub-nodes are allocated to different computing nodes for operation;

[0033] When the comparison result indicates that the available resource amount is less than the resource amount threshold, the service sub-node and each of the client sub-nodes are allocated to the same computing node for execution.

[0034] In some embodiments, the agent game device further includes a receiving module, which is used to:

[0035] For the target gaming environment, create a corresponding total resource agent;

[0036] Receive registration information of each of the game agent intelligent entities through the external port of the general resource agent terminal;

[0037] Verifying the registration information to obtain a verification result;

[0038] When the verification result indicates that the verification of the game agent intelligent body is passed, a resource agent terminal corresponding to the game agent intelligent body is created in the general resource agent terminal.

[0039] Correspondingly, the third aspect of the embodiments of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the intelligent agent game method described in any one of the embodiments of the first aspect of the present application when executing the computer program.

[0040] Correspondingly, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the intelligent agent game method described in any one of the embodiments of the first aspect of the present application.

[0041] The embodiment of the present application responds to a game trigger operation for a target game environment and determines the calling order of each game agent intelligent body in the current target game environment; obtains the current game state of the target game environment, and generates game action calling information of the game agent intelligent body corresponding to the calling order according to the game state; determines the resource agent end associated with each game agent intelligent body, sends the game action calling information to the corresponding game agent intelligent body through the resource agent end, and obtains the game action information returned by the game agent intelligent body according to the game action calling information; feeds back the game action information received by the resource agent end to the target game environment through the connection interface, and forms game match information according to multiple game action information corresponding to multiple game agent intelligent bodies in the target game environment; and conducts intelligent body game in the target game environment based on the game match information. In this way, by setting up a resource proxy terminal, the decoupling of the interaction process between the game agent and the target game environment can be achieved, ensuring the resource independence of each game agent. Even if a game agent consumes a large amount of computing resources or crashes, it will not have a direct impact on the target game environment or other game agent agents, thereby improving the stability and reliability of the system during the agent game. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the architecture of the intelligent agent game system provided in the embodiment of the present application;

[0043] Figure 2 is an architecture diagram of a game controller component provided in an embodiment of the present application;

[0044] Figure 3 is a flow chart of the intelligent agent game method provided in an embodiment of the present application;

[0045] Figure 4 It is an overall flow chart of the intelligent agent game method provided in the embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of the functional modules of the intelligent agent game device provided in the embodiment of the present application;

[0047] Figure 6 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] Agent game refers to the process in which multiple agents (which can be software, robots, algorithm models, objects, etc.) interact in a specific game environment and try to make decisions through interaction and strategy selection. By simulating and optimizing the interaction process between game agent agents, we can understand and optimize the strategy selection and benefit distribution in the agent game system, so as to find more effective decision-making solutions in complex systems and improve the overall performance and efficiency of the system.

[0052] In the related art, during the game of intelligent agents, the game environment can provide the current state to the intelligent agent, and the intelligent agent can select the corresponding action according to the state, so that the game environment can update the state according to the action. However, this interaction method may directly affect the game environment or other intelligent agents when an intelligent agent occupies too many computing resources or crashes, thereby reducing the stability and reliability of the system.

[0053] Moreover, when conducting game confrontation experiments, game confrontation test platforms are often limited by their own independent control systems. For advanced scenarios that require spanning multiple intelligent agents, supporting different types of combat modes, and being able to flexibly configure resources, different systems need to be configured separately. The system compatibility is poor, and the configuration cost will increase accordingly.

[0054] Before introducing the specific solution of this application, the technical terms designed in this application are explained first:

[0055] Target game environment (Env): The simulation environment during the intelligent agent's game process, which can usually provide current observations to the outside world, receive game action information and then affect the internal game state. For example, the rule implementation of a Go game (excluding the strategy of playing chess) can usually be understood as an Env. Players can observe the current situation of the chessboard and receive the chessboard action from a certain player at a specific time.

[0056] Game agent (Agent): The agent in the game confrontation problem can receive the real-time game status from Env, then make action decisions and pass them to Env to realize game simulation interaction.

[0057] GameLoop: refers to the process of continuous cyclic interaction between the target game environment and the game agent intelligent body during a game confrontation experiment. For example, in a Go game, the two game agent intelligent bodies A and B place their pieces on the board one after another according to the Go rules until the game ends. The whole process can be expressed by a GameLoop.

[0058] Application Programming Interface (API): It can be the external interface of a software program, allowing external users to call certain internal functions of the program.

[0059] Total resource agent (AgentHub): A functional module in this application used to manage the access and subsequent calls of multiple game agent agents.

[0060] Resource ProxyAgent: A functional module in this application for proxy packaging of the model code functions of the game proxy agent, which can shield the differences in the internal implementation of different game proxy agents, and split the operation and call of the game proxy agent into different processes, so as to avoid the problem that the crash of individual game proxy agents directly leads to the crash of the entire game confrontation test. Each resource proxy corresponds to a game proxy agent.

[0061] Remote Procedure Call (RPC): The main functional goal of RPC is to make it easier to build distributed computing (applications) while providing powerful remote calling capabilities without losing the semantic simplicity of local calls. To achieve this goal, the RPC framework provides a transparent calling mechanism so that users do not have to explicitly distinguish between local calls and remote calls.

[0062] Based on this, the embodiments of the present application provide an intelligent agent game method, apparatus, computer equipment and readable storage medium, which can improve the stability and reliability of the system during intelligent agent game.

[0063] The intelligent agent game method, device, computer equipment and readable storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the intelligent agent game system in the embodiments of the present application is described.

[0064] Please refer to Figure 1 In some implementations, an embodiment of the present application provides an intelligent agent game system, and the intelligent agent game system includes a terminal 11 and a server 12.

[0065] For example, the terminal 11 can be a user's personal computer, mobile device or dedicated agent operation server, which is responsible for sending game operation instructions to the game agent agent corresponding to the server 12 after the game process is enabled. The game operation instructions include but are not limited to the operation instructions of real players through the graphical user interface. In this way, after receiving the game operation instructions, the game agent agent can generate corresponding game action information according to the game state of the game environment.

[0066] Exemplarily, the server end 12 may be one or more server computers, which have high computing power and storage capacity to support the smooth execution of the agent game process. Specifically, the server end 12 may uniformly call the game environment and the game agent agent to implement the game confrontation process.

[0067] Please refer to Figure 2 In some implementations, the server may be configured as follows: Figure 2 The game controller component shown. Exemplarily, the game controller component can realize the unified call of the game environment and the game agent at the code level based on a set of common game environment (Env) and game agent (Agent) API specifications to form the GameLoop code implementation of the game confrontation process. It is understandable that the specific API specification is not limited as long as it meets the business requirements.

[0068] For example, since each GameLoop loop contains a game environment and n game agent agents (n>=1), the game controller component can be designed to adopt a server-client architecture with different numbers of game agent agents. Specifically, the game environment and control logic can be placed in the process of a server node, while multiple game agent agents run in independent client node processes. The server node and the client node communicate and interact through the network RPC to realize remote calls to the game environment and game agent agents.

[0069] In some embodiments, in order to support different types of game agent agents (machine agent agents and object agent agents), the game controller component adopts the design of general resource agent terminal (AgentHub) and resource agent terminal (ProxyAgent). Specifically, a general resource agent terminal can be first added to the process of the service subnode to manage the connection or RPC call of all game agent agents.

[0070] Furthermore, the total resource agent can create a corresponding resource agent for each game agent intelligent body, so that when the game confrontation GameLoop is executed, the game environment can directly interact with the resource agents of multiple game agent intelligent bodies through API without considering network connections, resource competition and other issues.

[0071] By setting up a total resource proxy, the game agent intelligent body can be separated from the main process of game interaction to achieve better resource isolation and error and exception isolation. For example, if a game agent intelligent body consumes a large amount of computing resources or crashes, it will not directly affect the game environment or other game agent intelligent bodies, so that the intelligent body game process can still achieve better resource isolation and error and exception isolation even in a multi-machine scenario.

[0072] Furthermore, the game controller component can be compatible with single-machine or multi-machine distributed scheduling schemes based on various underlying resource orchestration systems such as bare metal, K8s (full name Kubernetes, an open source platform for managing containers). Specifically, in single-node mode, service sub-nodes and customer sub-nodes can run on the same computing node to reduce resource pressure and communication overhead; in multi-node mode, service sub-nodes and customer sub-nodes can be distributed on different computing nodes, communicate and collaborate through the network, and achieve stricter resource isolation between different customer sub-nodes.

[0073] The intelligent agent game method in the embodiments of the present application can be illustrated by the following embodiments.

[0074] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application will be obtained.

[0075] In the embodiments of the present application, the description will be made from the perspective of an intelligent agent game device, which can be integrated into a computer device. Figure 3 , Figure 3 This is a flowchart of the steps of the agent game method provided in the embodiment of the present application. In the embodiment of the present application, the agent game device is specifically integrated on a terminal or a server as an example. When the processor on the terminal or the server executes the program instructions corresponding to the agent game method, the specific process is as follows:

[0076] Step 101, in response to a game triggering operation for a target game environment, determining a calling order of each game agent intelligent body in the current target game environment.

[0077] In some embodiments, in order to ensure the smooth progress of the intelligent agent game process, the calling order of each game agent intelligent agent in the current target game environment can be determined in response to the game trigger operation for the target game environment, thereby ensuring the fairness and orderliness of the intelligent agent game process and improving resource utilization efficiency.

[0078] The target game environment can be a simulation environment implemented by software, in which agents interact according to specific rules. For example, a Go game can be used as a target game environment, in which the game agent needs to place chess pieces on the board according to the Go rules.

[0079] The game triggering operation may be an action or condition that triggers the start of the game confrontation experiment. The game triggering operation may be manually triggered by a user or automatically triggered, depending on the specific application scenario.

[0080] Among them, the game agent can be an intelligent entity participating in the game confrontation experiment. The game agent can be a machine agent (robot agent) or an object agent (real player). Therefore, the game agent can be driven by an algorithm (such as a machine learning model) or controlled by a real player.

[0081] Exemplarily, when all game agent intelligent bodies are ready, the game confrontation experiment can be started by clicking a button, or the experiment can be started automatically when certain external conditions are met. The game trigger operation is the key signal for the start of the game confrontation experiment.

[0082] Exemplarily, there is a Gobang game environment containing three game agent agents A, B, and C. When the user clicks the "Start Game" button, the system will respond to the game trigger operation and determine that game agent agent A goes first, followed by game agent agent B, and finally game agent agent C. Exemplarily, the system can determine the calling order based on the type of agent (robot or real person) and other preset conditions. For example, if agent A is an object agent, and B and C are machine agent agents, the system may first call the real player agent A to operate, and then call the robot agents B and C. Alternatively, the calling order of each game agent in the current target game environment can also be determined according to the control logic for this agent game.

[0083] By responding to the game triggering operation for the target game environment and determining the calling order of each game agent intelligent body in the current target game environment, it is possible to ensure that the intelligent body game is carried out efficiently and smoothly.

[0084] In some implementations, in order to enable the system to effectively support different types of game agent agents and to be able to run in a single-machine or multi-machine environment, a corresponding total resource agent terminal can be created for different target game environments before the agent game process begins to improve the versatility and stability of the system. For example, before step 101, the following may also be included:

[0085] (C.1) Create a corresponding total resource agent for the target gaming environment;

[0086] (C.2) receiving registration information of each game agent through the external port of the general resource agent;

[0087] (C.3) Verify the registration information and obtain the verification result;

[0088] (C.4) When the verification result indicates that the verification of the game agent has passed, a resource agent corresponding to the game agent is created in the total resource agent.

[0089] The total resource agent can be used to manage and coordinate all different types of game agent agents participating in the game in the target game environment, and create a corresponding resource agent for each game agent agent. Each total resource agent corresponds to a target game environment.

[0090] Among them, the external port can be one or more ports opened to the outside by the general resource agent, which are used to receive registration information from each game agent intelligent body.

[0091] Among them, the verification result can be the result of the general resource agent verifying the received registration information, which is used to confirm the identity of the game agent intelligent entity and whether it is qualified to participate in the corresponding game environment.

[0092] The resource agent can be a local agent of each game agent. The resource agent encapsulates the connection interface of the game agent, so that external callers (such as the target game environment, etc.) can interact with the game agent by calling the connection interface of the resource agent. Furthermore, the resource agent implements the communication logic with the game agent, which means that any call to the game agent will be forwarded by the resource agent to the real game agent.

[0093] Specifically, after all the game agent agents in the corresponding target game environment are registered, the general resource agent creates a resource agent corresponding to each game agent agent and manages the resource agent to facilitate the calling of the game agent agents in the subsequent game cycle.

[0094] Exemplarily, for example, when the target game environment is a Gobang game environment, a total resource agent is first created, and the external port of the total resource agent is 5000. After the creation is completed, wait for all game agent agents to connect and register through the external port 5000.

[0095] Furthermore, when game agent agents A, B, and C are started in sequence, each game agent agent attempts to connect to the external port 5000 and sends its own registration information (such as name, version number, authentication key, etc.) to the general resource agent. The general resource agent can verify the received registration information and obtain the verification result.

[0096] For example, the general resource agent can check whether the game agent provides the correct authentication key, whether the configuration requirements of the agent game are met, etc., to ensure the smooth progress of the agent game process. If the verification is passed, the general resource agent records the status of the corresponding game agent as "ready".

[0097] Furthermore, for each game agent in the target game environment, a resource agent corresponding to each agent can be created. For example, if game agent A and game agent C pass the verification, the total resource agent will create resource agent A for game agent A and resource agent C for game agent C.

[0098] Specifically, the external API interface of the resource proxy is consistent with the API interface of the agent, and the system calls the resource proxy and directly calls the agent at the code level. In addition, the resource proxy communicates with the game agent through RPC, encapsulating the details of the remote call, so that when the system calls the resource proxy, it is almost the same as directly calling the corresponding game agent. In this way, while achieving resource isolation, there is no need to consider the complexity of remote calls, so that the system can focus on the game logic itself.

[0099] It should be noted that, while the general resource agent creates a resource agent for each game agent, the association between the agent identifier of the game agent and the resource agent can be stored in a mapping table maintained internally by the general resource agent, so that after the subsequent agent game process is started, the game agent can interact by calling the resource agent to achieve isolation of each game agent from the target game environment, as well as isolation from other game agent agents.

[0100] Through the above method, it can be ensured that all game agent intelligent bodies have been correctly verified and prepared before the game officially starts, which improves the flexibility of the system.

[0101] Step 102, obtaining the current game state of the target game environment, and generating game action calling information of the game agent intelligent body corresponding to the calling sequence according to the game state.

[0102] In some embodiments, in order to ensure that the game agent intelligent agent game can be carried out according to certain rules and logic, the current game state can be obtained to ensure that all game agent intelligent agents participating in the game can make decisions according to the real-time game state. In addition, in order to enable the game agent intelligent agent to generate corresponding actions according to the current game state, game action call information can be generated according to the preset rules of the corresponding target game environment to ensure the orderliness of the game process.

[0103] The game state can be a collection of all relevant information in the current target game environment, including the states of various factors that affect the game process. The game state includes but is not limited to the current configuration of the target game environment, the information of each game agent, and other relevant information.

[0104] The game action call information may be instructions or data used to instruct the game agent to perform specific actions during the game process. The game action call information at least includes the game state of the target game environment and relevant call information for the game agent, such as a specific action call function.

[0105] Specifically, in order to ensure that the game agent can make decisions based on the latest game state, in GameLoop, when the game agent needs to make a game action, the game state of the target game environment can be obtained, and the game state can be sent to the resource agent by initiating an API call to the resource agent. Here, the game state and the related call information of the API are used as the game action call information. Further, the resource agent sends the game state to the corresponding resource agent through an RPC request to the game agent. Here, the RPC request and the game state are used as the game action call information.

[0106] By obtaining the current game state of the target game environment and generating game action call information of the game agent corresponding to the calling order according to the game state, each decision made by the game agent can be based on the latest game state, ensuring that the game agent can respond to changes in the environment in a timely manner.

[0107] Step 103, determine the resource agent terminal associated with each game agent, send the game action call information to the corresponding game agent through the resource agent terminal, and obtain the game action information returned by the game agent according to the game action call information.

[0108] In some embodiments, in order to ensure the stability and reliability of the system during the game between intelligent agents, the game action call information can be sent to the corresponding game agent agent through the resource agent terminal, rather than directly sending the game action call information to the game agent agent. In this way, it is possible to avoid excessive resource consumption of the game agent agent that occupies the resources of other game agent agents, and it is also possible to avoid a direct impact on the target game environment or other game agent agents when a certain game agent agent consumes a large amount of computing resources or crashes. In this way, the flexibility, stability and reliability of the system during the game between intelligent agents are improved.

[0109] Among them, the game action information can be the action taken by the game agent based on the game state of the target game environment after receiving the game action call information.

[0110] It should be noted that each game agent intelligent body has a resource agent end associated with it, which can be determined by looking up the association table established by the total resource agent end. Since the API interface of the game agent intelligent body and the corresponding resource agent end is the same, it can also be determined through the API interface.

[0111] For example, if it is determined according to the GameLoop cycle that the game action information of the game agent A needs to be obtained, the resource agent A associated with the game agent A can be determined by searching according to the preset association table. Further, the game action call information can be generated according to the game state, and the game action call information includes a specific function call request, such as the get action function, which is used to request the game agent A to calculate its next action.

[0112] Furthermore, when the game action information of the game agent A needs to be called, an API call to the resource agent A can be initiated based on the game action call information to perform a get action function call on the resource agent A.

[0113] Further, after receiving the game action call information including the get action function, the resource agent A performs an RPC call on the game agent agent A to perform the get action function call on the game agent agent A. After receiving the game action call information including the get action function, the game agent agent A calculates the next game action information according to the game state included in the game action call information.

[0114] Furthermore, the game agent intelligent agent A can return the game action information to the resource agent terminal A through the RPC interface. After receiving the game action information, the resource agent terminal A feeds back the game action information to the target game environment through the API interface, so that the target game environment updates the environment state according to the game action information.

[0115] Specifically, different game environments have different calling rules. GameLoop can determine the specific game agent that needs to be called according to the calling rules, and then call the getact function through the resource agent corresponding to the agent ID. The resource agent then calls the getact function on the corresponding game agent through the network and obtains the game action information returned by the game agent. During the entire calling process, the game state is transmitted through the game action call information, and the game action information returned by each game state agent in each round is obtained in this cycle.

[0116] Through the above method, the system can effectively and flexibly call the corresponding game agent intelligent entities dynamically according to the needs of the game environment, while ensuring the standardization and scalability of the calling process. The number of game agents can be flexibly configured, so that the system can adapt to a variety of game scenarios.

[0117] In some implementations, in order to enhance the stability and reliability of the system, a total resource agent terminal may be set up, each of which corresponds to a game environment, so as to achieve unified management of multiple game agent intelligent entities within different game environments, as well as isolation between different game environments at the execution level, to avoid information interaction between different game environments. In this way, the system can be widely applied to different game environments, improving the versatility of the system. For example, in step 103, "sending the game action call information to the corresponding game agent intelligent entity through the resource agent terminal" may include:

[0118] (103.a1) According to the calling order of each game agent intelligent body, determine the agent identifier of the game agent intelligent body corresponding to the current calling order;

[0119] (103.a2) Determine the resource agent corresponding to the agent identifier through the total resource agent, and send the game action call information to the resource agent of the corresponding game agent agent through the connection interface, so that the resource agent sends the game action call information to the corresponding game agent agent; wherein the total resource agent is used to establish and store the correspondence between multiple game agent agents and multiple resource agents in the target game environment.

[0120] The agent identifier can be a unique identifier assigned to each game agent, which is used to distinguish each game agent in the game environment, so as to determine the interaction order of the game agent in the turn-based game. The agent identifier can be a number, a letter, or a combination of numbers and letters.

[0121] The total resource agent can be a special management component in the game environment, which is used to maintain and manage the correspondence between all game agent agents and resource agents. The total resource agent is responsible for establishing, storing and updating these correspondences to ensure that each game agent agent is associated with the correct resource agent.

[0122] The connection interface may be a common API interface in the game environment, and the connection interface is used to send and receive data, such as game action call information and game action information. This application uses a unified API interface specification to ensure that the interaction between all game agent intelligent bodies and the game environment follows the same rules, so that the system can adapt to different types of game agent intelligent bodies and game environments.

[0123] In some embodiments, each gaming environment has a corresponding total resource agent, that is, each total resource agent is independent and can be customized for different gaming environments. Thus, even if different gaming environments have completely different rules, numbers of gaming agent agents, categories of gaming agent agents, or gaming methods, each total resource agent segment can still effectively manage and coordinate its corresponding gaming agent agents, thereby ensuring the versatility and flexibility of the system. For example, when the gaming environment is a table of Landlords, there is a corresponding resource agent 1, and when the gaming environment is two tables of chess, there are object resource agents 2 and 3. By configuring a corresponding total resource agent for each gaming environment, resource isolation is enhanced. Even if a gaming environment has a problem, it will not affect the normal operation of other gaming environments. That is, in the intelligent agent gaming system, multiple intelligent agent gaming processes can be processed in parallel, and there will be no mutual interference between the processes, thereby improving the efficiency of intelligent agent gaming.

[0124] In some implementations, a connection interface corresponding to the game environment type and game agent type that the system actually needs to cover can be provided. The connection interface is a universal API interface, so that the system can flexibly adapt to a variety of different game scenarios, whether it is a single agent, multiple agents, perfect information game, imperfect information game, or various game problem types such as turn-based and non-turn-based.

[0125] For example, if you need to design a single-agent game system that is compatible with hundreds of Atari mini-games, you can use the open source Gymnas i um solution. Gymnas i um is a mature simulation environment library that can support various types of Atari mini-games and provides a set of standardized API interfaces as connection interfaces, which are suitable for building game systems that interact with single agents and game environments.

[0126] For example, if you need to design a system that is compatible with various multiplayer turn-based board games such as Go, Landlord, Mahjong, and Chess, you can use the open source RLCard library, OpenSpie l library, etc. The RLCard library and OpenSpie l library can provide a unified API interface, so that you can build a highly compatible, flexible and easy-to-expand intelligent agent game system to support various types of game environments and game agent agents.

[0127] It should be noted that most of the various API solutions can be compatible with a variety of different game environments within a specific game problem type, such as single-agent game problems, multi-person turn-based game problems, perfect information games, imperfect information games, etc., but there is currently no open source API specification that can be compatible with all types of game problems. The specific connection interface settings are determined according to actual conditions. For example, an API interface that is applicable to more game environments that need to be covered can be selected as the system connection interface, or an API interface can be selected as the system connection interface. This application does not make specific restrictions on this.

[0128] Specifically, by determining the resource proxy end through the proxy identifier and forwarding the action call information through the resource proxy end, resource isolation between the game proxy agent and the game environment can be achieved. Exemplarily, in the Doudizhu game environment, each game proxy agent represents a player. If the call sequence indicates that it is the turn of player 2 to play cards, then the system needs to determine the agent identifier of player 2. If player 2 is a machine agent, its agent identifier is Agent ID_2. Then the resource proxy end corresponding to AgentID_2 can be queried, and the resource proxy end corresponding to player 2 is obtained as ProxyAgent_2.

[0129] Furthermore, the system can send game action call information to ProxyAgent_2 through the connection interface to request the card-playing action of player 2, and ProxyAgent_2 then sends game action call information to player 2 through the network to obtain the card-playing action of player 2.

[0130] Through the above methods, the interaction between the game agent and the game environment can be simplified, the decoupling of the game agent and the game environment can be achieved, and the unified management of the game agent can be achieved, which will help make the agent game process more stable and efficient.

[0131] In some implementations, each game agent belongs to a machine agent or an object agent. In order to ensure that the system can operate efficiently when processing different types of game agent agents, different methods can be used to obtain game action information for different types of game agent agents to meet different technical requirements and ensure the smooth progress of the agent game process. For example, "obtaining the game action information returned by the game agent according to the game action call information" in step 103 can include the following two situations:

[0132] When the game agent is a machine agent, the game action information returned by the machine agent after selecting an action based on the game action call information is obtained through the resource agent.

[0133] When the game agent belongs to the object agent, the game action information returned by the object agent according to the game action call information is obtained through the resource agent; wherein, the game action information is received by the object agent through the long connection between the terminal and the terminal after the object agent forwards the game action call information to the terminal for action selection.

[0134] Among them, the machine agent intelligent agent can be an intelligent agent that makes decisions through algorithms or models. The machine agent intelligent agent is a program running on the server side that can automatically calculate the next game action based on the game status.

[0135] Among them, the object proxy agent can be the agent of a real player. The object proxy agent needs to make decisions through human-computer interaction, that is, it needs to wait for the real player to make game action selections through a terminal (such as a web front end or a mobile application).

[0136] Among them, the terminal can be a device or interface for users (usually real players) to interact with the system, such as a web front end, mobile application, desktop application, etc.

[0137] Among them, the long connection can be a continuous network connection state, which allows the object proxy agent on the server side and the corresponding terminal to maintain continuous data exchange.

[0138] Exemplarily, when the game agent is a machine agent, the system can send game action call information to the corresponding resource agent through a connection interface. The resource agent calls the machine agent based on the game action call information through a network interface. After receiving the game action call information, the machine agent selects an action according to the game state in the game action call information, calculates the next game action information, and feeds back the game action information to the target game environment through the resource agent to update the game state of the target game environment.

[0139] Exemplarily, when the game agent belongs to the object agent, the object can log in and enter the game environment through the browser or application on the terminal, and the terminal will try to establish a WebSocket connection with the object agent on the server side, and specifically send a WebSocket handshake request to the server. The object agent on the server side can receive the WebSocket handshake request from the terminal and verify the WebSocket handshake request. When the verification is passed, a confirmation message is sent to complete the establishment of the WebSocket connection (long connection).

[0140] Furthermore, the object proxy agent can send the current game state to the application on the terminal through a long connection and display it to the object (player). The object can click on the terminal screen or press buttons on the terminal to select game action information through a mouse, keyboard, touch screen, etc., and send the game action information to the object proxy agent on the server through a long connection.

[0141] Furthermore, after the object proxy agent on the server side receives the game action information sent by the terminal, it returns it to the corresponding resource proxy side through the network interface. The resource proxy side returns the game action information to the target game environment through the connection interface, so that the target game environment updates the corresponding state.

[0142] It should be noted that when the game agent includes an object agent, the long connection between the terminal and the object agent of the server does not need to be reset in each game round, but is maintained during the entire agent game process. Further, in order to ensure the normal operation of the agent game process, the terminal and the server can determine the connection status by regularly sending heartbeat packets. When the server does not receive the heartbeat packet sent by the terminal within a preset time, it attempts to re-establish the connection with the terminal.

[0143] By distinguishing between machine agent agents and object agent agents and adopting different processing methods, the system can realize efficient, flexible and user-friendly game confrontation experiments, ensuring that an efficient and optimized game experience can be provided in scenarios with different types of game agent agents.

[0144] Step 104, feeding back the game action information received by the resource agent to the target game environment through the connection interface, and forming game match information according to multiple game action information corresponding to multiple game agent intelligent bodies in the target game environment.

[0145] In some embodiments, in order to effectively conduct intelligent agent games in a target game environment, game match information can be formed based on multiple game action information corresponding to multiple game agent intelligent agents in the target game environment, so as to facilitate efficient interaction between the game agents and the target game environment.

[0146] In some implementations, the game match information may be one of object-to-machine game match information, object-to-object game match information, and machine-to-machine game match information.

[0147] Among them, the game information can be a collection of game action information of all game agent intelligent agents, changes in the game state of the target game environment, and other relevant data during a complete intelligent agent game process.

[0148] Specifically, after receiving the game action information of all game agent intelligent bodies in the current game round, the target game environment will update the game state according to the game action information to form the game match information of each game agent intelligent body.

[0149] For example, the target game environment corresponds to game agent A, game agent B, and game agent C. When the game action information received is that game agent A moves to position (3,4), game agent B attacks game agent C, and game agent C uses "shield", game match information can be formed according to the game action information of all game agent agents and the game state of the current target game environment. Alternatively, the game match information can also be formed after the target game environment synchronizes or sequentially updates the game state according to the game action information of all agents.

[0150] Through the above methods, efficient interaction between the game agent and the target game environment can be ensured, making the agent game process smoother and more real-time.

[0151] Step 105, conducting intelligent agent game in the target game environment based on the game information.

[0152] In some embodiments, in order to ensure that the game information can be effectively applied in the target game environment, intelligent agent games can be conducted in the target game environment based on the game information to promote the game process between game agent agents and determine key indicators such as victory, score, survival time, etc. of the game agent agents in the target game environment.

[0153] For example, if there are three game agent agents, namely agent A, agent B and agent C. The three agents play a turn-based agent game on a 5x5 chessboard. Each agent can choose to move, attack or use skills, and the game action information of each agent will affect the game state of the entire game. If the game state of the current target game environment is that agent A is at position (3,4), with a health value of 80 / 100, agent B is at position (2,2), with a health value of 50 / 100, and is facing a skill cooldown time of 2 rounds, agent C is at position (4,4), with a health value of 30 / 100, and the shield skill is in effect (reducing 20% ​​damage). Furthermore, after receiving the game action information of agents A, B, and C, the game information formed includes: the current game state, agent A moves toward the position of agent C and prepares to launch an attack in the next round, agent B decides to move away from agents A and C and move to the edge of the board (1,1) to avoid being involved in the battle, and agent C decides not to move temporarily due to low health and the effectiveness of the shield skill, but to wait for further protection of the shield in place.

[0154] Furthermore, after the game information is formed, Agent A, Agent B, and Agent C will act according to their own game action information, and the system will update the state on the board according to these decisions. For example, in the current game round, Agent A is at (4,4) with health 80 / 100, Agent B is at (1,1) with health 50 / 100, and the skill cooldown time is reduced to 1 round, and Agent C is still at (4,4) with health 30 / 100, and the remaining rounds of the shield skill are reduced.

[0155] In the above way, each game agent takes action based on the current game information and then updates the game state, so that the game agent can play adaptive games in a constantly changing game environment, thereby promoting the progress of the agent game process.

[0156] In some implementations, in order to efficiently realize data transmission and operation calls between the resource proxy end and the game proxy agent, a network communication (RPC communication) can be established between the service sub-node where the resource proxy end is located and the client sub-node where the game proxy agent is located, so as to realize the real-time and stability of data transmission in the agent game process. For example, the agent game method also includes:

[0157] (A.1) Determine the service sub-node corresponding to the resource agent, and the client sub-node corresponding to each game agent;

[0158] (A.2) Establish network communication between the resource agent and the corresponding game agent intelligent body through the network interface between the service sub-node and each client sub-node.

[0159] Among them, the service sub-node can be the computing node where all resource agents are located, that is, the computing node corresponding to the target game environment. The service sub-node is the physical or virtual location where the resource agent runs.

[0160] Among them, the client sub-node can be the computing node where the game agent intelligent body is located. Each client sub-node can be located on the same computing node or on different computing nodes. The client sub-node is the physical or virtual location where the game agent intelligent body runs.

[0161] Among them, the network interface can be a software or hardware interface used to realize data transmission between the service sub-node and the client sub-node. It defines the protocol and format of network communication. The network interface supports communication mechanisms such as RPC to ensure that even if a remote call is required, the speed is consistent with the local call, ensuring real-time interaction between the game agent intelligent body and the resource agent.

[0162] In some implementations, the service sub-node and the client sub-node may be located in different computing nodes or in the same computing node.

[0163] For example, the service subnode Node_1 corresponding to the resource proxy ProxyAgent_1 can be determined, and Node_1 can be a physical server or a virtual machine. The client subnode Node_2 corresponding to the machine proxy agent 1, the client subnode Node_3 corresponding to the machine proxy agent 2, and the client subnode Node_4 corresponding to the object proxy agent can be determined, and Node_2, Node_3 and Node_4 can be physical servers, virtual machines or containers, etc.

[0164] Furthermore, network communication between the resource proxy terminal ProxyAgent_1 and the corresponding game proxy agent can be established through the network interface between the service subnode Node_1 and the client subnodes Node_2, Node_3, and Node_4. The network communication can be in the form of RPC to achieve efficient data exchange. For example, RPC frameworks such as gRPC and Thrift can be used to achieve network communication.

[0165] In some embodiments, the communication interface supports a custom serialization method to ensure that data can be correctly transmitted between any service sub-node and the corresponding client sub-node. Exemplarily, ClodPickle can be used as a serialization method to better support various custom types of Python, which can perfectly support most Python-based game confrontation model algorithms. Furthermore, if it is necessary to expand to other machine languages ​​such as C++ and Java, it can be switched to other serialization technologies such as Protobuf.

[0166] By establishing network communication through the network interface between the service sub-node and the client sub-node, efficient data exchange between the resource agent and the corresponding game agent intelligent body can be achieved, thereby enhancing the stability of the system.

[0167] In some implementations, in order to optimize resource management and task scheduling, the service sub-nodes and the client sub-nodes may be allocated to corresponding computing nodes for operation according to the available resources of the system, so as to achieve efficient utilization of computing resources. For example, the agent game method may also include:

[0168] (B.1) Obtain the available resources of the system;

[0169] (B.2) obtaining a preset resource amount threshold, and comparing the available resource amount with the resource amount threshold to obtain a comparison result;

[0170] (B.3) Based on the comparison result, the service sub-node and the customer sub-node are assigned to the corresponding computing nodes for operation.

[0171] The available resource amount may be the amount of computing resources currently available in the system for allocation to the service sub-node and the client sub-node. The available resource amount may include the number of CPU cores, memory size, disk space, etc.

[0172] The resource amount threshold may be a pre-set standard value of resource usage, which is used to limit excessive allocation of resources to prevent system overload.

[0173] The comparison result may be a result obtained by comparing the available resource amount with the resource amount threshold, and the comparison result may be used to guide resource allocation decisions.

[0174] Among them, the computing node can be a physical or virtual computer used to run a service sub-node or a client sub-node. The computing node can be a physical server, a virtual machine, a container, etc.

[0175] Exemplarily, if the available resource amount of the current system is available memory, and the available memory is 8 GB, and if the preset resource amount threshold is 6 GB, the available resource amount is compared with the resource amount threshold to obtain a comparison result.

[0176] Furthermore, the comparison result can be analyzed to determine whether the service subnode and the customer subnode can be allocated to the corresponding computing nodes for operation according to the current available resource amount. Specifically, when the comparison result indicates that the current available resource amount is greater than the resource amount threshold, the service subnode and the customer subnode can be allocated to different computing nodes for operation. For example, if there is one service subnode and three customer subnodes, the service subnode can be allocated to computing node 1, customer subnode 1 can be allocated to computing node 2, customer subnode 2 can be allocated to computing node 3, and customer subnode 3 can be allocated to computing node 4.

[0177] In some embodiments, the available resources may be available memory, or may be the number of CPU cores, disk space, etc. In this case, a comparison may be made from multiple dimensions to obtain a comparison result. For example, a first comparison result is obtained by comparing the number of available CPU cores with a preset threshold value of the number of CPU cores; a second comparison result is obtained by comparing the available disk space with a preset disk space threshold; a third comparison result is obtained by comparing the available memory with a preset memory threshold. Further, the service sub-node and the client sub-node may be allocated to corresponding computing nodes for operation according to the first comparison result, the second comparison result, and the third comparison result. For example, when the first comparison result, the second comparison result, and the third comparison result all indicate that the amount of available resources is greater than the resource amount threshold, or the amount of available resources of any two comparison results is greater than the resource amount threshold, the service sub-node and the client sub-node may be allocated to different computing nodes for operation.

[0178] By comparing and analyzing the amount of resources, the resource allocation strategy can be dynamically adjusted to achieve effective allocation and management of resources and improve resource utilization.

[0179] In some implementations, in order to improve resource utilization efficiency, the service sub-nodes and the client sub-nodes may be dynamically allocated to different computing nodes for operation according to the comparison results to ensure stable operation of the system and resource utilization. For example, (B.3) may include:

[0180] When the comparison result indicates that the available resources are greater than the resource threshold, the service sub-node and each customer sub-node are allocated to different computing nodes for operation;

[0181] When the comparison result indicates that the available resource amount is less than the resource amount threshold, the service sub-node and each client sub-node are allocated to the same computing node for operation.

[0182] Exemplarily, when the target game environment is a Landlord game confrontation test, the target game environment includes two machine agent agents and one object agent agent. If the available resources of the current system are CPU core number: 4, memory size: 8GB, disk space: 100GB, the preset resource threshold is CPU core number: 3, memory size: 6GB, disk space: 50GB. Compare the available resources with the resource threshold, and obtain the comparison result that the available CPU core number is greater than the CPU core number threshold, the available memory is greater than the memory threshold, and the available disk space is greater than the disk space threshold. Further, according to the comparison result, the service sub-node and the customer sub-node can be assigned to different computing nodes for operation, for example, the service sub-node can be assigned to computing node 1, the customer sub-node 1 can be assigned to computing node 2, the customer sub-node 2 can be assigned to computing node 3, and the customer sub-node 3 can be assigned to computing node 4.

[0183] It is understandable that if the number of computing nodes is small, the goal can be to minimize the number of subnodes on each computing node, and the subnodes can be evenly distributed on the computing nodes as much as possible. And the number of subnodes on each computing node can be minimized. For example, when there are 3 computing nodes, the service subnode can be allocated to computing node 1, customer subnode 1 and customer subnode 2 can be allocated to computing node 2, and customer subnode 3 can be allocated to computing node 3.

[0184] When the available resources are less than the resource threshold, all service subnodes and customer subnodes can be assigned to the same computing node for operation. For example, the service subnode, customer subnode 1, customer subnode 2, and customer subnode 3 can all be assigned to computing node 1 to reduce the resource pressure and communication overhead of the system.

[0185] By obtaining the available resources of the system, setting resource thresholds, comparing the available resources and resource thresholds, and allocating service sub-nodes and customer sub-nodes to corresponding computing nodes for operation based on the comparison results, it helps to optimize resource management and task scheduling and utilize resources more effectively in a distributed computing environment.

[0186] In some embodiments, in combination Figure 4 The overall process of intelligent agent game is introduced. The following is a game control process of a game environment. This process is applicable to all intelligent agent game processes. In the actual implementation process, the following process can be deleted or added according to the actual situation.

[0187] Exemplarily, for each gaming environment, a total resource agent can be created first, and a listening port A can be opened to the outside, waiting for the client subnodes corresponding to all gaming agent agents to connect and register. When each client subnode is started in turn, it immediately tries to connect to the listening port A for identity authentication and registration. When the identity authentication and registration of the client subnode are successful, the corresponding gaming agent agent is ready. At this time, the total resource agent can create a resource agent corresponding to the gaming agent agent, and the resource agent is responsible for the subsequent interactive calls. Furthermore, the service subnode where the total resource agent is located and the client subnode where each gaming agent agent is located can establish a communication channel, so that the resource agent can remotely call the corresponding gaming agent agent through the network later.

[0188] Furthermore, when all the game agent intelligent bodies corresponding to the game environment have been successfully registered, you can wait for the start of the GameLoop game cycle.

[0189] For example, before the GameLoop game cycle starts, the game environment and game agent intelligent bodies can be initialized on the server side. For example, when the game environment is initialized, the initial state of the game environment, the game rules and the game objectives can be set; when the game agent intelligent bodies are initialized, the parameters of each game agent intelligent body can be set, the model is loaded, and other preparations can be performed to ensure that it is in a usable state.

[0190] Furthermore, before the start of each game round, the game agent and the game environment need to be reset, which can be done by resetting the internal state of the game agent, clearing historical data, and resetting the game state and cached data of the game environment.

[0191] Furthermore, after the GameLoop game cycle starts, the current game state of the game environment can be obtained in the service sub-node, and then the game action call information including the game state is sent to the client sub-node of the corresponding game agent intelligent body through the resource agent end, that is, the get_action interface of the corresponding game agent intelligent body is called to obtain the game action information of the game agent intelligent body.

[0192] After receiving the game action information from the game agent, the service subnode transmits the game action information to the game environment, performs step simulation (i.e., agent game) based on the formed game information, and records the new game state and reward information.

[0193] It should be noted that after each round of game, it is possible to judge whether the game process has entered a termination state. For example, the game agent can be judged to have entered a termination state based on whether the score of the game agent has reached a specified score, or the game agent has reached a specific trigger event, etc., and the GameLoop cycle can be ended at this time. If the game agent has not entered a termination state, then the game needs to continue, and the score, winning rate, action sequence, etc. of the game agent should be recorded in each round of game until a specific trigger event is reached. It is understandable that the specific rules for triggering the termination state can be determined by the developer, and the embodiments of the present application do not specifically limit this.

[0194] The embodiment of the present application responds to a game trigger operation for a target game environment and determines the calling order of each game agent intelligent body in the current target game environment; obtains the current game state of the target game environment, and generates game action calling information of the game agent intelligent body corresponding to the calling order according to the game state; determines the resource agent end associated with each game agent intelligent body, sends the game action calling information to the corresponding game agent intelligent body through the resource agent end, and obtains the game action information returned by the game agent intelligent body according to the game action calling information; feeds back the game action information received by the resource agent end to the target game environment through the connection interface, and forms game match information according to multiple game action information corresponding to multiple game agent intelligent bodies in the target game environment; and conducts intelligent body game in the target game environment based on the game match information. In this way, by setting up a resource proxy terminal, the decoupling of the interaction process between the game agent and the target game environment can be achieved, ensuring the resource independence of each game agent. Even if a game agent consumes a large amount of computing resources or crashes, it will not have a direct impact on the target game environment or other game agent agents, thereby improving the stability and reliability of the system during the agent game.

[0195] See also Figure 5 The embodiment of the present application further provides an intelligent agent game device, which can implement the above-mentioned intelligent agent game method, and the intelligent agent game device includes:

[0196] A response module 51 is used to respond to the game triggering operation for the target game environment and determine the calling order of each game agent in the current target game environment;

[0197] A generation module 52 is used to obtain the current game state of the target game environment and generate game action call information of the game agent agent corresponding to the call sequence according to the game state;

[0198] The acquisition module 53 is used to determine the resource agent terminal associated with each game agent, send the game action call information to the corresponding game agent through the resource agent terminal, and obtain the game action information returned by the game agent according to the game action call information; wherein the game action information is generated by the game agent after receiving the game operation instruction sent by the corresponding client, and selecting the action based on the game action call information;

[0199] A feedback module 54 is used to feed back the game action information received by the resource agent to the target game environment through the connection interface, and form game information according to multiple game action information corresponding to multiple game agent intelligent bodies in the target game environment;

[0200] The game module 55 is used to conduct intelligent agent games in the target game environment based on the game game information.

[0201] The specific implementation of the agent game device is basically the same as the specific implementation of the agent game method described above, and will not be repeated here. On the premise of meeting the requirements of the embodiment of this application, the agent game device can also be provided with other functional modules to implement the agent game method in the above embodiment.

[0202] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned intelligent agent game method when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0203] See also Figure 6 , Figure 6 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:

[0204] The processor 61 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0205] The memory 62 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 62 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 62, and the processor 61 is called to execute the intelligent agent game method of the embodiment of this application;

[0206] Input / output interface 63, used to implement information input and output;

[0207] Communication interface 64, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0208] A bus 65 that transmits information between the various components of the device (e.g., the processor 61, the memory 62, the input / output interface 63, and the communication interface 64);

[0209] The processor 61 , the memory 62 , the input / output interface 63 and the communication interface 64 are connected to each other in communication within the device via a bus 65 .

[0210] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned intelligent agent game method is implemented.

[0211] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0212] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0213] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0214] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0215] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0216] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0217] It should be understood that in the present application, "at least one (item)" and "several" refer to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0218] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0219] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0220] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0221] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0222] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An intelligent agent game method, characterized in that: The method comprises: In response to a game triggering operation for a target game environment, determining a calling order of each game agent intelligent body in the current target game environment; Acquire the current game state of the target game environment, and generate game action calling information of the game agent intelligent body corresponding to the calling sequence according to the game state; Determine the resource agent terminal associated with each of the game agent intelligent entities, send the game action call information to the corresponding game agent intelligent entity through the resource agent terminal, and obtain the game action information returned by the game agent intelligent entity according to the game action call information; Feeding back the game action information received by the resource agent to the target game environment through a connection interface, and forming game match information according to a plurality of game action information corresponding to a plurality of game agent intelligent entities in the target game environment; Based on the game information, an intelligent agent game is performed in the target game environment.

2. The agent game method according to claim 1, characterized in that: The sending of the game action call information to the corresponding game agent through the resource agent terminal includes: According to the calling sequence of each game agent intelligent body, determine the agent identifier of the game agent intelligent body corresponding to the current calling sequence; The resource agent corresponding to the agent identifier is determined through the total resource agent, and the game action call information is sent to the resource agent corresponding to the game agent agent through the connection interface, so that the resource agent sends the game action call information to the corresponding game agent agent; wherein the total resource agent is used to establish and store the corresponding relationship between multiple game agent agents and multiple resource agents in the target game environment.

3. The agent game method according to claim 1, characterized in that: Each of the game agent intelligent agents is a machine agent intelligent agent and an object agent intelligent agent; The obtaining of the game action information returned by the game agent according to the game action calling information comprises: When the game agent is a machine agent, the game action information returned by the machine agent after selecting an action according to the game action call information is obtained through the resource agent. When the game agent agent is an object agent agent, the game action information returned by the object agent agent according to the game action call information is obtained through the resource agent terminal; wherein, the game action information is received by the object agent agent through a long connection with the terminal after forwarding the game action call information to the terminal for action selection.

4. The agent game method according to claim 1, characterized in that: The method further comprises: Determine the service sub-node corresponding to the resource agent, and the client sub-node corresponding to each of the game agent intelligent entities; Network communication between the resource agent and the corresponding game agent is established through the network interface between the service sub-node and each of the client sub-nodes.

5. The agent game method according to claim 4, characterized in that: The method further comprises: Get the amount of available resources in the system; Obtaining a preset resource amount threshold, and comparing the available resource amount with the resource amount threshold to obtain a comparison result; Based on the comparison result, the service sub-node and the client sub-node are allocated to corresponding computing nodes for execution.

6. The agent game method according to claim 5, characterized in that: The step of allocating the service sub-node and the client sub-node to corresponding computing nodes for execution based on the comparison result includes: When the comparison result indicates that the available resource amount is greater than the resource amount threshold, the service sub-node and each of the client sub-nodes are allocated to different computing nodes for operation; When the comparison result indicates that the available resource amount is less than the resource amount threshold, the service sub-node and each of the client sub-nodes are allocated to the same computing node for execution.

7. The agent game method according to claim 1, characterized in that: Before responding to the game triggering operation for the target game environment and determining the calling order of each game agent intelligent body in the current target game environment, the method further includes: For the target gaming environment, create a corresponding total resource agent; Receive registration information of each of the game agent intelligent entities through the external port of the general resource agent terminal; Verifying the registration information to obtain a verification result; When the verification result indicates that the verification of the game agent intelligent body is passed, a resource agent terminal corresponding to the game agent intelligent body is created in the general resource agent terminal.

8. An intelligent agent game device, characterized in that: The device comprises: A response module, used to respond to the game triggering operation for the target game environment and determine the calling order of each game agent intelligent body in the current target game environment; A generation module, used to obtain the current game state of the target game environment, and generate game action call information of the game agent intelligent body corresponding to the call sequence according to the game state; An acquisition module, used to determine the resource agent terminal associated with each of the game agent intelligent entities, send the game action call information to the corresponding game agent intelligent entity through the resource agent terminal, and obtain the game action information returned by the game agent intelligent entity according to the game action call information; A feedback module, used to feed back the game action information received by the resource agent to the target game environment through a connection interface, and form game information according to a plurality of game action information corresponding to a plurality of game agent intelligent bodies in the target game environment; A game module is used to conduct intelligent agent game in the target game environment based on the game match information.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the intelligent agent game method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the intelligent agent game method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Deep reinforcement learning method and system based on multiple agents

    CN119561829A

  • Multi-agent cooperation method and device based on MCP mechanism and medium

    CN120893590A