Video game processing program and video game processing system

By implementing server-side task extraction, planning generation, control and partial re-planning functions in video games, unnatural behavior problems caused by task failure in the hierarchical task network are solved, and more natural and coherent character behavior is achieved.

JP7654137B2Active Publication Date: 2025-03-31SQUARE ENIX HLDG CO LTD
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
JP2024066152
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-03-31
Estimated Expiration
2039-09-04

Smart Images

  • Figure 0007654137000001
    Figure 0007654137000001
  • Figure 0007654137000002
    Figure 0007654137000002
  • Figure 0007654137000003
    Figure 0007654137000003
Patent Text Reader

Abstract

To make planning by a hierarchical task network in which the action of a character to be controlled looks natural executable.SOLUTION: Provided is a video game processing program, including: extracting a plurality of tasks to be planned from a domain including at least one or more compound tasks in which a plurality of methods are set; determining a task to be executed including an execution order for the extracted plurality of tasks to make a plan; controlling an action of a character on the basis of the plan; generating a new plan in accordance with a change in a state of a world state; when a part where a task is changed between the generated new plan and a plan being executed is branched by a method higher than the task being executed, discarding the plans under execution and replacing them with new plans; and when the plans are replaced, controlling the action of the character on the basis of the plans after the replacement.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] At least one embodiment of the present invention relates to a video game processing program and a video game processing system for causing a server to execute a process of generating a plan based on a hierarchical task network, the plan specifying the tasks to be executed, including the order of execution, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and controlling the actions of the character in a virtual space based on the plan. [Background technology]

[0002] Conventionally, various techniques have been proposed for moving characters in video games.

[0003] Among these technologies, there is one that searches for a character's movement route using position information related to a virtual space that constitutes a video game, and uses a navigation mesh and waypoints. In order to suppress an increase in the processing load required for searching for a movement route, there is also one that determines the arrangement of the route candidate positions in a search area so that the intervals between route candidate positions located outside a predetermined range of the search area are greater than the intervals between route candidate positions located within the predetermined range of the search area (see Patent Document 1). [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2012-213485 A Summary of the Invention [Problem to be solved by the invention]

[0005] Incidentally, a hierarchical task network has been used as a method for automatically determining tasks to be executed by characters not operated by a user in video games and controlling the characters. A hierarchical task network holds a set of tasks that can be executed under given conditions as a domain, grasps the state of the world state at that time, and determines a plan to select optimal tasks according to the state of the world state and execute them in an appropriate execution order.

[0006] By using a hierarchical task network, it becomes possible to plan optimal actions according to changing environments such as the situation of the virtual space in which the character acts. In other words, when introducing AI for character control, the developer does not need to determine the connection relationships between all tasks in advance, such as in a tree structure, so there is an advantage in that the burden on the developer is reduced. On the other hand, since the process of creating a plan using a hierarchical task network and the process of executing the planned plan are separate processes, in the past, if a task in the middle of the plan failed, the planning had to be restarted from the beginning. In this case, when observing objectively the character controlled based on the plan, it may appear that the character suddenly starts executing an action that is unrelated to the action that it attempted to execute and failed, that is, it may appear to be performing unnatural actions.

[0007] An object of at least one embodiment of the present invention is to provide a video game processing program and a video game processing device capable of executing planning using a hierarchical task network in which the actions of a controlled character appear to be natural. [Means for solving the problem]

[0008] According to a non-limiting aspect, a video game processing program according to one embodiment of the present invention is a video game processing program for causing a server to realize a process of generating a plan based on a hierarchical task network, the plan specifying the tasks to be executed, including the order of execution, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and controlling the actions of the character in a virtual space based on the plan, the video game processing program including: an extraction function for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set therein; a planning function for determining a task to be executed, including the order of execution, for the extracted plurality of tasks, to generate the plan; a control function for controlling the actions of the character based on the planned plan; a replanning function for generating a new plan in response to a change in the world state; and a replacement function for discarding all of the plans being executed and replacing them with the new plan if a portion of a task that has been changed between the new plan generated and the plan being executed branches off at a method higher than the method being executed, and the control function is characterized in that, when a plan is replaced based on the replacement function, the control function controls the actions of the character based on the replaced plan.

[0009] According to a non-limiting aspect, a video game processing system according to one embodiment of the present invention includes a communication network, a server, and a user terminal, and generates a plan based on a hierarchical task network, the plan specifying tasks to be executed, including the order of execution, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and causes the user terminal to realize a process of controlling the action of the character in a virtual space based on the plan. The video game processing system includes an extraction means for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set therein, a planning means for determining a task to be executed, including the order of execution, for the extracted plurality of tasks, to generate the plan, a control means for controlling the action of the character based on the planned plan, a replanning means for generating a new plan in response to a change in a world state situation, and a replacement means for discarding all of the plan being executed and replacing it with the new plan if a part where a task has been changed between the generated new plan and the plan being executed branches off at a method higher than the method being executed, and the control means controls the action of the character based on the replaced plan when the plan has been replaced based on the replacement means.

[0010] According to a non-limiting aspect, a video game processing program according to one embodiment of the present invention is a video game processing program for causing a user terminal to realize a process of generating a plan based on a hierarchical task network, the plan specifying the tasks to be executed, including the order of execution, from a domain including at least one compound task having a plurality of methods set therein, and controlling the behavior of the character in a virtual space based on the plan, the video game processing program including: an extraction function for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set therein; a planning function for determining a task to be executed, including the order of execution, for the extracted plurality of tasks, to generate the plan; a control function for controlling the behavior of the character based on the planned plan; a replanning function for generating a new plan in response to a change in the world state; and a replacement function for discarding all of the plans being executed and replacing them with the new plan if a portion of a task that has been changed between the new plan generated and the plan being executed branches off at a method higher than the method being executed, and the control function is characterized in that, when a plan is replaced based on the replacement function, the control function controls the behavior of the character based on the replaced plan. Effect of the Invention

[0011] Each embodiment of the present application addresses one or more of the deficiencies. [Brief description of the drawings]

[0012] [Figure 1] 1 is a block diagram showing an example of a configuration of a video game processing system corresponding to at least one of the embodiments of the present invention. [Diagram 2] 1 is a block diagram showing a configuration of a server device according to at least one of the embodiments of the present invention; [Diagram 3] 11 is a flowchart showing an example of a character control process corresponding to at least one of the embodiments of the present invention. [Figure 4]11 is a flowchart showing an example of a server-side operation in a character control process corresponding to at least one of the embodiments of the present invention. [Diagram 5] 11 is a flowchart showing an example of an operation on the terminal side in a character control process corresponding to at least one of the embodiments of the present invention. [Figure 6] 1 is a block diagram showing a configuration of a server device according to at least one of the embodiments of the present invention; [Figure 7] 11 is a flowchart showing an example of a character control process corresponding to at least one of the embodiments of the present invention. [Figure 8] 1 is a block diagram showing a configuration of a server device according to at least one of the embodiments of the present invention; [Figure 9] 11 is a flowchart showing an example of a character control process corresponding to at least one of the embodiments of the present invention. [Figure 10] 1 is a block diagram showing a configuration of a server device according to at least one of the embodiments of the present invention; [Figure 11] 11 is a flowchart showing an example of a character control process corresponding to at least one of the embodiments of the present invention. [Figure 12] FIG. 1 is an explanatory diagram for explaining an overview of planning using a hierarchical task network corresponding to at least one of the embodiments of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, examples of embodiments of the present invention will be described with reference to the drawings. Note that the various components in the examples of the embodiments described below can be appropriately combined to the extent that no inconsistencies or the like arise. In addition, the contents described as an example of one embodiment may be omitted in other embodiments. In addition, the contents of operations and processes that are not related to the characteristic parts of each embodiment may be omitted. Furthermore, the order of various processes that make up the various flows described below is random to the extent that no inconsistencies or the like arise in the process contents.

[0014] [First embodiment] Fig. 1 is a block diagram showing an example of the configuration of a video game processing system 100 in one embodiment of the present invention. As shown in Fig. 1, the video game processing system 100 includes a server device 10 and user terminals 201 to 20n (n is any integer. Hereinafter, these may be simply referred to as user terminal 20) used by users of the video game processing system. Note that the configuration of the video game processing system 100 is not limited to this, and it may be configured so that a single user terminal is used by multiple users, or may be configured to include multiple server devices.

[0015] The server device 10 and the multiple user terminals 201 to 20n are each connected to a communication network 30 such as the Internet. Although not shown, the multiple user terminals 201 to 20n are connected to the communication network 30 by performing data communication with a base station managed by a communication carrier via a wireless communication line, for example.

[0016] The video game processing system 100 includes a server device 10 and a plurality of user terminals 201 to 20n, and thereby realizes various functions for executing various processes in response to user operations.

[0017] The server device 10 is managed by an administrator of the video game processing system 100, and has various functions for providing information on various processes to the multiple user terminals 201 to 20n. In this example, the server device 10 is configured by an information processing device such as a WWW server, and has a storage medium for storing various information. The server device 10 has general components for performing various processes as a computer, such as a control unit and a communication unit, but the description thereof will be omitted here. In addition, in the video game processing system 100, it is preferable that the server device 10 manages various information from the viewpoint of reducing the processing load on each of the multiple user terminals 201 to 20n. However, the storage unit that stores various information only needs to have a storage area accessible by the server device 10, and may be configured to have a dedicated storage area outside the server device 10, for example.

[0018] Each of the multiple user terminals 201-20n is managed by a user, and may be, for example, a communication terminal such as a mobile phone terminal or a PDA (Personal Digital Assistant), and must be equipped with a camera device for users to take moving images and / or still images, and a display for displaying the captured image data, etc. Other examples of the configuration of a user terminal include so-called wearable devices such as smart watches, and combinations of wearable devices and communication terminals, etc. The camera device may be an optical camera or a three-dimensional camera device. The user terminals 201-20n are also equipped with input means such as a mouse, touch panel, touch pen, etc. for inputting drawing information.

[0019] Each of the multiple user terminals 201-20n is equipped with hardware and software for connecting to the communication network 30 and executing various processes by communicating with the server device 10. Note that each of the multiple user terminals 201-20n may be configured to be able to communicate directly with each other without going through the server device 10.

[0020] In the process of performing information processing, the server device 10 transmits the processing process to the user terminals 201 to 20n as appropriate, and the user terminals 201 to 20n display screen contents based on the received processing process on the display screen of the display device. The screen contents may be generated on the server device 10 side or on the user terminals 201 to 20n side.

[0021] 2 is a block diagram showing a configuration of a server device corresponding to at least one of the embodiments of the present invention. As shown in FIG. 2, the server device 10A includes at least an extraction unit 11, a planning unit 12, a control unit 13, a partial planning unit 14, and a storage unit 15.

[0022] The extraction unit 11 has a function of extracting a plurality of tasks to be planned from a domain including at least one compound task to which a plurality of methods are set. As a premise, in a hierarchical task network, a virtual space under a specific situation is called a world, a state of the world is called a world state, and a set of tasks that can be selected under a specific situation is called a domain. A domain may include a compound task and a primitive task. Here, a compound task is one of the tasks executed in a hierarchical task network and has a plurality of methods that describe how the task reaches a result to be achieved. A method is something that has a condition for itself to be selected and a list of tasks (references to) when selected. A method has a condition and a list that is a reference to either a compound task or a primitive task. A primitive task is a task that includes an operator that actually affects an operation target. A primitive task has a condition for execution, an operator that represents the content to be executed, and an effect on the world state when executed. An operator is a single action that performs actual processing. The extraction unit 11 extracts a plurality of tasks to be planned from a domain that is suitable for the world state at the time of planning. Alternatively, the extraction unit 11 may extract the entire domain as it is.

[0023] The planning unit 12 has a function of generating a plan by determining which tasks should be executed, including the execution order, for the multiple extracted tasks. The generation of the plan is executed by a planner. The planner is a function that executes a simulation to refer to and edit the world state as appropriate for the multiple tasks included in the domain (multiple extracted tasks) and creates a list of tasks. Among the tasks included in the domain, the topmost task in the domain that is always considered first is called a root task. In the planning unit 12, planning starts from the root task of the domain, and a plan is generated based on the world state at that time.

[0024] The control unit 13 has a function of controlling the behavior of the character based on the planned plan. Here, the character refers to a target whose behavior is controlled based on the plan generated by the hierarchical task network. For example, a character that cannot be operated by a user (non-player character) is included. Since the influence on the world state when the plan is generated is only at the simulation stage, when a character in a video game actually executes actions based on the plan, it is not necessarily possible to execute all tasks according to the plan. The behavior of the character is sequentially controlled in the execution order of the plan, and if all tasks can be executed according to the plan, the plan is judged to have ended normally and the plan is terminated, and if execution of any task of the plan fails, the control unit 13 stores which task failed to be executed.

[0025] Furthermore, when a partial correction plan is obtained as a result of partial planning performed by a partial planning unit 14 described later, the control unit 13 has a function of controlling the behavior of the character based on the partial correction plan.

[0026] The partial planning unit 14 has a function of excluding the failed method from the selection target and partially replanning the compound task as a starting point task to obtain a partial correction plan when the character fails a task in the middle of the plan and the task is a compound task with multiple methods set, and then excluding the failed method from the selection target. When a compound task includes multiple methods, various conditions are set, such as a selection condition of a method according to the situation and a designation condition of a method to be preferentially selected when a specific condition is not satisfied. When the partial planning unit 14 identifies a failure of a compound task, it records that the failed method is excluded from the selection target regardless of various conditions. Then, after excluding the failed method from the selection target, the compound task is set as a starting point task, and planning is performed from the compound task. In this example, planning with the failed compound task as a starting point task instead of the root task of the domain is called partial planning.

[0027] The storage unit 15 has a function of storing data necessary for various processes performed in the server device 10 and data obtained as a result of the processes.

[0028] Next, the flow of processing performed in the video game processing system 100 of this example will be described. Fig. 3 is a flowchart showing an example of character control processing corresponding to at least one of the embodiments of the present invention. Below, an example will be described in which the character control processing is started when the control target is determined.

[0029] As shown in FIG. 3, the character control process is started by the video game processing system 100 first acquiring domain information (extracting a plurality of tasks to be planned) (step S11). Next, the video game processing system 100 executes planning to generate a plan (step S12). Next, the video game processing system 100 executes character control based on the plan (step S13). If all tasks have been executed according to the plan, the video game processing system 100 determines that the plan has ended normally, and ends the character control process based on the plan. However, if execution of a method in any of the compound tasks included in the plan fails, the video game processing system 100 executes processing for when execution of a method in a compound task fails (step S14).

[0030] If execution of a method in a compound task fails, the video game processing system 100 records that the failed method is excluded from selection targets. Next, the video game processing system 100 excludes the failed method from selection targets, sets the compound task as a starting point task, and executes partial planning. Then, the video game processing system 100 executes character behavior control based on the partial correction plan obtained by the partial planning.

[0031] 4 is a flowchart showing an example of the operation of the server side in the character control process corresponding to at least one of the embodiments of the present invention. Here, the operation of the server device 10A in the system 100 will be described.

[0032] As shown in FIG. 4, the character control process is started by the server device 10A first acquiring domain information (extracting a plurality of tasks to be planned) (step S101). Next, the server device 10A executes planning to generate a plan (step S102). Next, the server device 10A executes character control based on the plan (step S103). If all tasks can be executed according to the plan, the server device 10A determines that the plan has ended normally, and ends the character control process based on the plan. However, if the execution of a method in any of the compound tasks included in the plan fails, the server device 10A executes a process for the case where the execution of a method in the compound task fails (step S104). If the execution of a method in the compound task fails, the server device 10A records that the failed method is excluded from the selection target. Next, the server device 10A excludes the failed method from the selection target, sets the compound task as the starting point task, and executes partial planning. Then, the server device 10A executes behavior control of the character based on the partial corrected plan obtained by the partial planning.

[0033] 5 is a flowchart showing an example of the operation of the user terminal side in the character control process corresponding to at least one of the embodiments of the present invention. Note that the configuration of the user terminal 20 has the same functions as the configuration of the server device 10 except for receiving various information from the server device 10A, so description thereof will be omitted to avoid duplication.

[0034] As shown in FIG. 5, the character control process is started by the user terminal 20 first acquiring domain information (extracting a plurality of tasks to be planned) (step S201). Next, the user terminal 20 executes planning to generate a plan (step S202). Next, the user terminal 20 executes character control based on the plan (step S203). If all tasks can be executed according to the plan, the user terminal 20 determines that the plan is normally terminated, and ends the character control process based on the plan. However, if the execution of a method in any compound task included in the plan fails, the user terminal 20 executes a process for the case where the execution of a method in a compound task fails (step S204). If the execution of a method in a compound task fails, the user terminal 20 records that the failed method is excluded from selection targets. Next, the user terminal 20 excludes the failed method from selection targets, sets the compound task as a starting point task, and executes partial planning. Then, the user terminal 20 executes character behavior control based on the partial correction plan obtained by partial planning.

[0035] As described above, as one aspect of the first embodiment, server device 10A is configured to include extraction unit 11, planning unit 12, control unit 13, and partial planning unit 14, extracts a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set therein, determines which tasks to be executed, including the order of execution, for the extracted plurality of tasks, generates a plan, controls the behavior of a character based on the planned plan, and, in a situation where a character fails a task midway through the plan and the task is a compound task having a plurality of methods set therein, removes the failed method from the selection targets and partially replans using the compound task as a starting task to obtain a partial correction plan, and when the partial correction plan is acquired, controls the behavior of the character based on the partial correction plan, thereby enabling character control such that the behavior of the character to be controlled appears natural.

[0036] In other words, in the past, if a task failed midway through the plan, the planning had to be started again from the beginning, and when a character controlled based on that plan was observed objectively, there was a risk that it would appear as if the character suddenly began performing a different action that was unrelated to the failed action.However, with this example, even if one method in a compound task fails, the character is controlled based on a partial correction plan that executes another method, and the character is controlled to perform an action that is highly related to the failed action, resulting in character control that makes the character's actions appear natural.

[0037] [Second embodiment] 6 is a block diagram showing a configuration of a server device corresponding to at least one of the embodiments of the present invention. As shown in FIG. 6, the server device 10B includes at least an extraction unit 11, a planning unit 12, a control unit 13, a partial planning unit 14B, and a storage unit 15.

[0038] The partial planning unit 14B has a function of excluding the failed method from the selection target and partially replanning the compound task as a starting point task to obtain a partial correction plan when the task is a compound task with multiple methods set in a situation where the character fails in a task during the plan. In addition, the partial planning unit 14B has a function of partially replanning the compound task located in a predetermined hierarchical stage before the failed compound task in the plan as a starting point task to obtain a partial correction plan when partial planning fails in a compound task including a method executed when the failure occurs, and obtaining a partial correction plan. Here, the failure of partial planning in a compound task including a method executed when the failure occurs means a case where the failed method in the plan is excluded from the selection target and the compound task is set as a starting point task to execute partial planning, but another method cannot be selected under the conditions of the world state at that time, or a case where character control is executed based on partial correction plans obtained sequentially by executing partial planning, but execution fails for all methods included in the compound task. In this example, these situations are considered to be failures for the entire compound task. Further, a compound task located a predetermined number of layers earlier than a failed compound task refers to a compound task located a predetermined number of layers earlier that was successful once when character control was first executed based on the plan generated by planning unit 12. The number of predetermined layers may be set at any value, but in order to prevent the character to be controlled from appearing to be behaving unnaturally, it is preferable to set the number of layers to a small number rather than a large number.When executing partial planning by setting a compound task located at a predetermined level earlier in the hierarchy as the starting task, it is possible to set as appropriate whether or not to exclude methods that were successful the first time character control was executed based on the plan from selection, but in order to take a route different from the route toward the failed compound task overall, it is preferable to exclude the method that was initially selected in the compound task located at a predetermined level earlier in the hierarchy from selection.

[0039] 7 is a flowchart showing an example of the operation of the server side in the character control process corresponding to at least one of the embodiments of the present invention. Here, the operation of the server device 10B in the system 100 will be described. Below, an example will be described in which the character control process is started after the control target has been determined.

[0040] As shown in FIG. 7, the character control process is started by the server device 10B first acquiring domain information (extracting a plurality of tasks to be planned) (step S101). Next, the server device 10B executes planning to generate a plan (step S102). Next, the server device 10B executes character control based on the plan (step S103). If all tasks can be executed according to the plan, the server device 10B determines that the plan has ended normally, and ends the character control process based on the plan. However, if any of the compound tasks included in the plan has failed as a whole, the server device 10B executes a process for the case where the compound tasks have failed as a whole (step S104-2). If the compound tasks have failed as a whole, the server device 10B sets a compound task located a predetermined hierarchical level earlier than the failed compound task as a starting point task, and executes partial planning. At this time, the server device 10B may execute partial planning after setting a method that was successful when the plan was first executed (a method that transitions to a compound task that failed overall) as a non-selectable method. Then, the server device 10B executes behavior control of the character based on the partial corrected plan obtained by the partial planning.

[0041] As described above, as one aspect of the second embodiment, server device 10B is configured to include extraction unit 11, planning unit 12, control unit 13, and partial planning unit 14B, and if partial planning fails in a compound task including a method that was being executed when the failure occurred, a partial corrected plan is obtained by partially replanning using a compound task that is located a predetermined hierarchically earlier in the plan than the failed compound task as the starting task, thereby making it possible to control the character so that the behavior of the character to be controlled appears to be natural.

[0042] In other words, if the entire compound task that failed when controlling a character based on the initial plan fails, rather than generating a plan from scratch again using planning unit 12, character control is performed based on a partial correction plan that returns to a compound task that is slightly earlier in the hierarchy than the entire failed compound task.When the character is observed objectively, the character will appear to be acting by returning to a slightly earlier situation, and as a result, character control is possible in which the behavior of the controlled character appears natural.

[0043] [Third embodiment] 8 is a block diagram showing a configuration of a server device corresponding to at least one of the embodiments of the present invention. As shown in FIG. 8, the server device 10C includes at least an extraction unit 11, a planning unit 12, a control unit 13, a partial planning unit 14C, and a storage unit 15.

[0044] The partial planning unit 14C has a function of excluding the failed method from the selection target and partially replanning the compound task as a starting task to obtain a partial correction plan when the character fails in a task in the middle of the plan and the task is a compound task with multiple methods set. In addition, when partial planning fails in a compound task including a method executed when the failure occurs, the partial planning unit 14C has a function of partially replanning the compound task located a predetermined hierarchically before the failed compound task in the plan as a starting task to obtain a partial correction plan. Furthermore, the partial planning unit 14C has a function of replanning from the root task of the domain based on the planning function when a partial correction plan is executed with a compound task located a predetermined hierarchically before the initially failed compound task as a starting task and fails. When a partial correction plan is executed with a compound task located a predetermined hierarchically before the initially failed compound task as a starting task and fails, it means that the entire compound task located a predetermined hierarchically before the initially failed compound task fails. The number of hierarchical levels to move back from the initially failed compound task and the predetermined number of hierarchical levels to decide to replan from the root task of the domain can be set separately, and may be set to different numbers of hierarchical levels. For example, the number of hierarchical levels to move back when the entire compound task fails can be set to one, and the predetermined number of hierarchical levels to decide to replan from the root task of the domain can be set to two.

[0045] 9 is a flowchart showing an example of the operation of the server side in the character control process corresponding to at least one of the embodiments of the present invention. Here, the operation of the server device 10C in the system 100 will be described. Below, an example will be described in which the character control process is started after the control target has been determined.

[0046] As shown in FIG. 9, the character control process is started by the server device 10C first acquiring information on the domain (extracting a plurality of tasks to be planned) (step S101). Next, the server device 10C executes planning to generate a plan (step S102). Next, the server device 10C executes control of the character based on the plan (step S103). If all tasks can be executed according to the plan, the server device 10C determines that the plan has been normally completed, and ends the character control process based on the plan. However, if the entire compound task at a point back a predetermined number of layers based on the initially failed compound task has failed, the server device 10C executes a process for the case where the entire compound task at a point back a predetermined number of layers has failed (step S104-3). If the entire compound task at a point back a predetermined number of layers has failed, the server device 10C executes a process of re-planning from the root task of the domain. Then, the server device 10C executes behavior control of the character based on the obtained plan.

[0047] As described above, as one aspect of the third embodiment, server device 10C is configured to include extraction unit 11, planning unit 12, control unit 13, and partial planning unit 14C, and if a partial correction plan is executed with a starting task being a compound task that is located a predetermined hierarchical level earlier than the compound task that initially failed, and this fails, replanning is performed from the root task of the domain based on the planning function, thereby making it possible to control the character so that the behavior of the character to be controlled appears to be natural.

[0048] In other words, if the entirety of a compound task that is located a certain number of hierarchical levels earlier than the initially failed compound task fails, it is possible to set the compound task that is a certain number of hierarchical levels earlier as the starting task and perform partial planning; however, there is a high possibility that the content of the method executed in the initially failed compound task will be significantly different from that of the method executed in the initially failed compound task, resulting in inconsistency in the character's behavior. Therefore, in such a case, by replanning from the root task of the domain, it is possible to control the character's behavior so that, when observed objectively, it appears that several attempts were made to take actions related to the previously decided action, but all of them failed, and so a different action was planned instead.

[0049] [Fourth embodiment] Fig. 10 is a block diagram showing the configuration of a server device 10D, which is an example of the server device 10 in the video game processing system 100 (see Fig. 1). In this example, the server 10D at least includes an extraction unit 11D, a planning unit 12D, a control unit 13D, a partial planning unit 14D, and a storage unit 15D. Note that, although this example will be described as the server device D mainly executing the processing, this is merely an example, and the processing may be mainly executed in a user terminal, or may be realized by executing a program on a user terminal in an offline environment.

[0050] The extraction unit 11D has a function of extracting a plurality of tasks to be the target of planning from a domain including at least one compound task to which a plurality of methods are set.

[0051] The planning unit 12D has a function of determining which tasks should be executed, including the execution order, from among the extracted tasks, and generating a plan.

[0052] The control unit 13D has a function of controlling the behavior of the character based on the planned plan. In addition, when a partially revised plan is obtained as a result of partial planning performed by a partial planning unit 14D described later, the control unit 13D has a function of controlling the behavior of the character based on the partially revised plan.

[0053] The partial planning unit 14D has a function of excluding the failed method from the selection target and partially replanning the compound task as a starting task to obtain a partial correction plan when the character fails in a task in the middle of the plan and the task is a compound task with multiple methods set. In addition, when partial planning fails in a compound task including a method executed when the failure occurs, the partial planning unit 14D has a function of partially replanning the compound task located a predetermined hierarchically before the failed compound task in the plan as a starting task to obtain a partial correction plan. In addition, the partial planning unit 14D has a function of replanning from the root task of the domain based on the planning function when the partial correction plan is executed and fails, with a compound task located a predetermined hierarchically before the initially failed compound task as a starting task.

[0054] The storage unit 15D has a function of storing data necessary for various processes performed in the server device 10 and data obtained as a result of the processes.

[0055] 11 is a flowchart showing an example of the operation of the server side in the character control process corresponding to at least one of the embodiments of the present invention. Here, the operation of the server device 10D in the system 100 will be described. Below, an example will be described in which the character control process is started after the control target has been determined.

[0056] As shown in FIG. 11, the character control process is started by the server device 10D first acquiring domain information (extracting a plurality of tasks to be planned) (step S101). Next, the server device 10D executes planning to generate a plan (step S102). Next, the server device 10D executes character control based on the plan (step S103). If all tasks can be executed according to the plan, the server device 10D determines that the plan has ended normally, and ends the character control process based on the plan. However, if execution of any compound task included in the plan fails, the server device 10D executes processing for failure within the compound task (step S104-4). First, if execution of a method within a compound task fails, the server device 10D records that the failed method is excluded from selection targets (stores a failure history). Next, the server device 10D excludes the failed method from selection targets, sets the compound task as a starting point task, and executes partial planning. Then, the server device 10D executes behavior control of the character based on the partial corrected plan obtained by the partial planning.

[0057] If character control is executed based on the partial correction plan but the compound task fails as a whole, the server device 10D sets a compound task located a predetermined hierarchical level earlier than the failed compound task as a starting task and executes partial planning. At this time, the server device 10D may execute partial planning after setting a method that was successful when the plan was executed initially (a method that transitions to the compound task that failed as a whole) as an unselectable method. The server device 10D then executes character behavior control based on the partial correction plan obtained by partial planning.

[0058] If the entire compound task at a point back a predetermined hierarchy has failed, the server device 10D executes a process of replanning from the root task of the domain (executed by the planning unit 12D). Then, the server device 10D executes the action control of the character based on the obtained plan.

[0059] A specific example of character control based on the above configuration will be described. As an example, in a video game in which a character (player character: PC) operated by a user and a character (non-player character: NPC) who is an ally and not operated by the user act together in a three-dimensional virtual space, the behavior of the NPC is assumed to be planned based on a hierarchical task network (HTN). The tasks given to the PC and NPC are, for example, a task of sniping an enemy character and a task of searching the surrounding area and collecting treasure chests, etc. The user operates the PC based on the tasks, but the behavior of the NPC is assumed to be controlled based on a plan determined by planning based on the HTN.

[0060] FIG. 12 is an explanatory diagram for explaining an overview of planning by a hierarchical task network corresponding to at least one of the embodiments of the present invention. First, in HTN, the situation of the virtual space in which the PC and NPC act is defined as a world state, and a domain as a set of tasks corresponding to the environment given to the PC and NPC is registered and stored in advance. As shown in FIG. 12, a domain includes multiple tasks. Planning is performed based on the domain, but the planning is executed by a planner. The planner refers to the world state as appropriate, and performs planning while simulating the effect on the world state after the task is executed. As a result of planning, a plan that specifies the execution order of multiple tasks is generated.

[0061] In the process of generating a plan using HTN, first, a server device extracts a domain, which is a set of tasks that may be executed in a given situation in which a mission to snipe an enemy character and a mission to search the surrounding area and collect treasure chests, etc. are given. A root task, which is the highest-level task in the domain, is set in the domain, and thereafter, a task according to the situation of the world state is appropriately selected by the planner. In addition, the planner is set to conditions for selecting a task. For example, it is assumed that conditions are set such that a task to execute a mission to snipe an enemy character is selected with priority, and a mission to search the surrounding area and collect treasure chests, etc. is executed in a situation in which there are no enemy characters.

[0062] As an example, there are tasks such as (1) acquiring world state information, (2) observing and understanding the surrounding environment on the spot, (3) understanding the surrounding environment while moving within a specified range, and (4) taking action to open the door at the entrance of the discovered building. (2) to (4) are compound tasks. For example, (2) has a method of (2-1) observing with the naked eye and a method of (2-2) observing with binoculars, (3) has a method of (3-1) moving to a position where an obstacle can be hidden and observing while hiding, and (3-2) observing while moving within a specified range, and (4) has a method of (4-1) opening the door with a key in possession (it is unclear whether it is the correct key), (4-2) breaking the door to open it, and (4-3) opening the door by picking the lock (only if the lock-picking technique is possessed). In these compound tasks (2) to (4), a method appropriate for each situation is selected. In addition, because the mission of sniping the enemy character is given priority, if an enemy character is discovered in (2) or (3), the task will transition to a compound task in order to prepare for sniping the enemy character.

[0063] As a result of executing the process of generating a plan by HTN, a plan including a route for executing (1) to (4) in sequence is generated. As a result of executing the behavior control of the NPC based on this plan, the NPC reaches the compound task of opening the door at the entrance of the discovered building (4) without discovering an enemy character along the way, and the selected method (4-1) of opening the door with the possessed key is executed and fails. In the past, if the task failed, the planning was restarted from the beginning, so there was a possibility that the behavior would be unnatural when observed objectively, such as re-executing the surrounding exploration behavior (3). However, in this example, if the method (4-1) fails, the method (4-1) is set as an unselectable target, and the compound task (4) is set as the starting task, and partial planning is executed. A partial correction plan for executing (4-2) or (4-3) is obtained by executing partial planning, and if the NPC's behavior control is executed based on the partial correction plan and the door is successfully opened, the entire plan is determined to have been completed normally. If it fails, partial planning is performed to try all the methods in the compound task in (4).

[0064] If the entire compound task in (4) fails, planning is not restarted from the beginning, but partial planning is executed using a compound task a certain number of layers earlier, for example, the compound task in (3) one layer earlier, as the starting task. At this time, among the multiple methods in (3), the method executed when moving to (4) in the initially generated plan may be set as an exception to be selected. If, as a result of executing the partial correction plan starting from (3), a door different from the door that initially failed to open is found and the door is successfully opened, the partial correction plan is determined to have been completed successfully.

[0065] Here, it is assumed that the entire compound task (3) in the partial correction plan starting from (3) has failed. Examples of cases where the entire task is judged to have failed include when no search results are obtained, when a reason for interruption occurs before the search action is executed (for example, when the task is targeted by an enemy), and so on. If the failure of the entire compound task (3) corresponds to a failure of the entire compound task in the predetermined previous layer for which replanning is performed from the beginning, the process returns to (1) and replans from the beginning. In this way, by selectively using the process of performing partial planning by setting the failed compound task as the starting point task when a compound task fails, and the process of replanning from the beginning when the entire compound task in the predetermined previous layer fails, it is possible to control a character so that the behavior of the NPC to be controlled looks natural.

[0066] As described above, as one aspect of the fourth embodiment, server device 10D is configured to include extraction unit 11D, planning unit 12D, control unit 13D, and partial planning unit 14D, extracts a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set therein, determines which tasks to be executed, including the order of execution, for the extracted plurality of tasks, generates a plan, controls the behavior of a character based on the planned plan, and, in a situation where a character fails a task in the middle of the plan and the task is a compound task having a plurality of methods set therein, removes the failed method from the selection targets and partially replans the compound task as a starting task to obtain a partial correction plan, and when the partial correction plan is obtained, controls the behavior of the character based on the partial correction plan, thereby enabling character control such that the behavior of the character to be controlled appears natural.

[0067] In the above-mentioned first to fourth embodiments, a partial correction plan is generated when a compound task fails. However, replanning may be performed to replace the plan when the compound task does not fail. For example, when five tasks are scheduled to be executed in the initially generated plan, a situation may occur in which the world state situation changes while the NPC is executing the second task, and the third and subsequent tasks become non-optimal. In this case, when a new plan is generated in response to the change in the world state situation, if the part where the task content has been changed branches in a method that is higher than the task currently being executed by the NPC, the entire current plan is discarded and replaced with the new plan. If the branch occurs in a method that is lower than the task currently being executed by the NPC, the currently executed task is executed as is, and only the unexecuted task part is replaced.

[0068] As described above, each embodiment of the present application solves one or more deficiencies. Note that the effects of each embodiment are non-limiting effects or examples of effects.

[0069] In each of the above-described embodiments, the multiple user terminals 201 to 20n and the server device 10 execute the various processes described above in accordance with various control programs (e.g., a video game processing program) stored in their own storage devices.

[0070] Furthermore, the configuration of the system 100 is not limited to the configurations described as examples of each of the above-mentioned embodiments, and may be configured such that the server device 10 executes some or all of the processes described as processes executed by the user terminal, or such that any of the multiple user terminals 201-20n executes some or all of the processes described as processes executed by the server device 10. Also, any of the multiple user terminals 201-20n may be configured to have some or all of the storage unit included in the server device 10. In other words, the system 100 may be configured such that some or all of the functions included in either the user terminal 20 or the server device 10 are included in the other one.

[0071] Furthermore, the program may be configured to realize some or all of the functions described as examples of each of the above-mentioned embodiments in a standalone device that does not include a communication network.

[0072] [Note] The above-mentioned embodiments have been described so as to enable at least one person having ordinary skill in the art to which the invention pertains to practice the invention. [1] 1. A video game processing program for causing a server to realize a process of generating a plan, which specifies tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, based on a hierarchical task network, and controlling the actions of the character in a virtual space based on the plan, comprising: The server, An extraction function for extracting multiple tasks to be planned from a domain that includes at least one compound task with multiple methods set; a planning function for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control function for controlling the behavior of the character based on the plan; a partial planning function for, when the task is a compound task with a plurality of methods set in a situation where the character fails in the task during the plan, excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan; When the partial correction plan is acquired, the control function controls the behavior of the character based on the partial correction plan. Video game processing program. [2] When partial planning fails in a compound task including a method that was being executed when the partial planning function failed, the partial planning function partially replans the plan using a compound task that is located a predetermined hierarchical level earlier than the failed compound task in the plan as a starting task to obtain a partial correction plan. A video game processing program according to [1]. [3] When the partial correction plan is executed and fails, the starting task is a compound task located a predetermined hierarchical level before the initially failed compound task, and the partial correction plan is re-planned from the root task of the domain based on the planning function. [2] A video game processing program according to the present invention. [4] The partial planning function is adapted to hold a history of cases in which the character fails to execute a task, and continues to hold the history until the partial correction plan is normally completed without failure. A video game processing program according to any one of [1] to [3]. [5] A video game processing program for causing a user terminal capable of communicating with a server device to realize at least one of the functions that the video game processing program described in any one of [1] to [4] causes the server to realize. [6] A server on which a video game processing program according to any one of [1] to [5] is installed. [7] A video game processing system comprising a communication network, a server, and a user terminal, generating a plan based on a hierarchical task network, the plan specifying tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and causing the user terminal to realize a process of controlling the actions of the character in a virtual space based on the plan, An extraction means for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning means for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control means for controlling the behavior of the character based on the planned plan; a partial planning means for excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan when the task is a compound task with a plurality of methods set in a situation where the character fails the task in the middle of the plan, When the control means acquires the partial correction plan, the control means controls the behavior of the character based on the partial correction plan. Video game processing system. [8] the server includes the extracting means, the planning means, the control means, and the partial planning means; The user terminal includes an output means for outputting a game screen on which the character controlled by the control means is displayed to a display screen of a display device. [7] A video game processing system as described above. [9] A video game processing program for causing a user terminal to realize a process of generating a plan that specifies tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, based on a hierarchical task network, and controlling the actions of the character in a virtual space based on the plan, comprising: The system further comprises an extraction function for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto, a planning function for determining which of the extracted tasks should be executed, including the order of execution, to generate the plan, a control function for controlling the behavior of the character based on the planned plan, and a partial planning function for excluding the failed method from selection targets and partially replanning the compound task as a starting point task to obtain a partial correction plan when the character fails a task in the middle of the plan and the task is a compound task having a plurality of methods set thereto, the control function being configured to control the behavior of the character based on the partial correction plan when the partial correction plan is obtained, and a function for receiving information about functions provided by the server from the server and performing input / output corresponding to the functions is provided to the user terminal. A video game processing program to make this happen.

[10] A video game processing program for causing a user terminal to realize a process of generating a plan that specifies tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, based on a hierarchical task network, and controlling the actions of the character in a virtual space based on the plan, comprising: The user terminal, An extraction function for extracting multiple tasks to be planned from a domain that includes at least one compound task with multiple methods set; a planning function for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control function for controlling the behavior of the character based on the plan; a partial planning function for, when the task is a compound task with a plurality of methods set in a situation where the character fails in the task during the plan, excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan; When the partial correction plan is acquired, the control function controls the behavior of the character based on the partial correction plan. Video game processing program.

[11]

[10] A video game processing program for causing a server capable of communicating with the user terminal to realize at least one of the functions that the video game processing program described in the present invention causes the user terminal to realize.

[12] A user terminal having the video game processing program described in

[10] or

[11] installed.

[13] 1. A video game processing method comprising: generating a plan based on a hierarchical task network, the plan specifying tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character; and performing processing to control the actions of the character in a virtual space based on the plan, the video game processing method comprising: An extraction process for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning process for determining which tasks should be executed, including the execution order, from among the extracted tasks, to generate the plan; A control process for controlling the behavior of the character based on the plan; a partial planning process for excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan when the task is a compound task with a plurality of methods set in a situation where the character fails the task in the middle of the plan, and When the partial correction plan is acquired, the control process controls the behavior of the character based on the partial correction plan. Video game processing method.

[14] A video game processing method in which a video game processing system including a communication network, a server, and a user terminal generates a plan based on a hierarchical task network, the plan specifying tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and controls the actions of the character in a virtual space based on the plan, the method comprising: An extraction process for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning process for determining which tasks should be executed, including the execution order, from among the extracted tasks, to generate the plan; A control process for controlling the behavior of the character based on the plan; a partial planning process for excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan when the task is a compound task with a plurality of methods set in a situation where the character fails the task in the middle of the plan, and When the partial correction plan is acquired, the control process controls the behavior of the character based on the partial correction plan. Video game processing method. [Explanation of symbols]

[0073] 100 Video Game Processing System 10, 10A~10D Server equipment 11 Extraction part 12 Planning Department 13 Control section 14, 14B~14D Partial Planning Section 15 Storage section 20, 201~20n User terminals 30 Communication Network

Claims

1. 1. A video game processing program for causing a server to realize a process of generating a plan, which specifies tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, based on a hierarchical task network, and controlling the actions of the character in a virtual space based on the plan, comprising: The server, An extraction function for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning function for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control function for controlling the behavior of the character based on the plan; A replanning function that generates new plans according to changes in the world state, a replacement function for discarding the entire plan being executed and replacing it with the new plan when a portion where a task has been changed between the new plan and the plan being executed is branched in a higher level method than the task being executed, The control function controls the behavior of the character based on the replaced plan when the plan is replaced based on the replacement function. Video game processing program.

2. The replacement function replaces only the unexecuted task portion with the new plan if the changed portion is branched in a method lower than the task being executed.

2. The video game processing program according to claim 1.

3. a partial planning function for excluding the failed method from selection targets and partially replanning the compound task as a starting task to obtain a partially corrected plan when the task is a compound task with a plurality of methods set in a situation where the character fails the task in the middle of the plan, and When the partial correction plan is acquired, the control function controls the behavior of the character based on the partial correction plan.

3. The video game processing program according to claim 1.

4. A video game processing system comprising a communication network, a server, and a user terminal, generating a plan based on a hierarchical task network, the plan specifying tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, and causing the user terminal to realize a process of controlling the actions of the character in a virtual space based on the plan, An extraction means for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning means for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control means for controlling the behavior of the character based on the planned plan; A replanning means for generating a new plan in response to a change in the world state; a replacement means for discarding the entire plan being executed and replacing it with the new plan when a portion of a task that has been changed between the new plan and the plan being executed is branched in a method that is higher in level than the task being executed, When the plan is replaced based on the replacement means, the control means controls the behavior of the character based on the replaced plan. Video game processing system.

5. A video game processing program for causing a user terminal to realize a process of generating a plan that specifies tasks to be executed, including an execution order, from a domain including a plurality of tasks that are candidates for actions to be executed by a character, based on a hierarchical task network, and controlling the actions of the character in a virtual space based on the plan, comprising: The user terminal, An extraction function for extracting a plurality of tasks to be planned from a domain including at least one compound task having a plurality of methods set thereto; a planning function for determining which tasks should be executed, including the order of execution, from among the extracted tasks, and generating the plan; A control function for controlling the behavior of the character based on the plan; A replanning function that generates new plans according to changes in the world state, a replacement function for discarding the entire plan being executed and replacing it with the new plan when a portion where a task has been changed between the new plan and the plan being executed is branched in a higher level method than the task being executed, The control function controls the behavior of the character based on the replaced plan when the plan is replaced based on the replacement function. Video game processing program.

Citation Information

Patent Citations

  • NPC behavior decision method

    CN105561578A

  • Dye containing photographic light sensitive material

    JP1977034716A

  • Information memory device

    JP1978050813A

  • Ddc electromagnet

    JP1979041461A

  • Surplus sheet separating device in destacker using electromagnet

    JP1983090331A