CN107617216B - System and method for designing game artificial intelligence task - Google Patents

System and method for designing game artificial intelligence task Download PDF

Info

Publication number
CN107617216B
CN107617216B CN201610566783.9A CN201610566783A CN107617216B CN 107617216 B CN107617216 B CN 107617216B CN 201610566783 A CN201610566783 A CN 201610566783A CN 107617216 B CN107617216 B CN 107617216B
Authority
CN
China
Prior art keywords
task
granularity
tasks
created
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610566783.9A
Other languages
Chinese (zh)
Other versions
CN107617216A (en
Inventor
李茂�
陈汉辉
龙旨日
卢歆翮
陈镇秋
吴海权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Online Game Technology Co Ltd
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Online Game Technology Co Ltd, Chengdu Xishanju Interactive Entertainment Technology Co Ltd filed Critical Zhuhai Kingsoft Online Game Technology Co Ltd
Priority to CN201610566783.9A priority Critical patent/CN107617216B/en
Publication of CN107617216A publication Critical patent/CN107617216A/en
Application granted granted Critical
Publication of CN107617216B publication Critical patent/CN107617216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The technical scheme of the invention comprises a design system of a game artificial intelligence task, which comprises the following steps: the task creator is used for creating the granularity corresponding to the task when the task is created; the task memory stores the created tasks and the granularity list to a task pool; the task manager is used for analyzing and sending the events and the tasks; and the task router is used for combining the tasks into a task execution packet and sending the task execution packet. The technical scheme of the invention comprises a design method of a game artificial intelligence task, which comprises the following steps: creating a granularity corresponding to the task when the task is created; storing the created task and the granularity list to a task pool; analyzing and sending events and tasks; and combining the tasks into a task execution package and sending the task execution package. The invention has the beneficial effects that: the utilization rate of the multi-core CPU is improved, and the computing capacity of the AI is greatly enhanced; the method facilitates the transplantation of game codes among multiple platforms, enhances the maintainability and reusability of the codes, reduces the development cost of the game, and shortens the development period of the game; the expressive force of the game AI is improved.

Description

System and method for designing game artificial intelligence task
Technical Field
The invention relates to a system and a method for designing a game artificial intelligence task, belonging to the field of computer game development.
Background
The traditional game artificial intelligence system can only utilize the computing power of a single thread whether running at a server or a client, and cannot be made into a multi-thread parallel system to run.
Disclosure of Invention
Aiming at the defects of the prior art, the technical scheme of the invention provides a system and a method for designing a game artificial intelligence task, which process artificial intelligence through a parallel virtual machine and make up the defects of the prior art in artificial intelligence processing of large tasks.
The technical scheme of the invention comprises a system for designing artificial intelligence tasks of games, which is characterized by comprising the following steps: the task creator is used for creating the granularity corresponding to the task when the task is created, wherein the granularity is used for recording the created task information, and is also used for creating an event, and the event comprises a plurality of tasks; the task memory is used for storing the created task to a task pool, also used for acquiring the task granularity created by the task creator, stored by using a granularity list and creating a reference unique identifier corresponding to the granularity; the task manager is used for acquiring the tasks and the task granularity stored in the task memory, storing task granularity lists, analyzing different events or/and tasks and sending the events and/or the tasks; and the task router is used for combining a plurality of different tasks into a task execution packet for the task or/and the event task sent by the task manager and sending the task execution packet to the corresponding processor.
According to the design system of the game artificial intelligence task, the task creator further comprises: the task creating module is used for creating a plurality of tasks of corresponding types according to different behaviors of artificial intelligence; the task granularity module is used for calculating and presetting the time and complexity of the created task, and recording the task by using granularity, wherein the information recorded by the granularity comprises the complexity of the task, the consumption of system resources for completing the task and network resources required for completing the task; and the granularity list module is used for sending the task granularity quoted by the tasks to the task manager and is also used for quoting the tasks with the same completion time and the same type by using the same granularity.
According to the design system of the game artificial intelligence task, the task memory further comprises: the task pool module is used for receiving the tasks created by the task creator and storing the tasks into a task pool, wherein the tasks are stored in the task pool by using unique identifiers and data blocks; and the dynamic granularity module is used for dynamically modifying the task granularity state information when the task is executed and the task data is interacted.
According to the design system of the game artificial intelligence task, the task manager further comprises: the analysis module is used for acquiring a task unique identifier in the task pool and further acquiring task data and granularity data; and the sending module is used for sending the analyzed task to the task router for distribution processing.
According to the design system of the game artificial intelligence task, the task router further comprises: and the task combination module is used for combining the tasks with the same type into a task group and further distributing the task group to the distributed processors for processing. And the event processing module is used for acquiring the execution time and complexity of the tasks in the event and dividing the event according to the acquired information, wherein the event processing module is used for processing the tasks with large granularity by using a single processor and processing a plurality of tasks with small granularity by using one or more processors.
The technical scheme of the invention also comprises a design method of the game artificial intelligence task, which is characterized by comprising the following steps: creating a granularity corresponding to the task when the task is created, wherein the granularity is used for recording created task information and creating an event, and the event comprises a plurality of tasks; storing the created task to a task pool, and also obtaining the task granularity created by the task creator, storing the task granularity by using a granularity list, and creating a reference unique identifier corresponding to the granularity; the task granularity and the tasks stored in the task memory are obtained and are also used for storing task granularity lists, analyzing different events or/and tasks and sending the events or/and tasks; and combining a plurality of different tasks into a task execution package for the task or/and the event task sent by the task manager, and sending the task execution package to the corresponding processor.
Further, the method also includes: creating a plurality of tasks of corresponding types according to different behaviors of artificial intelligence; calculating and presetting the time and complexity of the created task, and recording the task by using granularity, wherein the information recorded by the granularity comprises the complexity of the task, the consumption of system resources for completing the task and network resources required for completing the task; and sending the task granularity referred by the task to the task manager, and also using the same granularity to refer to the tasks with the same completion time and the same type.
Further, the method also includes: receiving a task created by the task creator, and storing the task in a task pool, wherein the task is stored in the task pool by a unique identifier and a data block; when the task is executed, the task granularity state information is dynamically modified correspondingly during the interaction process of the task data.
Further, the method also includes: acquiring a task unique identifier of a task pool, and further acquiring task data and granularity data; and sending the analyzed task to a task router for distribution processing.
Further, the method also includes: and merging the tasks with the same type into a task group, and further distributing the task group to a distributed processor for processing. The execution time and the complexity of the tasks in the event are acquired, and the event is divided according to the acquired information, wherein the event is processed by using a single processor for the tasks with large granularity and one or more processors for the tasks with small granularity.
The invention has the beneficial effects that: the development period of the game is greatly shortened, the maintainability and reusability of codes are enhanced, and the experience and the performance of the game are enhanced. Through the parallel virtual machines, the game can use a plurality of processors in one machine or a plurality of machines in one local area network, so that the game experience of the player is enhanced.
Drawings
FIG. 1 is a block diagram illustrating the general architecture of an embodiment according to the present invention;
FIG. 2 is a detailed block diagram according to an embodiment of the present invention;
fig. 3 is a task combination diagram according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments. The system and the method for designing the game artificial intelligence task are suitable for developing games such as stand-alone games, mobile phone games, web games and the like, and are particularly suitable for processing the game artificial intelligence task with a large-scale task.
Fig. 1 is a block diagram showing the overall structure of an embodiment according to the present invention. The processor may be any processor, including processors in computers, processors with processing capabilities in local area networks or the internet. The task creation module is positioned in the game program and is responsible for creating tasks, and the execution time and the complexity of the tasks need to be calculated during creation; the task storage module is used for storing task information and granularity, and can be an internal storage space of a game program or an external storage space; the task manager is responsible for preprocessing and sending tasks; the task router is mainly used for distributing tasks.
Fig. 2 is a detailed structural view illustrating an embodiment according to the present invention. All tasks take place in the processing unit. The processor on the motherboard or the computer resources in the local area network belong to the processing unit. The main game program may be understood as the "master" and all available processing units as its "workers". Thus, the relationship between the main game program and the attached processing units is clearly visible. The processing units do not host work, where they only handle some tasks for the game. A huge problem can subdivide a large number of "tasks" such as path generation, determining the spatial location of the gaming units, wall building, economic analysis, and other game-related activities. Each task is assigned a granularity to efficiently determine its scheduling ranking in the task manager. The granularity of a task may reflect the following information:
1. the size of the task;
2. the computational overhead required to accomplish this task;
3. the bandwidth required to achieve a solution.
Parallel virtual machines are generally better suited to handle those larger tasks. The process of creating a task, i.e. adding a new task to the task pool, generates considerable overhead compared to the actual processing of the task. Therefore, in order to be able to provide tasks to the parallel virtual machine that are more suitable for processing, we will typically only distribute those tasks that have a relatively wide working range, as shown in table 1 below:
Figure 492779DEST_PATH_IMAGE002
fig. 3 is a task combination diagram according to an embodiment of the present invention. The path-finding tasks of the tanks and the soldiers are combined and sent to a single processor for processing due to the fact that time, complexity and types are the same and task granularity is small. The tactical map production and enclosure wall construction tasks have larger granularity and different time, complexity and types, and are processed by a plurality of processors.
Further, the embodiment of the invention also provides 2 practical cases, including a game delivery system and a production system:
(1) the game play-out system, in a typical instant strategy game, when a player conducts political negotiations with an AI body, a general AI system gives a response based on a previously scheduled response. These responses are typically generated based on finite heuristic data and based on enemy statistics (military forces, how close the enemy's unit of action is to the AI's city or base, etc.).
If the AI can evaluate the player's underlying motivation, the political environment it creates will better respond flexibly to the player's behavior and will better represent a near real-world political environment. Using the techniques described herein, a developer of an AI system may compile a series of evaluation tasks and perform the corresponding evaluation tasks based on the events that are currently occurring.
Suppose a player negotiates an out-of-the-field with an AI opponent. The player has nothing to deploy near the base of the AI, but the player has surreptitiously moved the military gradually and continuously from multiple countries to the base of the AI. The AI performs a task in the background to evaluate the whereabouts of enemy troops. By tracking the movement of enemy troops, the AI can determine that the player is staging troops from a number of different locations in the map, with the potential for intrusion into the AI base.
This type of evaluation logic must play an important role in the external negotiation. The AI can then offer to cut down the forces of a country. Since this country poses the most threat to a strategic base of AI.
(2) Another well-defined feature of the production system, for the development of a standard instant strategy game, is the ability of the AI system to manage production, food harvesting, research and development, and other economic activities of the gaming entity. All these functions are implemented as ideal background tasks, executed on other processing units. While the central control mechanism resides in the main program of the game.
In a typical instant strategy game, the core gaming entity acts to harvest a particular resource. These resources are then shipped to different factories, producing different gaming units or supplies. A parallel virtual machine task can be written to perform resource flow analysis on these plants. The task of this resource flow analysis is primarily to ensure that each factory has the appropriate resources available to produce or manufacture a particular gaming unit or other resource. Each plant may also have a direct or indirect consumer, depending entirely on the product produced by the plant.
The system can be used not only on the game AI, but also to assist the player. Many instant strategy games have managers who are responsible for managing and controlling cities or bases. These logic driving the AI system can also be used to operate a player's town and require little CPU overhead. Many AI systems can now accomplish these tasks, but if these tasks can be run in the background, more traditional resources can be released for other new tasks, providing a more immersive and complete gaming experience for the player.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and the present invention shall fall within the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (6)

1. A system for designing a game artificial intelligence task, the system comprising:
the task creator is used for creating the granularity corresponding to the task when the task is created, wherein the granularity is used for recording the created task information, and is also used for creating an event, and the event comprises a plurality of tasks;
the task memory is used for storing the created task to a task pool, also used for acquiring the task granularity created by the task creator, stored by using a granularity list and creating a reference unique identifier corresponding to the granularity;
the task manager is used for acquiring the tasks and the task granularity stored in the task memory, storing task granularity lists, analyzing different events or/and tasks and sending the events and/or the tasks;
the task router is used for combining a plurality of different tasks into a task execution packet for the task or/and the event task sent by the task manager and sending the task execution packet to the corresponding processor;
wherein, the task creator also comprises:
the task creating module is used for creating a plurality of tasks of corresponding types according to different behaviors of artificial intelligence;
the task granularity module is used for calculating and presetting the time and complexity of the created task, and recording the task by using granularity, wherein the information recorded by the granularity comprises the complexity of the task, the consumption of system resources for completing the task and network resources required for completing the task;
the granularity list module is used for sending the task granularity quoted by the tasks to the task manager and is also used for quoting the tasks with the same completion time and the same type by using the same granularity;
the task router further comprises:
the task combination module is used for combining the tasks with the same type into a task group and further distributing the task group to the distributed processor for processing; and the event processing module is used for acquiring the execution time and complexity of the tasks in the event and dividing the event according to the acquired information, wherein the event processing module is used for processing the tasks with large granularity by using a single processor and processing a plurality of tasks with small granularity by using one or more processors.
2. A system for designing a gaming artificial intelligence task according to claim 1, wherein said task memory further comprises:
the task pool module is used for receiving the tasks created by the task creator and storing the tasks into a task pool, wherein the tasks are stored in the task pool by using unique identifiers and data blocks;
and the dynamic granularity module is used for dynamically modifying the task granularity state information when the task is executed and the task data is interacted.
3. A system for designing a gaming artificial intelligence task according to claim 1, wherein said task manager further comprises:
the analysis module is used for acquiring a task unique identifier of the task pool and further acquiring task data and granularity data;
and the sending module is used for sending the analyzed task to the task router for distribution processing.
4. A method for designing a game artificial intelligence task, the method comprising:
creating a granularity corresponding to the task when the task is created, wherein the granularity is used for recording the created task information and creating an event, and the event comprises a plurality of tasks;
storing the created task to a task pool, acquiring the task granularity created by the task creator, storing by using a granularity list and creating a reference unique identifier corresponding to the granularity;
acquiring tasks and task granularity stored in a task memory, storing task granularity lists respectively, analyzing different events or/and tasks and sending the events and/or tasks;
combining a plurality of different tasks into a task execution packet for the task or/and the event task sent by the task manager, and sending the task execution packet to a corresponding processor;
the method further comprises the following steps:
creating a plurality of tasks of corresponding types according to different behaviors of artificial intelligence;
calculating and presetting the time and complexity of the created task, and recording the task by using granularity, wherein the information recorded by the granularity comprises the complexity of the task, the consumption of system resources for completing the task and network resources required for completing the task;
sending the task granularity quoted by the tasks to a task manager, and quoting the tasks with the same completion time and the same type by using the same granularity;
the method further comprises the following steps:
merging the tasks with the same type into a task group, and further distributing the task group to a distributed processor for processing;
the execution time and the complexity of the tasks in the event are acquired, and the event is divided according to the acquired information, wherein the event is processed by using a single processor for the tasks with large granularity and one or more processors for the tasks with small granularity.
5. The method for designing a gaming artificial intelligence task of claim 4, further comprising:
receiving a task created by the task creator, and storing the task in a task pool, wherein the task is stored in the task pool by a unique identifier and a data block;
when the task is executed, the task granularity state information is dynamically modified correspondingly during the interaction process of the task data.
6. The method for designing a gaming artificial intelligence task of claim 4, further comprising:
acquiring a task unique identifier of a task pool, and further acquiring task data and granularity data;
and sending the analyzed task to a task router for distribution processing.
CN201610566783.9A 2016-07-15 2016-07-15 System and method for designing game artificial intelligence task Active CN107617216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610566783.9A CN107617216B (en) 2016-07-15 2016-07-15 System and method for designing game artificial intelligence task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610566783.9A CN107617216B (en) 2016-07-15 2016-07-15 System and method for designing game artificial intelligence task

Publications (2)

Publication Number Publication Date
CN107617216A CN107617216A (en) 2018-01-23
CN107617216B true CN107617216B (en) 2020-10-16

Family

ID=61087802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610566783.9A Active CN107617216B (en) 2016-07-15 2016-07-15 System and method for designing game artificial intelligence task

Country Status (1)

Country Link
CN (1) CN107617216B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681902A (en) * 2012-05-15 2012-09-19 浙江大学 Load balancing method based on task distribution of multicore system
CN102929725A (en) * 2012-11-12 2013-02-13 中国人民解放军海军工程大学 Dynamic reconfiguration method of signal processing parallel computing software
CN104657217A (en) * 2015-02-04 2015-05-27 南京理工大学紫金学院 Heterogeneous granularity classification-based cloud environment task scheduling method
CN105446742A (en) * 2015-12-11 2016-03-30 珠海金山网络游戏科技有限公司 Optimization method for artificial intelligence performing task
CN105700959A (en) * 2016-01-13 2016-06-22 南京邮电大学 Multi-core platform oriented multithreaded division and static balancing scheduling policy

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5867704A (en) * 1995-02-24 1999-02-02 Matsushita Electric Industrial Co., Ltd. Multiprocessor system shaving processor based idle state detection and method of executing tasks in such a multiprocessor system
CN100415329C (en) * 2005-01-11 2008-09-03 中兴通讯股份有限公司 Game system automatic generation method and its device
CN101453398A (en) * 2007-12-06 2009-06-10 怀特威盛软件公司 Novel distributed grid super computer system and method
KR101626378B1 (en) * 2009-12-28 2016-06-01 삼성전자주식회사 Apparatus and Method for parallel processing in consideration of degree of parallelism
CN101937370B (en) * 2010-08-16 2013-02-13 中国科学技术大学 Method and device supporting system-level resource distribution and task scheduling on FCMP (Flexible-core Chip Microprocessor)
CN102063336B (en) * 2011-01-12 2013-02-27 国网电力科学研究院 Distributed computing multiple application function asynchronous concurrent scheduling method
JP5596644B2 (en) * 2011-09-13 2014-09-24 株式会社ソニー・コンピュータエンタテインメント Information processing system, portable information terminal, and information processing method
CN104331321B (en) * 2014-10-09 2017-04-19 冷明 Cloud computing task scheduling method based on tabu search and load balancing
CN105435450B (en) * 2015-11-27 2019-08-20 深圳市望尘科技有限公司 A kind of game implementation method of pre-generated game fighting segment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681902A (en) * 2012-05-15 2012-09-19 浙江大学 Load balancing method based on task distribution of multicore system
CN102929725A (en) * 2012-11-12 2013-02-13 中国人民解放军海军工程大学 Dynamic reconfiguration method of signal processing parallel computing software
CN104657217A (en) * 2015-02-04 2015-05-27 南京理工大学紫金学院 Heterogeneous granularity classification-based cloud environment task scheduling method
CN105446742A (en) * 2015-12-11 2016-03-30 珠海金山网络游戏科技有限公司 Optimization method for artificial intelligence performing task
CN105700959A (en) * 2016-01-13 2016-06-22 南京邮电大学 Multi-core platform oriented multithreaded division and static balancing scheduling policy

Also Published As

Publication number Publication date
CN107617216A (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN110898428B (en) Multi-virtual object interaction method, device, server and storage medium
Peng et al. R-storm: Resource-aware scheduling in storm
US9577911B1 (en) Distributed computation system incorporating agent network, paths and associated probes
Warneke et al. Exploiting dynamic resource allocation for efficient parallel data processing in the cloud
Fu et al. Progress-based container scheduling for short-lived applications in a kubernetes cluster
CN110308982B (en) Shared memory multiplexing method and device
CN111737012B (en) Data packet synchronization method, device, equipment and storage medium
Schmidt et al. Elastic infrastructure to support computing clouds for large-scale cyber-physical systems
Mao et al. Elastic resource management for deep learning applications in a container cluster
Shen et al. Area of simulation: Mechanism and architecture for multi-avatar virtual environments
Kasenides et al. A systematic mapping study of MMOG backend architectures
CN107617216B (en) System and method for designing game artificial intelligence task
WO2023142587A1 (en) Virtual object control method and apparatus, device, medium, and program product
Malathy et al. Performance improvement in cloud computing using resource clustering
US11630834B2 (en) Label-based data representation I/O process and system
Raaen et al. Lears: A lockless, relaxed-atomicity state model for parallel execution of a game server partition
Cicirelli et al. Performance of a multi-agent system over a multi-core cluster managed by terracotta
Hsu et al. A job scheduling design for visualization services using GPU clusters
Sethia High performance multi-agent system based simulations
Nardin et al. Scale and topology effects on agent-based simulation: A trust-based coalition formation case study
Koeman et al. Designing a cognitive agent connector for complex environments: a case study with starcraft
CN109104497A (en) A kind of method for processing business and device based on cloud platform
Lee et al. Exploiting remote GPGPU in mobile devices
Seilfaldet Performance analysis of job-scheduling in multi-user hadoop clusters
Ramasubramanian et al. Studies on Performance Aspect of Scheduling Algorithms on Multicore Platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Patentee after: CHENGDU XISHANJU INTERACTIVE ENTERTAINMENT TECHNOLOGY Co.,Ltd.

Address before: 519000 Jinshan software building, 8 Lanshan lane, Jida Jingshan Hill Road, Zhuhai, Guangdong

Patentee before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Patentee before: CHENGDU XISHANJU INTERACTIVE ENTERTAINMENT TECHNOLOGY Co.,Ltd.