CN107080945A - Method, device and the electronic equipment of artificial intelligence behavior in test game - Google Patents

Method, device and the electronic equipment of artificial intelligence behavior in test game Download PDF

Info

Publication number
CN107080945A
CN107080945A CN201710328835.3A CN201710328835A CN107080945A CN 107080945 A CN107080945 A CN 107080945A CN 201710328835 A CN201710328835 A CN 201710328835A CN 107080945 A CN107080945 A CN 107080945A
Authority
CN
China
Prior art keywords
node
tree
game
tested
artificial intelligence
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.)
Granted
Application number
CN201710328835.3A
Other languages
Chinese (zh)
Other versions
CN107080945B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710328835.3A priority Critical patent/CN107080945B/en
Publication of CN107080945A publication Critical patent/CN107080945A/en
Application granted granted Critical
Publication of CN107080945B publication Critical patent/CN107080945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/65Methods for processing data by generating or executing the game program for computing the condition of a game character

Abstract

The application is related to method, device and the electronic equipment of artificial intelligence behavior in test game, and method includes:Artificial intelligence behavior tree in configuration file is modeled and obtains setting object;Node is carried out to the tree object split to obtain set of node, and carry out branch to the tree object and split to obtain Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively;The node in the set of node is loaded into the game respectively and tested, set to be loaded into be tested in the game and set to be loaded into the game after the execution condition recorded respectively by the tree object after the execution condition recorded respectively by the branch in the Bifurcation Set and tested, can be lifted in game test for the testing efficiency in terms of AI behaviors.

Description

Method, device and the electronic equipment of artificial intelligence behavior in test game
Technical field
The application is related to software testing technology field, in particular to for entering to artificial intelligence AI behaviors in game Method, device and the electronic equipment of row test.
Background technology
In current major game, either end trip, or hand trip, more or less all exist in some NPC, copy Monster these game roles, and these game roles have the logic of a set of fixation to control them, allow them to simulate truly Personage's behavior, these game behaviors are generally referred to as AI behaviors.The small monster of small to one copy, greatly in a copy Big BOSS, is dependent on the AI behaviors of differing complexity to control.In one is played, with the increase of monster, BOSS's Increase, the quantity of AI behaviors is also in increase, and a large-scale game may includes hundreds of different AI Action logics. In the exploitation of game, an AI behavior is controlled by a text based on XML format, similar to common in computer Multiway Tree Structure, the XML texts are with each AI of the structure organization set Action logic, each action that each AI is showed Or each behavior, all it is the different nodes in a branch for this AI behavior tree.Each AI behavior trees, are so small to have only several Branch, several nodes, greatly to tens, hundreds of branches or nodes.
For one is played, it is ensured that the AI behaviors of monster are correct, are a critically important job.But, face To the AI behavior tree files of such vast number, how efficient to be tested, it is ensured that all AI behaviors are all set according to game The logic operation of meter person game plan in other words, is a considerable ring in a development of games cycle.Each game is being opened During hair, renewal and iteration when numerous behavior trees also can be in face of different editions are returned in the iteration for carrying out each version of game When returning test, verify and test in turn by manpower, be unusual inefficiency.
At present in terms of for AI behavior tree tests, a kind of mode is that manually AI behavior trees are loaded into game, By naked eyes viewing role-act, but so it is related to the aspect of numerical value for some, such as scope judges, is can only have one Individual general scope, it is impossible to obtain exact value, manual observation also expends the time, inefficiency.
Also a kind of mode is semi-automatic mode, the branch of tester oneself definition tree, by branch's self assemble again Embark on journey for the scheme of tree.Although this mode can help tester to improve testing efficiency to a certain extent, exist Many problems.First, when being related to numerical value correlation, it is impossible to accurately obtain result, it can only be forbidden by manually estimating Really, efficiency comparison is low.Secondly, part AI behavior trees branch may be omitted by self assemble, cause Test coverage incomplete. In addition, the test logic of this mode is unsound, not from most basic single behavior tree combined joint and game basic function section Beginning of starting with is put, if subsequently having the behavior tree branch for using the defective individual node of function, the branch performs failure, can It can mislead the problem of tester's judgement is other nodes of this branch and condition.Moreover, this mode lacks collection Relevant portion, in the case of in face of a large amount of AI behaviors trees, it is impossible to intuitively provide the implementation status of each tree.
The content of the invention
The method of artificial intelligence behavior in disclosure test game, to be lifted in game test in terms of AI behaviors Testing efficiency.
Other characteristics and advantage of the present invention will be apparent from by following detailed description, or partially by the present invention Practice and acquistion.
According to the first aspect of the invention there is provided a kind of method for testing artificial intelligence behavior in game, including:
Artificial intelligence behavior tree in configuration file is modeled and obtains setting object;
Node fractionation is carried out to the tree object and obtains set of node, and the tree object progress branch is divided Support, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
The node in the set of node is loaded into the game respectively and tested, respectively by the Bifurcation Set Branch sets to be loaded into the game after the execution condition recorded and is tested and set the tree object respectively Put to be loaded into the game after the execution condition recorded and tested.
According to some embodiments, the artificial intelligence behavior tree in configuration file be modeled obtain tree object before also Including:
The catalogue of artificial intelligence behavior tree to be tested is obtained according to the configuration file, according to being obtained the catalogue Artificial intelligence behavior tree.
According to some embodiments, the artificial intelligence behavior tree is stored with extensible markup language document.
According to some embodiments, obtaining the artificial intelligence behavior tree according to the catalogue includes:Obtained according to the catalogue Take in the extensible markup language document for storing the artificial intelligence behavior tree.
According to some embodiments, the node of the tree object includes the child node collection category for being used to record level of child nodes collection Property;
Obtaining set of node to the tree object progress node fractionation includes:According to the child node collection of the node of the tree object Attribute carries out node fractionation to the tree object and obtains set of node.
According to some embodiments, the node in the set of node is loaded into the game respectively tested, point The execution condition of the other branch in the Bifurcation Set is tested and the execution to the tree object respectively after being configured Condition also includes after being tested after being configured:The result that the test is obtained is collected and/or shown.
According to the second aspect of the invention there is provided a kind of device for testing artificial intelligence behavior in game, it includes:
Modeling unit, obtains setting object for being modeled the artificial intelligence behavior tree in configuration file;
Split cells, obtains set of node, and the tree object is carried out for carrying out node fractionation to the tree object Branch is split and obtains Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
Test cell, for the node in the set of node is loaded into the game respectively tested, respectively will Branch in the Bifurcation Set sets to be loaded into the game after the execution condition recorded and tested and by institute Tree object is stated to set to be loaded into the game after the execution condition recorded respectively and tested.
According to some embodiments, described device also includes behavior tree acquiring unit, for artificial in configuration file Intelligent behavior tree is modeled before obtaining tree object, and artificial intelligence behavior tree to be tested is obtained according to the configuration file Catalogue, the artificial intelligence behavior tree is obtained according to the catalogue.
According to some embodiments, the artificial intelligence behavior tree is stored with extensible markup language document.
According to some embodiments, the behavior tree acquiring unit is used for:Obtained according to the catalogue for storing the people The extensible markup language document of work intelligent behavior tree.
According to some embodiments, the node of the tree object includes the child node collection category for being used to record level of child nodes collection Property;
The split cells is used for:The tree object is saved according to the child node set attribute of the node of the tree object Point fractionation obtains set of node.
According to some embodiments, described device also includes result treatment unit, for respectively by the set of node Node be loaded into the game tested, the execution condition of the branch in the Bifurcation Set is configured respectively after carry out After testing and being tested after being configured respectively to the execution condition for setting object, obtained knot is tested to described Fruit is collected and/or shown.
According to the third aspect of the invention we there is provided a kind of electronic equipment, including:Processor;Memory, is stored for described The instruction that processor control is operated as described in above-mentioned any one of first aspect.
The technical scheme that embodiments herein is provided can include the following benefits:
The technical scheme of the present embodiment obtains setting object by being modeled the artificial intelligence behavior tree in configuration file, Node is carried out to the tree object split to obtain set of node, and carry out branch to the tree object and split to obtain Bifurcation Set, and The execution condition to the branch in the Bifurcation Set is recorded respectively, is then respectively loaded into the node in the set of node Institute is loaded into after the execution condition tested in the game, respectively recorded branch's setting in the Bifurcation Set State and tested in game and be loaded into the game after the tree object is set into the execution condition recorded respectively It is middle to be tested, to be lifted in game test for the testing efficiency in terms of artificial intelligence behavior.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary, this can not be limited Invention.
Brief description of the drawings
Its example embodiment is described in detail by referring to accompanying drawing, above and other feature of the invention and advantage will become more Plus substantially.
The method that Fig. 1 shows artificial intelligence behavior in test game according to an embodiment of the invention;
The method that Fig. 2 shows artificial intelligence behavior in test game according to another embodiment of the present invention;
Fig. 3 shows the block diagram of the device of artificial intelligence behavior in test game according to an embodiment of the invention;
Fig. 4 shows the block diagram of the device of artificial intelligence behavior in test game according to another embodiment of the present invention;
Fig. 5 shows electronic equipment according to an embodiment of the invention.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be real in a variety of forms Apply, and be not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the present invention will be comprehensively and complete It is whole, and the design of example embodiment is comprehensively conveyed into those skilled in the art.Identical reference is represented in figure Same or similar part, thus repetition thereof will be omitted.
Implement in addition, described feature, structure or characteristic can be combined in any suitable manner one or more In example.Embodiments of the invention are fully understood so as to provide there is provided many details in the following description.However, It will be appreciated by persons skilled in the art that technical scheme can be put into practice without one or more in specific detail, Or can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization operate to avoid fuzzy each aspect of the present invention.
Block diagram shown in accompanying drawing is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or realize in heterogeneous networks and/or processor device and/or microcontroller device these functional entitys.
Flow chart shown in accompanying drawing is merely illustrative, it is not necessary to including all contents and operation/step, It is not required to perform by described order.For example, some operation/steps can also be decomposed, and some operation/steps can be closed And or part merge, therefore the actual order performed is possible to be changed according to actual conditions.
The method that Fig. 1 shows artificial intelligence behavior in test game according to an embodiment of the invention, the present embodiment can Suitable for trip centering artificial intelligence behavior situation about being tested, as shown in figure 1, the test described in the present embodiment play in people The method of work intelligent behavior includes:
In step s 110, the artificial intelligence behavior tree in configuration file is modeled and obtains setting object.
Wherein, the artificial intelligence behavior tree can store in many ways, for example, can be deposited with extensible markup language document Storage.The catalogue that the artificial intelligence behavior tree can obtain artificial intelligence behavior tree to be tested according to the configuration file is obtained, The extensible markup language document for storing the artificial intelligence behavior tree is for example obtained according to the catalogue.
The configuration file specifies artificial intelligence behavior tree directory to be tested at present for tester, can configure many simultaneously The catalogue of individual artificial intelligent behavior tree.Behavior tree directory can be configured freely, be stored in multiple catalogues all can while configure into, After avoiding catalogue more, after artificial investigation and free group, the AI trees of some catalogues of omission are also convenient for tester and are known that at a glance The AI trees tested at present are all in which position, without independent manual record.
In the step s 120, node fractionation is carried out to the tree object and obtains set of node, and the tree object is carried out Branch is split and obtains Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively.
In step s 130, the node in the set of node is loaded into the game respectively and is tested, respectively will Branch in the Bifurcation Set sets to be loaded into the game after the execution condition recorded and tested and by institute Tree object is stated to set to be loaded into the game after the execution condition recorded respectively and tested.
In addition, the node of the tree object may include the child node set attribute for recording level of child nodes collection, if including Child node set attribute, can carry out node fractionation to the tree object according to the child node set attribute of the node of the tree object and obtain Set of node.
After completing the aforementioned steps, also the result that the test is obtained can be collected and/or is shown.For example, pin Collect statistics are carried out to the result after each test execution, implementing result is fed back to tester.
The technical scheme of the present embodiment obtains setting object by being modeled the artificial intelligence behavior tree in configuration file, Node is carried out to the tree object split to obtain set of node, and carry out branch to the tree object and split to obtain Bifurcation Set, and The execution condition to the branch in the Bifurcation Set is recorded respectively, is then respectively loaded into the node in the set of node Institute is loaded into after the execution condition tested in the game, respectively recorded branch's setting in the Bifurcation Set State and tested in game and be loaded into the game after the tree object is set into the execution condition recorded respectively It is middle to be tested, to be lifted in game test for the testing efficiency in terms of artificial intelligence behavior.
The method that Fig. 2 shows artificial intelligence behavior in test game according to another embodiment of the present invention, such as Fig. 2 institutes Show, the method for artificial intelligence behavior includes in the test game described in the present embodiment:
In step s 201, configuration file is read, the AI behavior tree directories for needing to test are obtained.
The configuration file specifies AI tree directories to be tested for tester, and the catalogue of multiple AI trees can be configured simultaneously.
It should be noted that the configuration file can be configured freely, it is stored in multiple catalogues and can all keeps away while configure into After having exempted from catalogue more, after artificial investigation and free group, the AI trees of some catalogues of omission are also convenient for tester and are known that mesh at a glance The AI trees of preceding test are all in which position, it is to avoid use independent manual record.
In step S202, the XML file of single AI behaviors tree is read, is parsed, is modeled as the object of one tree.
The AI catalogues specified are traveled through, the xml document of first behavior tree is chosen, xml document is parsed, a tree pair is set up It is all extra to include an attribute as each node of, behavior tree is in addition to oneself some base attribute in itself:Child node Collection.By the child node set attribute, all nodes of node lower floor can be taken toward lower floor's traversal.
By this step, an xml text can be converted into a multiway tree, and each multi-fork tree node includes one Diff after individual sub- set of node, convenience for tree is calculated.
In step S203, single AI behavior tree object is read, starts to split, records single functional node, records every Branch and the execution condition of each level.
For example, reading the tree object modeled, start depth-first search traversal, split, do not repeated what is included in tree Functional node and combined joint record, while each hierarchy node for recording every branch forms single branch, and remember Record the branch and perform condition.
By this step, the tree node constituted in a behavior tree can be splitted out, classified, it is ensured that next step can be first First tested for these basic nodes;The condition of the every branch recorded in addition, can be in ensuing branch testing Wait, automatic reading conditions set condition.
In step S204, the loading test of the individual node of fractionation and result are obtained.
By all kinds of nodes splitted out, load into game, perform by single respectively, obtain after individual node execution Return, the return that for example runs succeeded is true (True), performs failure and then returns to false (False), until it is all split out it is each Class node is performed both by finishing and obtaining result.
This step is tested first against single node, records implementing result, and the node is included after aiding in Branch execution results carry out problem exclusion.
In step S205, whether individual node has residue, if then return to step S204, otherwise performs step S206.
In step S206, the multiple branches split are read, game is loaded into and performs, obtain result.
The multiple branches just split are read, are set respectively after the condition recorded before every branch, setting condition, performs and divides Branch, obtains branch's returning result.
Condition is performed by each branch recorded before reading, each branch of fractionation is performed after setting, can be for every Bar branch is individually verified that after the execution of last whole tree, help positions investigation problem.
In step S207, judge whether branch has residue, if then return to step S206, otherwise perform step S208.
In step S208, according to each branch condition when splitting, condition is set, the entirety of single AI behavior tree is carried out Perform, obtain situation and record that whether every branch is carried out.
This step is used for whole AI behavior tree of overall execution, and just every branch condition traversal is set one time respectively, obtained Implementing result, checks whether that every branch is carried out.
The step can ensure that whole tree is loaded into after game, gives different condition, can be mapped to different branches, it is ensured that every Branch can cover under given corresponding conditionses and go to.
In step S209, judge whether artificial intelligence behavior AI behavior tree files have residue, if then return to step S203, otherwise performs step S210.
In step S210, summarized results is obtained, test terminates.
Repeat above procedure and travel through other AI behaviors tree directories.Summarized results, provides result displaying.The step is arranged Three kinds of implementing results of every behavior tree before collect and shown, including all kinds of individual nodes, wall scroll branch and whole tree are held Row result, is intuitively shown to tester.
Technical scheme described in the present embodiment, by the multiple behavior trees that will be played under behavior tree directory, is carried out single one by one Behavior tree carries out tree modeling, and this tree is carried out branch's fractionation, and node is split.During fractionation, fundamental node and every are recorded The execution condition of each level of branch and every branch;After fractionation, it is divided into the work(in two class nodes, basic combined joint and game These nodes, are loaded into game by energy node automatically first, are tested for most basic individual node;Afterwards the branch of every tree It is automatically loaded into game, this branches end node is performed in being played by acquisition performs return, to judge this branch Whether run succeeded;The loading of whole tree is finally carried out, by the execution condition of the every branch recorded before, is set one by one, Final implementing result is obtained, checks whether every branch can go to.Pass through such automatic fractionation and loading and collection knot The mode of fruit, can efficiently test hundreds of behavior tree in a game, can solve above-mentioned to say four deficiencies very well: In test in terms of being related to numerical value etc., numerical value can be accurately obtained, for example some behavior etc. is performed under model scope, it is ensured that The accuracy test of numerical value, it is to avoid inaccurate on artificial, manual method obtains the time of degree of accuracy cost in other words May be bigger;The problem of Automatic Combined of other schemes there may be before solving, such as omitting element branches causes to survey Examination covering is not complete;To wall scroll branch since being started with most basic single behavior tree combined joint and game basic function node, Whole tree is arrived again, can help follow-up wall scroll branch or whole tree in the case where ging wrong, orientation problem;Received with result Collection and exposition, can intuitively show whole tree implementing result situation of single node list branch of tester's single tree.
Fig. 3 shows the block diagram of the device of artificial intelligence behavior in test game according to an embodiment of the invention, such as Fig. 3 It is shown, described in the present embodiment test game in artificial intelligence behavior device include modeling unit 310, split cells 320, with And test cell 330.
The modeling unit 310 is configured to be modeled the artificial intelligence behavior tree in configuration file and set Object;
The split cells 320, which is configured to split the tree object progress node, obtains set of node, and to institute State the fractionation of tree object progress branch and obtain Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
The test cell 330 is configured to be loaded into the game by the node in the set of node respectively It is loaded into the game and carries out after row test, the execution condition for respectively being recorded branch's setting in the Bifurcation Set Test and set to be loaded into the game after the execution condition recorded respectively by the tree object and tested.
According to some embodiments of the present invention, the artificial intelligence behavior tree is stored with extensible markup language document.
According to some embodiments of the present invention, the node of the tree object includes being used for the son section for recording level of child nodes collection Point set attribute;
The split cells 320 is used for:The tree object is entered according to the child node set attribute of the node of the tree object Row node splits and obtains set of node.
On the device in above-described embodiment, wherein unit performs the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
The device of artificial intelligence behavior can perform the embodiment of the present invention one and implement in the test game that the present embodiment is provided The method of artificial intelligence behavior, possesses the corresponding functional module of execution method and beneficial effect in the test game that example two is provided Really.
Fig. 4 shows the block diagram of the device of artificial intelligence behavior in test game according to another embodiment of the present invention, such as Shown in Fig. 4, the device of artificial intelligence behavior includes behavior tree acquiring unit 410, modeling in the test game described in the present embodiment Unit 420, split cells 430, test cell 440 and result treatment unit 450:
Behavior tree acquiring unit 410, for obtaining artificial intelligence behavior tree to be tested according to the configuration file Catalogue, the artificial intelligence behavior tree is obtained according to the catalogue.
The modeling unit 420 is configured to be modeled the artificial intelligence behavior tree in configuration file and set Object.
The split cells 430, which is configured to split the tree object progress node, obtains set of node, and to institute State the fractionation of tree object progress branch and obtain Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively.
The test cell 440 is configured to be loaded into the game by the node in the set of node respectively It is loaded into the game and carries out after row test, the execution condition for respectively being recorded branch's setting in the Bifurcation Set Test and set to be loaded into the game after the execution condition recorded respectively by the tree object and tested.
The result treatment unit 450 is configured to that the node in the set of node is being loaded into the trip respectively Tested in play, the execution condition of the branch in the Bifurcation Set is configured respectively after tested and right respectively After the execution condition of the tree object is tested after being configured, the obtained result of test is collected and/or Displaying.
According to some embodiments of the present invention, the artificial intelligence behavior tree is stored with extensible markup language document.
According to some embodiments of the present invention, the behavior tree acquiring unit 410 is used for:Being obtained according to the catalogue is used for Store the extensible markup language document of the artificial intelligence behavior tree.
According to some embodiments of the present invention, the node of the tree object includes being used for the son section for recording level of child nodes collection Point set attribute;
The split cells 430 is used for:The tree object is entered according to the child node set attribute of the node of the tree object Row node splits and obtains set of node.
The device of artificial intelligence behavior can perform the inventive method embodiment and be carried in the test game that the present embodiment is provided The method of artificial intelligence behavior, possesses the corresponding functional module of execution method and beneficial effect in the test game of confession.
Fig. 5 shows electronic equipment according to an embodiment of the invention, as shown in figure 5, electronic equipment 500 may include processing Device 510, memory 520, transmitter 530 and receiver 540.
Memory 520 can store the instruction for the processing of the control operation of processor 510.Memory 520 may include volatibility Or nonvolatile memory, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only storage (ROM) etc., the present invention It is not limited in this respect.
Processor 510 can call the instruction stored in memory 520 to control associative operation.According to an embodiment, memory 520 store and control the instruction that operates below for processor 510:
Artificial intelligence behavior tree in configuration file is modeled and obtains setting object;
Node fractionation is carried out to the tree object and obtains set of node, and the tree object progress branch is divided Support, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
The node in the set of node is loaded into the game respectively and tested, respectively by the Bifurcation Set Branch sets to be loaded into the game after the execution condition recorded and is tested and set the tree object respectively Put to be loaded into the game after the execution condition recorded and tested.
It can be readily appreciated that memory 520, which can also be stored, controls other operations according to embodiments of the present invention for processor 510 Instruction, repeat no more here.
Processor 510 also can control transmitter 530 and receiver 540 carries out signal transmitting and receiving etc..
Detailed description more than, those skilled in the art it can be readily appreciated that system according to embodiments of the present invention and Method has one or more of the following advantages.
Embodiments in accordance with the present invention, the artificial intelligence behavior tree in configuration file be modeled obtain tree object it It is preceding also to include:The catalogue of artificial intelligence behavior tree to be tested is obtained according to the configuration file, institute is obtained according to the catalogue State artificial intelligence behavior tree.
According to some embodiments of the present invention, the node of the tree object includes being used for the son section for recording level of child nodes collection Point set attribute;Obtaining set of node to the tree object progress node fractionation includes:According to the child node of the node of the tree object Set attribute carries out node fractionation to the tree object and obtains set of node.
Embodiments in accordance with the present invention, are surveyed the node in the set of node is loaded into the game respectively Examination, the execution condition of the branch in the Bifurcation Set is configured respectively after tested and respectively to the tree object Execution condition be configured after tested after also include:The result that the test is obtained is collected and/or shown.
According to some embodiments, the present invention also provides a kind of non-transitorycomputer readable storage medium, such as including referring to The memory of order, above-mentioned instruction can complete the above method by the computing device of device.For example, non-transitory is computer-readable Storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..When depositing Instruction in storage media by the computing device of terminal when so that terminal is able to carry out following methods:To the people in configuration file Work intelligent behavior tree, which is modeled, to be obtained setting object;Node fractionation is carried out to the tree object and obtains set of node, and to described Tree object carries out branch's fractionation and obtains Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively;Point The node in the set of node is not loaded into the game and tested, respectively by the setting institute of branch in the Bifurcation Set It is loaded into after the execution condition of record in the game and is tested and the tree object is set what is recorded respectively It is loaded into the game and is tested after the execution condition.
It will be understood by those skilled in the art that accompanying drawing is the schematic diagram of example embodiment, module or flow in accompanying drawing Not necessarily implement the present invention necessary, therefore cannot be used for limiting the scope of the invention.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, also may be used To carry out respective change uniquely different from one or more devices of the present embodiment.The module of above-described embodiment can be merged into One module, can also be further split into multiple submodule.
The exemplary embodiment of the present invention is particularly shown and described above.It should be understood that public the invention is not restricted to institute The embodiment opened, on the contrary, it is intended to cover comprising various modifications in the spirit and scope of the appended claims and wait Effect arrangement.

Claims (10)

1. a kind of method for testing artificial intelligence behavior in game, it is characterised in that including:
Artificial intelligence behavior tree in configuration file is modeled and obtains setting object;
Node is carried out to the tree object split to obtain set of node, and carry out branch to the tree object and split to obtain branch Collection, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
The node in the set of node is loaded into the game respectively and tested, respectively by the branch in the Bifurcation Set Set to be loaded into the game after the execution condition recorded and tested and the tree object is set into institute respectively It is loaded into the game and is tested after the execution condition of record.
2. the method as described in claim 1, it is characterised in that the artificial intelligence behavior tree in configuration file is modeled Obtain also including before tree object:
The catalogue of artificial intelligence behavior tree to be tested is obtained according to the configuration file, obtains described artificial according to the catalogue Intelligent behavior tree.
3. the method as described in claim 1, it is characterised in that the artificial intelligence behavior tree is with extensible markup language document Storage.
4. method as claimed in claim 3, it is characterised in that the artificial intelligence behavior tree is obtained according to the catalogue and wrapped Include:Extensible markup language document for storing the artificial intelligence behavior tree is obtained according to the catalogue.
5. the method as described in claim 1, it is characterised in that the node of the tree object includes being used to record level of child nodes The child node set attribute of collection;
Obtaining set of node to the tree object progress node fractionation includes:According to the child node set attribute of the node of the tree object Node fractionation is carried out to the tree object and obtains set of node.
6. the method as described in claim 1, it is characterised in that the node in the set of node is being loaded into the trip respectively The game is loaded into after the execution condition tested in play, respectively recorded branch's setting in the Bifurcation Set It is middle tested and by it is described tree object set respectively be loaded into after the execution condition recorded in the game carry out Also include after test:The result that the test is obtained is collected and/or shown.
7. a kind of device for testing artificial intelligence behavior in game, it is characterised in that including:
Modeling unit, obtains setting object for being modeled the artificial intelligence behavior tree in configuration file;
Split cells, obtains set of node, and carry out branch to the tree object for carrying out node fractionation to the tree object Fractionation obtains Bifurcation Set, and the execution condition to the branch in the Bifurcation Set is recorded respectively;
Test cell, for the node in the set of node is loaded into the game respectively tested, respectively will be described Branch in Bifurcation Set sets to be loaded into the game after the execution condition recorded and tested and by the tree Object sets to be loaded into the game after the execution condition recorded respectively and tested.
8. device as claimed in claim 7, it is characterised in that described device also includes behavior tree acquiring unit, for right Artificial intelligence behavior tree in configuration file is modeled before obtaining tree object, obtains to be tested according to the configuration file The catalogue of artificial intelligence behavior tree, the artificial intelligence behavior tree is obtained according to the catalogue.
9. device as claimed in claim 7, it is characterised in that described device also includes result treatment unit, for respectively Node in the set of node is loaded into the game and tested, the branch in the Bifurcation Set set remembered respectively It is loaded into after the execution condition of record in the game and is tested and the tree object is set into recorded institute respectively State after being loaded into and being tested in the game after execution condition, the obtained result of testing is collected and/or opened up Show.
10. a kind of electronic equipment, it is characterised in that including:Processor;Memory, is stored for processor control as weighed Profit requires the instruction of any one of 1-6 operations.
CN201710328835.3A 2017-05-11 2017-05-11 Method and device for testing artificial intelligence behaviors in game and electronic equipment Active CN107080945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710328835.3A CN107080945B (en) 2017-05-11 2017-05-11 Method and device for testing artificial intelligence behaviors in game and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710328835.3A CN107080945B (en) 2017-05-11 2017-05-11 Method and device for testing artificial intelligence behaviors in game and electronic equipment

Publications (2)

Publication Number Publication Date
CN107080945A true CN107080945A (en) 2017-08-22
CN107080945B CN107080945B (en) 2020-12-22

Family

ID=59611629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710328835.3A Active CN107080945B (en) 2017-05-11 2017-05-11 Method and device for testing artificial intelligence behaviors in game and electronic equipment

Country Status (1)

Country Link
CN (1) CN107080945B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107875632A (en) * 2017-12-06 2018-04-06 广州多益网络股份有限公司 Realize the method, system and artificial intelligence behavior editing machine of artificial intelligence behavior
CN108664287A (en) * 2018-05-11 2018-10-16 腾讯科技(深圳)有限公司 Export method, apparatus, terminal and the storage medium of operation guide
CN109684217A (en) * 2018-12-25 2019-04-26 网易(杭州)网络有限公司 A kind of method and device of computer games check, electronic equipment, storage medium
CN110898433A (en) * 2019-11-28 2020-03-24 腾讯科技(深圳)有限公司 Virtual object control method and device, electronic equipment and storage medium
CN112190945A (en) * 2020-10-22 2021-01-08 网易(杭州)网络有限公司 Game data processing method and device, computer readable storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068929A (en) * 2015-08-06 2015-11-18 网易(杭州)网络有限公司 Test script generation method, test script generation device, testing method, testing device and testing system
CN105183445A (en) * 2015-07-10 2015-12-23 珠海金山网络游戏科技有限公司 Visual design system of artificial intelligence of game on the basis of XML (Extensive Markup Language)
US9405665B1 (en) * 2015-05-22 2016-08-02 Amazon Technologies, Inc. Application testing based on user input captured during a trial period and priority scheme analysis
CN105988934A (en) * 2016-02-01 2016-10-05 腾讯科技(深圳)有限公司 Automatic detecting method for mobile game and automatic detecting device for mobile game
CN106339302A (en) * 2016-08-22 2017-01-18 腾讯科技(深圳)有限公司 Test method and device for client

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9405665B1 (en) * 2015-05-22 2016-08-02 Amazon Technologies, Inc. Application testing based on user input captured during a trial period and priority scheme analysis
CN105183445A (en) * 2015-07-10 2015-12-23 珠海金山网络游戏科技有限公司 Visual design system of artificial intelligence of game on the basis of XML (Extensive Markup Language)
CN105068929A (en) * 2015-08-06 2015-11-18 网易(杭州)网络有限公司 Test script generation method, test script generation device, testing method, testing device and testing system
CN105988934A (en) * 2016-02-01 2016-10-05 腾讯科技(深圳)有限公司 Automatic detecting method for mobile game and automatic detecting device for mobile game
CN106339302A (en) * 2016-08-22 2017-01-18 腾讯科技(深圳)有限公司 Test method and device for client

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107875632A (en) * 2017-12-06 2018-04-06 广州多益网络股份有限公司 Realize the method, system and artificial intelligence behavior editing machine of artificial intelligence behavior
CN108664287A (en) * 2018-05-11 2018-10-16 腾讯科技(深圳)有限公司 Export method, apparatus, terminal and the storage medium of operation guide
CN109684217A (en) * 2018-12-25 2019-04-26 网易(杭州)网络有限公司 A kind of method and device of computer games check, electronic equipment, storage medium
CN109684217B (en) * 2018-12-25 2022-06-14 网易(杭州)网络有限公司 Game detection method and device, electronic equipment and storage medium
CN110898433A (en) * 2019-11-28 2020-03-24 腾讯科技(深圳)有限公司 Virtual object control method and device, electronic equipment and storage medium
CN110898433B (en) * 2019-11-28 2021-09-03 腾讯科技(深圳)有限公司 Virtual object control method and device, electronic equipment and storage medium
CN112190945A (en) * 2020-10-22 2021-01-08 网易(杭州)网络有限公司 Game data processing method and device, computer readable storage medium and electronic equipment
CN112190945B (en) * 2020-10-22 2024-03-15 网易(杭州)网络有限公司 Game data processing method and device, computer readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN107080945B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN107080945A (en) Method, device and the electronic equipment of artificial intelligence behavior in test game
CN106294156B (en) A kind of static code fault detection analysis method and device
Tilley et al. A survey of formal concept analysis support for software engineering activities
CN105068929B (en) Test script generation method and device, method of testing, test device and test system
CN104050078B (en) Test script generates system
CN109857668A (en) UI automated function test method, test device, test equipment and storage medium
US11481309B2 (en) Capability test method based on joint test support platform
CN110297760A (en) Building method, device, equipment and the computer readable storage medium of test data
CN107957957A (en) The acquisition methods and device of test case
CN107423214A (en) Software regression testing use-case acquisition methods, device and storage medium and electronic equipment
CN104699613B (en) A kind of spacecraft-testing demand automatic creation system and its method
CN109726105A (en) Test data building method, device, equipment and storage medium
CN108763091A (en) Method, apparatus and system for regression test
CN108959067A (en) Test method, device and the computer readable storage medium of search engine
CN114022005A (en) BIM technology-based engineering cost management system and method
CN106681903A (en) Method and device for generating test case
CN112417002B (en) Information literacy data mining method and system applied to education informatization
CN106407102A (en) A fuzz testing method, device and system for application programs
CN114490404A (en) Test case determination method and device, electronic equipment and storage medium
Molka et al. Conformance checking for BPMN-based process models
Menzies Practical machine learning for software engineering and knowledge engineering
CN106227661B (en) Data processing method and device
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
Li et al. Soncraft: A tool for construction, simulation, and analysis of structured occurrence nets
CN115098362A (en) Page testing method and device, electronic equipment and storage medium

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