Virtual lineup optimization method, device and equipment, storage medium and program product
By generating a reference virtual lineup and updating the lineup configuration during the iteration process, the online data dependency is decoupled, solving the problem of low convenience in virtual lineup optimization and achieving efficient and simple lineup optimization.
Patent Information
- Application Number
- CN202210505743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-05-10
AI Technical Summary
In existing technologies, the virtual lineup optimization process is limited by the availability of online lineup data for the target object, resulting in a low level of ease of optimization.
By reading the virtual lineup to be optimized and the configuration guidance information, a reference virtual lineup is generated, and the lineup configuration is updated during the iteration process. The optimal lineup is selected by using the lineup strength, decoupling from online data dependence. Optimization can be achieved by configuring guidance information only.
It improves the ease of virtual lineup optimization, simplifies the optimization process, saves storage resources and computing power, and achieves efficient lineup optimization.
Smart Images

Figure CN116983637B_ABST
Abstract
Description
Technical Field
[0001] This application relates to artificial intelligence technology, and more particularly to a virtual lineup optimization method, apparatus, device, storage medium, and program product. Background Technology
[0002] Within the virtual environment, different factions exist, and the player can control these virtual factions to engage in combat and acquire virtual resources. Virtual factions can be generated by the player's actions; a well-chosen virtual faction will help the player obtain more virtual resources.
[0003] Application software typically provides recommended virtual team compositions to guide users in creating their own. To offer stronger virtual team compositions for reference, related technologies optimize specified virtual team compositions based on the user's online team composition data, resulting in recommended virtual team compositions for the user's consideration.
[0004] However, there are many conditions for obtaining online lineup data of the target, which makes the optimization of virtual lineups less convenient. Summary of the Invention
[0005] This application provides a method, apparatus, device, computer-readable storage medium, and program product for optimizing virtual lineups, which can improve the convenience of virtual lineup optimization.
[0006] The technical solution of this application embodiment is implemented as follows: This application provides a virtual lineup optimization method, including: Read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object, and generate a reference virtual lineup based on the configuration guidance information; The lineup configuration of the initial virtual lineup in the i-th iteration is updated to obtain the updated virtual lineup in the i-th iteration; i is a positive integer, the initial virtual lineup in the 1-th iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup, the updated virtual lineup, and the virtual objects of the virtual lineup to be optimized are all the same. Based on the reference virtual lineup, the lineup strength of the updated virtual lineup in the i-th iteration is determined, and based on the lineup strength, the initial virtual lineup for the (i+1)-th iteration is determined from the initial virtual lineup in the i-th iteration and the updated virtual lineup in the i-th iteration. When i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
[0007] This application provides a virtual lineup optimization device, including: The information reading module is used to read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object; The lineup generation module is used to generate a reference virtual lineup based on the configuration guidance information; The lineup update module is used to update the lineup configuration of the initial virtual lineup in the i-th iteration to obtain the updated virtual lineup in the i-th iteration; i is a positive integer, the initial virtual lineup in the 1-th iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup, the updated virtual lineup, and the virtual objects of the virtual lineup to be optimized are all the same. The strength determination module is used to determine the lineup strength of the updated virtual lineup in the i-th iteration based on the reference virtual lineup; The lineup selection module is used to determine the initial virtual lineup for the (i+1)th iteration from the initial virtual lineup and the updated virtual lineup of the i-th iteration based on the lineup strength; when i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
[0008] In some embodiments of this application, the strength determination module is further configured to pit the updated virtual lineup of the i-th iteration against the reference virtual lineup to obtain the confrontation result; use the confrontation result to count the number of wins and draws of the updated virtual lineup of the i-th iteration; and determine the lineup strength of the updated virtual lineup of the i-th iteration by the ratio of the sum of the number of wins and the number of draws to the total number of confrontation results.
[0009] In some embodiments of this application, the lineup selection module is further configured to select the N virtual lineups with the greatest lineup strength from the initial virtual lineups of the i-th iteration and the updated virtual lineups of the i-th iteration, and use them as the initial virtual lineups of the (i+1)-th iteration; N is a positive integer.
[0010] In some embodiments of this application, the lineup update module is further configured to encode the initial virtual lineup of the i-th iteration to obtain the encoded sequence of the initial virtual lineup of the i-th iteration; select a pair of sequences to be mutated from the encoded sequence of the initial virtual lineup of the i-th iteration; perform cross-processing on the encoded information of the lineup configuration in the pair of sequences to be mutated to obtain a derived sequence of the pair of sequences to be mutated; perform mutation processing on the encoded information of the lineup configuration in the derived sequence to obtain a mutated sequence corresponding to the derived sequence; and decode the mutated sequence to obtain the updated virtual lineup of the i-th iteration.
[0011] In some embodiments of this application, the lineup update module is further configured to generate a crossover coefficient for the sequence pair to be mutated; when the crossover coefficient is greater than or equal to a first threshold, a target virtual object is determined for the sequence pair to be mutated, and the encoding information of the lineup configuration of the target virtual object in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated; when the crossover coefficient is less than the first threshold, a target exchange position is determined from the sequence position corresponding to the encoding information of the lineup configuration in the sequence pair to be mutated, and the encoding information of the target exchange position in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated.
[0012] In some embodiments of this application, the lineup update module is further configured to perform compliance verification on the derived sequence before performing mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the derived sequence after cross-processing the encoding information of the lineup configuration in the sequence pair to be mutated, and before performing mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence, and obtain a verification result; the verification result indicates whether the derived sequence conforms to the virtual lineup matching rules; when the verification result indicates that the derived sequence conforms to the virtual lineup matching rules, mutation processing is performed on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0013] In some embodiments of this application, the lineup update module is further configured to generate corresponding filtering coefficients for the encoding information of the lineup configuration in the derived sequence, and based on the filtering coefficients and a second threshold, filter out the encoding information to be mutated from the encoding information of the lineup configuration in the derived sequence; mutate the encoding information to be mutated in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0014] In some embodiments of this application, the lineup update module is further configured to generate a mutation coefficient for the coding information to be mutated; when the mutation coefficient is greater than or equal to a third threshold, determine a first target coding information from the coding information database for the coding information to be mutated, and replace the coding information to be mutated in the derived sequence with the first target coding information to obtain the mutated sequence of the derived sequence; wherein, the type of the first target coding information is the same as the type of the coding information to be mutated; when the mutation coefficient is less than the third threshold, determine a second target coding information from the derived sequence for the coding information to be mutated, and interchange the second target coding information with the coding information to be mutated to obtain the mutated sequence of the derived sequence; the type of the second target coding information is the same as the type of the coding information to be mutated.
[0015] In some embodiments of this application, the lineup update module is further configured to parse the initial virtual lineup of the i-th iteration to obtain multiple virtual objects and the lineup configuration of each virtual object; wherein the lineup configuration includes at least: virtual skills, team type and layout position; for each virtual object and the lineup configuration of each virtual object, corresponding encoding information is determined; the encoding information of each virtual object and the encoding information of the corresponding lineup configuration are concatenated to obtain a sequence fragment of each virtual object; when the sequence fragments are determined for multiple virtual objects, the encoding sequence of the initial virtual lineup of the i-th iteration is obtained by concatenating the sequence fragments of each of the multiple virtual objects.
[0016] In some embodiments of this application, the lineup generation module is further configured to: read candidate virtual objects, candidate virtual skills, candidate layout positions, and candidate team types from the configuration guidance information; randomly select multiple reference virtual objects from the candidate virtual objects to generate the reference virtual lineup; for each reference virtual object, select matching virtual skills from the candidate virtual skills, select matching layout positions from the candidate layout positions, and select matching team types from the candidate team types; integrate each reference virtual object, along with the matching virtual skills, the matching layout positions, and the matching team types, to obtain a sub-virtual lineup for each reference virtual object; and integrate the sub-virtual lineups of multiple reference virtual objects into the reference virtual lineup.
[0017] This application provides an electronic device, including: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the virtual lineup optimization method provided in the embodiments of this application.
[0018] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the virtual lineup optimization method provided in this application.
[0019] This application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the virtual lineup optimization method provided in this application.
[0020] The embodiments of this application have the following beneficial effects: When optimizing a specified virtual lineup to be optimized, the electronic device only changes the lineup configuration of the virtual lineup to be optimized, obtains the input for each iteration round, that is, the initial virtual lineup for each iteration, and then performs iterative updates to the lineup configuration. During this period, the lineup strength of the updated virtual lineup obtained from the lineup configuration update in each round is determined by using the reference virtual lineup generated based on the original configuration guidance information. At the end of the iteration, the optimized virtual lineup corresponding to the virtual lineup to be optimized can be obtained by filtering the lineup strength. In this way, the optimization process of the specified virtual lineup can be decoupled from the online data of the operation object, making the conditions for virtual lineup optimization simpler. That is, as long as there is configuration guidance information, the specified virtual lineup can be optimized, thus improving the convenience of virtual lineup optimization. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the architecture of the virtual lineup optimization system provided in the embodiments of this application; Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the server structure in the diagram; Figure 3 This is a flowchart illustrating a virtual lineup optimization method provided in an embodiment of this application; Figure 4 This is another flowchart illustrating the virtual lineup optimization method provided in this application embodiment; Figure 5 This is another flowchart illustrating the virtual lineup optimization method provided in the embodiments of this application; Figure 6 This is a schematic diagram of crossover processing of the sequence pairs to be mutated provided in an embodiment of this application; Figure 7 This is another schematic diagram illustrating the crossover process of the sequence pairs to be mutated, provided in an embodiment of this application; Figure 8 This is a schematic diagram illustrating the process of optimizing the lineup in a strategy game according to an embodiment of this application; Figure 9This is a schematic diagram of the lineup format of the specified lineup provided in the embodiments of this application; Figure 10 This is a schematic diagram illustrating the process of outputting an initial lineup and a reference lineup based on a configuration document, as provided in an embodiment of this application. Figure 11 This is a schematic diagram illustrating the lineup exploration process provided in the embodiments of this application; Figure 12 This is a schematic diagram illustrating the process of cross-processing the genes of the initial lineup provided in this application embodiment; Figure 13 This is a schematic diagram illustrating the process of mutating a child's genes, as provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0024] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0026] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0027] 1) Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0028] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0029] 2) A virtual scene is a virtual scene displayed (or provided) by an application when it runs on a terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A virtual scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional. A virtual scene can include elements such as sky, land, ocean, and virtual objects. The land can include environmental elements such as deserts and cities. Users can control the movement of virtual objects within the virtual scene.
[0030] 3) Virtual objects: These are interactive images of people and things within a virtual scene, or movable objects within a virtual scene. These movable objects can be virtual characters, virtual animals, anime characters, etc. A virtual object can be a virtual representation of a real-world object within a virtual scene. A virtual scene can include multiple virtual objects, each with its own shape and volume, occupying a portion of the space within the virtual scene.
[0031] Virtual objects can be characters corresponding to operable objects controlled through client-side operations, trained artificial intelligence characters, or non-user characters (NPCs) set in a virtual scene. The number of virtual objects participating in interaction in the virtual scene can be preset or dynamically determined based on the clients joining the interaction.
[0032] 4) A virtual lineup consists of one or more virtual objects and the lineup configuration specified for each virtual object. Different virtual skills, team types, and layout positions can be specified for a single virtual object, resulting in different virtual lineups.
[0033] It should be noted that in the virtual scenario, the virtual lineups will belong to their respective factions, and the virtual lineups in opposing factions can fight against each other, resulting in a draw, victory or defeat.
[0034] 5) Genetic algorithms are computational models that simulate the natural selection and biological evolution process in nature. They are a method for searching for optimal solutions by simulating the natural evolution process.
[0035] 6) The advantage / draw rate is the ratio of the sum of the number of wins and draws of the virtual lineup to the total number of matches the virtual lineup participates in. The advantage / draw rate can represent the strength of the virtual lineup.
[0036] Within the virtual environment, different factions exist, and the player can control these virtual factions to engage in combat and acquire virtual resources. Virtual factions can be generated by the player's actions; a well-chosen virtual faction will help the player obtain more virtual resources.
[0037] Application software typically provides recommended virtual team compositions to guide users in creating their own virtual team compositions. Therefore, the strength of the recommended virtual team composition affects the strength of the user's own virtual team composition. To provide users with stronger virtual team compositions for reference, related technologies optimize a given initial virtual team composition using the user's online team composition data to obtain a recommended virtual team composition for reference.
[0038] At this point, it is necessary to analyze and statistically analyze the online lineup data of the target (i.e., the virtual lineups and lineup configurations that the target sets up online), that is, to identify the virtual lineups with high win rates and analyze the lineup configurations of these virtual lineups, and then optimize the initial virtual lineups based on the analyzed lineup configurations.
[0039] However, there are many conditions for obtaining the online lineup data of the target. For example, the actual online lineup data of the target can only be obtained during the public beta of the application software or after it is launched. This makes it inconvenient to optimize the lineup configuration of the initial virtual lineup generated in the preliminary pairing, that is, it makes the optimization of the virtual lineup less convenient.
[0040] This application provides a virtual lineup optimization method, apparatus, device, and computer-readable storage medium, which can improve the convenience of virtual lineup optimization. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server. The following will describe exemplary applications when the electronic device is implemented as a server.
[0041] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the virtual lineup optimization system provided in this application embodiment. To support a virtual lineup optimization application, in the virtual lineup optimization system 100, terminals (terminals 400-1 and 400-2 are shown as examples) connect to the server 200 through a network 300. The network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. The virtual lineup optimization system 100 also includes a database 500, which provides data support to the server 200. The database 500 can be configured within the server 200 or can be independent of the server 200. Figure 1 This illustrates a scenario where database 500 is independent of server 200.
[0042] Terminals 400-1 and 400-2 are used to receive the operations of the planners on the displayed lineup configuration interface, generate the virtual lineup to be optimized (the virtual lineups to be optimized generated by terminals 400-1 and 400-2 can be the same or different), and upload the virtual lineup to be optimized to server 200.
[0043] Server 200 reads the specified virtual lineup to be optimized and the configuration guidance information for guiding the lineup matching of the operation objects, and generates a reference virtual lineup based on the configuration guidance information; updates the lineup configuration of the initial virtual lineup in the i-th iteration to obtain the updated virtual lineup in the i-th iteration, where i is a positive integer, the initial virtual lineup in the 1-th iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup, the updated virtual lineup, and the virtual objects of the virtual lineup to be optimized are all the same in the i-th iteration; based on the reference virtual lineup, the lineup strength of the updated virtual lineup in the i-th iteration is determined, and based on the lineup strength, the initial virtual lineup for the (i+1)-th iteration is determined from the initial virtual lineup and the updated virtual lineup in the i-th iteration; when i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized, thus completing the virtual lineup optimization process.
[0044] Server 200 is also used to return the optimized virtual lineup to terminals 400-1 and 400-2. Terminal 400-1 is also used to display the optimized virtual lineup of the virtual lineup to be optimized generated on the graphical interface 410-1, and terminal 400-2 is used to display the optimized virtual lineup of the virtual lineup to be optimized generated on the graphical interface 410-2.
[0045] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, smart home appliance, in-vehicle terminal, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the invention.
[0046] See Figure 2 , Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the structure of a server (an embodiment of an electronic device) in the diagram. Figure 2 The server 200 shown includes at least one processor 210, memory 250, at least one network interface 220, and a user interface 230. The various components in server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to implement communication between these components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 240.
[0047] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0048] User interface 230 includes one or more output devices 231 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0049] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices physically located away from the processor 210.
[0050] The memory 250 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 250 described in this application embodiment is intended to include any suitable type of memory.
[0051] In some embodiments, memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0052] Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220, such as Bluetooth, Wi-Fi, and Universal Serial Bus (USB). Presentation module 253 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 231 associated with user interface 230 (e.g., a display screen, a speaker, etc.). The input processing module 254 is used to detect and translate one or more user inputs or interactions from one or more input devices 232.
[0053] In some embodiments, the virtual lineup optimization device provided in this application can be implemented in software. Figure 2A virtual lineup optimization device 255 stored in memory 250 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an information reading module 2551, a lineup generation module 2552, a lineup update module 2553, a strength determination module 2554, and a lineup filtering module 2555. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.
[0054] In other embodiments, the virtual lineup optimization device provided in this application can be implemented in hardware. As an example, the virtual lineup optimization device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the virtual lineup optimization method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0055] In some embodiments, a server (one implementation of an electronic device) can implement the virtual lineup optimization method provided in this application by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a lineup enhancement APP; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.
[0056] The embodiments of this application can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and vehicle-mounted systems. Below, the virtual lineup optimization method provided by the embodiments of this application will be described in conjunction with exemplary applications and implementations of the electronic devices provided in the embodiments of this application.
[0057] See Figure 3 , Figure 3 This is a flowchart illustrating a virtual lineup optimization method provided in an embodiment of this application, which will be combined with... Figure 3 The steps shown are explained.
[0058] S101. Read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object, and generate a reference virtual lineup based on the configuration guidance information.
[0059] This application embodiment is implemented in a scenario where a specified virtual lineup is optimized. For example, it optimizes a virtual lineup specified by a planner or automatically specified by an electronic device to obtain a virtual lineup with a better lineup combination than the specified virtual lineup. In this application embodiment, the electronic device reads the specified virtual lineup to be optimized from a database or its own storage space, and simultaneously reads configuration guidance information. The configuration guidance information is used to guide the operation object in lineup combination, that is, to provide guidance to the operation object when combining lineups, such as an introduction to the virtual object, the virtual skills available to the virtual object, and the types of teams suitable for the virtual object to lead, etc.
[0060] In some embodiments, after obtaining the configuration guidance information, the electronic device parses the configuration guidance information to obtain the virtual objects, virtual skills, team types, and position layouts available for the operation object when assembling the lineup. Then, it randomly selects multiple virtual objects from the candidate virtual objects and randomly assembles virtual skills, team types, and position layouts for each virtual object, thus randomly generating a lineup configuration to obtain a reference virtual lineup. In other words, the reference virtual lineup can be randomly generated based on the configuration guidance information.
[0061] In other embodiments, the electronic device parses the configuration guidance information and filters out the virtual object with the highest damage, as well as the virtual skill with the highest damage, the team type with the highest mobility, and the position layout with the strongest defensive attributes. Using the filtered virtual objects, virtual skills, team types, and position layouts, a reference virtual lineup is obtained.
[0062] It should be noted that the electronic device may generate only one reference virtual lineup based on the configuration guidance information, or it may generate multiple reference virtual lineups based on the configuration guidance information. This application embodiment does not make specific limitations here.
[0063] As can be understood, virtual skills are virtual actions cast by virtual objects within a virtual environment to produce special effects. Virtual skills can provide buffs to virtual objects of the same faction or to other virtual objects, such as healing or increased hit rate; virtual skills can also inflict debuffs on virtual objects of different factions, such as weakness or slowing. Team type refers to the type of team a virtual object can command within a virtual environment, such as a riding squad or a construction squad. Position layout refers to the virtual object's location within the virtual environment, such as front row, back row, etc.
[0064] S102. Update the lineup configuration of the initial virtual lineup in the i-th iteration to obtain the updated virtual lineup in the i-th iteration. The initial virtual lineup in the first round is obtained by changing the lineup configuration of the virtual lineup to be optimized.
[0065] After determining the virtual lineup to be optimized and the reference lineup, the electronic device modifies the lineup configuration of the virtual lineup to be optimized to obtain the initial virtual lineup for the first iteration. Then, based on this initial virtual lineup, it begins the iterative process of lineup updates. Thus, the initial virtual lineup for the first round is generated based on the virtual lineup to be optimized, and both the initial virtual lineup and the virtual lineup to be optimized contain the same virtual objects. The initial virtual lineup includes virtual objects and lineup configuration. During the i-th iteration, the electronic device fixes the virtual objects in the initial virtual lineup of this iteration, updates the lineup configuration to obtain the updated lineup configuration, and then integrates the virtual objects and the updated lineup configuration to form the updated virtual lineup for the i-th iteration.
[0066] It is understood that in the embodiments of this application, i is a positive integer, and the lineup configuration can be one or more of the virtual skills, position layout and team type of the virtual object.
[0067] It should be noted that in some embodiments, the virtual lineup to be optimized contains only one virtual object. In this case, the electronic device can directly use the virtual object in the virtual lineup to be optimized as the virtual object of the initial virtual lineup for the first iteration. In other embodiments, the virtual lineup to be optimized may contain multiple virtual objects, and these virtual objects may have an order, such as the order of the main general and the deputy general. In this case, the electronic device may directly obtain the virtual object of the initial virtual lineup for the first iteration without changing the order of the multiple virtual objects, or it may obtain the virtual object of the initial virtual lineup for the first iteration after changing the order of the multiple virtual objects.
[0068] In other words, regardless of the number of virtual objects in the virtual lineup to be optimized, the initial virtual lineup in the first iteration and the lineup to be optimized contain the same number of virtual objects. Furthermore, since the virtual objects do not change during lineup updates, the virtual objects in the initial virtual lineup, the updated virtual lineup, and the lineup to be optimized in any given round are all the same. That is, the initial virtual lineup in the i-th iteration, the updated virtual lineup in the i-th iteration, and the lineup to be optimized all contain the same number of virtual objects.
[0069] S103. Based on the reference virtual lineup, determine the lineup strength of the updated virtual lineup in the i-th iteration, and based on the lineup strength, determine the initial virtual lineup for the (i+1)-th iteration from the initial virtual lineup and the updated virtual lineup in the i-th iteration.
[0070] After updating the virtual lineup in the i-th iteration, the electronic device can determine the lineup strength of the updated virtual lineup by comparing the reference virtual lineup with the updated virtual lineup in the i-th iteration. Then, by comparing the lineup strength of the initial virtual lineup in the i-th iteration with the updated virtual lineup in the i-th iteration, the device selects the initial virtual lineup for the next iteration, i.e., the (i+1)-th iteration, so as to start the lineup update iteration in the (i+1)-th iteration and obtain the updated lineup in the (i+1)-th iteration.
[0071] It is understood that the strength of the lineup can be the win rate of the updated virtual lineup, the advantage rate of the updated virtual lineup, or the overall combat power value of the virtual lineup (such as the overall combat power obtained by weighting output value, defense value, buff value, etc.). This application embodiment does not make specific limitations here.
[0072] In some embodiments, the electronic device can compare the strength of the initial virtual lineup in the i-th iteration and the updated virtual lineup in the i-th iteration. When the initial virtual lineup in the i-th iteration is greater than the updated virtual lineup in the i-th iteration, the initial virtual lineup in the i-th iteration is determined as the initial virtual lineup in the (i+1)-th iteration; otherwise, the updated virtual lineup in the i-th iteration is determined as the initial virtual lineup in the (i+1)-th iteration. In this way, the electronic device can obtain the initial virtual lineup in the (i+1)-th iteration.
[0073] In other embodiments, the electronic device may also simultaneously compare the strength of the updated virtual lineup in the i-th iteration and the strength of the initial virtual lineup in the i-th iteration with a strength threshold, and then jointly select several virtual lineups with a strength greater than the strength threshold from the updated virtual lineup in the i-th iteration and the initial virtual lineup in the i-th iteration as the initial virtual lineup for the (i+1)-th iteration.
[0074] S104. When i reaches the maximum number of iterations, select the virtual lineup with the highest lineup strength from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and use it as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
[0075] The electronic device updates and iterates the lineup until i reaches the maximum number of iterations. Then, it completes the last iteration and obtains the updated virtual lineup and its corresponding lineup strength. The electronic device then selects the virtual lineup with the highest lineup strength from the initial and updated virtual lineups obtained from all rounds of iterations. The selected virtual lineup is then identified as the optimized virtual lineup corresponding to the virtual lineup to be optimized. In this way, the lineup optimization process for the virtual lineup to be optimized is completed, and the virtual objects contained in the virtual lineup to be optimized do not change.
[0076] It should be noted that the maximum number of iterations can be set according to actual needs, such as 100 or 500, etc.; the maximum number of iterations can also be determined by analyzing the maximum number of iterations used in previous virtual lineup optimization processes using artificial intelligence technology, and the maximum number of iterations in this application embodiment is not specifically limited here.
[0077] Understandably, compared to related technologies that optimize virtual lineups using online lineup data of the operating object, which makes virtual lineup optimization less convenient, in this embodiment, when optimizing a specified virtual lineup to be optimized, the electronic device only changes the lineup configuration of the virtual lineup to be optimized, obtaining the input for each iteration round, i.e., the initial virtual lineup for each iteration, and then iteratively updates the lineup configuration. During this period, using the reference virtual lineup generated based on the original configuration guidance information, the lineup strength of the updated virtual lineup obtained from the lineup configuration update in each round is determined, and at the end of the iteration, the optimized virtual lineup corresponding to the virtual lineup to be optimized can be obtained by filtering the lineup strength. This decouples the optimization process of the specified virtual lineup from the online data of the operating object, making the conditions for virtual lineup optimization simpler. That is, as long as there is configuration guidance information, the specified virtual lineup can be optimized, thus improving the convenience of virtual lineup optimization. In addition, since the optimization of the virtual lineup is decoupled from the online data of the operation object in this embodiment, there is no need to allocate additional storage space and computing power to the data acquisition process (usually a large amount of online data is required to achieve virtual lineup optimization), thus saving storage and computing power resources during virtual lineup optimization.
[0078] based on Figure 3 See Figure 4 , Figure 4 This is another flowchart illustrating the virtual lineup optimization method provided in this application. In some embodiments of this application, the specific implementation process of determining the lineup strength of the updated virtual lineup in the i-th iteration based on the reference virtual lineup may include: S1031-S1033, as follows: S1031. Compare the updated virtual lineup of the i-th iteration with the reference virtual lineup to obtain the result of the confrontation.
[0079] The electronic device assigns the updated virtual lineup from the i-th iteration and the reference virtual lineup generated based on the configuration guidance information to different camps, so that the updated virtual lineup and the reference virtual lineup can start fighting in a virtual scene, and obtain the result of the fight at the end. The result of the fight represents the victory or defeat of the updated virtual lineup and the reference virtual lineup.
[0080] It should be noted that when there are multiple reference virtual lineups, the electronic device will pit the updated virtual lineup of the i-th iteration against each reference virtual lineup, resulting in multiple adversarial outcomes. When there is only one reference virtual lineup, the electronic device will pit the updated virtual lineup of the i-th iteration against the reference virtual lineup against each other in multiple different terrains of the virtual scene (e.g., canyons, plains, mountains, etc.), resulting in multiple adversarial outcomes.
[0081] S1032. Using the results of the confrontation, the number of wins and draws of the updated virtual lineup in the i-th iteration are statistically obtained.
[0082] The electronic device reads from the results of the confrontation whether the updated virtual lineup in the i-th round achieved a victory against the reference virtual lineup and whether it drew with the reference virtual lineup, and counts the number of victories and draws of the updated virtual lineup.
[0083] S1033. The ratio of the sum of the number of wins and draws to the total number of confrontation results is determined as the lineup strength of the updated virtual lineup in the i-th iteration.
[0084] The electronic device sums the number of wins and draws obtained from the statistics, and then compares the sum with the total number of confrontation results, that is, the total number of confrontations. The ratio obtained is the lineup strength of the updated virtual lineup in the i-th iteration.
[0085] It is understood that in the embodiments of this application, the electronic device can determine the strength of the updated virtual lineup in the i-th iteration by comparing the reference virtual lineup with the updated virtual lineup of the i-th iteration, thereby making the lineup strength more realistic and reliable.
[0086] In some embodiments of this application, the specific implementation process of determining the initial virtual lineup for the (i+1)th iteration from the initial virtual lineup for the i-th iteration and the updated virtual lineup for the i-th iteration based on lineup strength may include: S1034, as follows: S1034. From the initial virtual lineup of the i-th iteration and the updated virtual lineup of the i-th iteration, select the N virtual lineups with the greatest lineup strength and use them as the initial virtual lineups of the (i+1)-th iteration.
[0087] The electronic device sorts the lineup strength of the initial virtual lineup in the i-th iteration and the lineup strength of the updated virtual lineup in the i-th iteration in descending order to obtain a lineup strength sequence. Then, the virtual lineups corresponding to the first N lineup strengths in the lineup strength sequence are determined as the initial virtual lineups for the (i+1)-th iteration. Here, N is a positive integer, and the value of N can be set according to actual needs, such as 3, 5, etc., which is not limited in this embodiment.
[0088] It should be noted that the initial virtual lineup in the i-th iteration may contain the updated virtual lineup from the (i-1)-th iteration. The lineup strength of the updated virtual lineup from the (i-1)-th iteration has already been calculated using the reference virtual lineup in the (i-1)-th iteration and can be directly read. For virtual lineups in the initial virtual lineup of the i-th iteration other than the updated virtual lineup from the (i-1)-th iteration, their corresponding lineup strength can be obtained by playing against the reference virtual lineup.
[0089] It is understood that in this embodiment of the application, the electronic device will only iterate through the initial virtual lineup and the N virtual lineups with the greatest lineup strength in the i-th iteration, thereby eliminating the less-than-ideal virtual lineups through iteration and ensuring the quality of the virtual lineups participating in the iteration.
[0090] based on Figure 3 See Figure 5 , Figure 5 This is another flowchart illustrating the virtual lineup optimization method provided in this application. In some embodiments of this application, updating the lineup configuration of the initial virtual lineup in the i-th iteration to obtain the updated virtual lineup in the i-th iteration, i.e., the specific implementation process of S102, may include: S1021-S1025, as follows: S1021. Encode the initial virtual lineup for the i-th iteration to obtain the encoding sequence of the initial virtual lineup for the i-th iteration.
[0091] The electronic device encodes the initial virtual lineup of the i-th iteration to obtain a unique encoding sequence for the initial virtual lineup of the i-th iteration.
[0092] For example, an electronic device can represent the virtual objects in the initial virtual lineup, as well as each attribute in the lineup configuration, with corresponding characters to obtain an 18-bit encoded sequence.
[0093] S1022. Select the sequence pairs to be mutated from the encoding sequence of the initial virtual lineup in the i-th iteration.
[0094] The electronic device can arbitrarily select two coding sequences from the coding sequence of the initial virtual lineup in the i-th iteration to form a pair of sequences to be mutated, or it can calculate the similarity between each coding sequence of the initial virtual lineup in the i-th iteration and then select the two coding sequences with the smallest similarity to form a pair of sequences to be mutated. The embodiments of this application do not make specific limitations here.
[0095] S1023. Based on the encoding information of the lineup configuration in the sequence pair to be mutated, perform cross-processing to obtain the derived sequence of the sequence pair to be mutated.
[0096] The sequence pair to be mutated contains two coded sequences. The electronic device cross-processes the coded information regarding the lineup configuration in these two sequences to obtain a derived sequence different from either of the coded sequences in the sequence pair to be mutated. It should be noted that the electronic device can perform cross-processing at multiple points on the coded information regarding the lineup configuration in the two coded sequences of the sequence pair to be mutated, resulting in multiple derived sequences. Alternatively, the electronic device can segment the two coded sequences of the sequence pair to be mutated, and then cross-process the segments containing the coded information regarding the lineup configuration in each segment to obtain multiple derived sequences.
[0097] S1024. Perform mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0098] Next, the electronic device will continue to mutate the encoded information of the array configuration in the obtained derived sequence to obtain a new sequence that is different from the derived sequence. This new sequence is the mutated sequence. It can be understood that the number of mutated sequences is the same as the number of derived sequences, that is, each derived sequence is mutated only once to obtain a mutated sequence.
[0099] S1025. Decode the mutated sequence to obtain the updated virtual lineup for the i-th iteration.
[0100] The electronic device decodes the obtained mutated sequence to restore it to a virtual lineup. The resulting virtual lineup is the updated virtual lineup for the i-th iteration. At this point, the electronic device has completed the configuration lineup update for the i-th iteration.
[0101] In this embodiment, the electronic device processes the data from two dimensions: crossover and mutation, and obtains the mutated sequence from the sequence pairs to be mutated. In this way, the lineup configuration of the initial virtual lineup can be fully changed to obtain an updated virtual lineup.
[0102] In some embodiments of this application, the specific implementation process of obtaining the derived sequence of the sequence pair to be mutated, i.e., S1023, based on the encoding information of the lineup configuration in the sequence pair to be mutated, may include: S1023a, and any one of S1023b and S1023c, as follows: S1023a. Generate cross-coefficients for the sequence pairs to be mutated.
[0103] When electronic devices perform crossover processing on pairs of sequences to be mutated, they can first generate corresponding crossover coefficients for the pairs of sequences by generating random numbers or by randomly selecting values from multiple preset values. The crossover coefficients are used to control how the pairs of sequences are crossover processed.
[0104] S1023b When the crossover coefficient is greater than or equal to the first threshold, the target virtual object of the sequence pair to be mutated is determined, and the encoding information of the lineup configuration of the target virtual object in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated.
[0105] The electronic device compares the crossover coefficient with a first threshold. When the crossover coefficient is greater than or equal to the first threshold, the target virtual object is identified for the sequence pair to be mutated. Then, the encoding information of the lineup configuration of the target virtual object is determined (the target virtual object has different lineup configurations in different encoding sequences). The encoding information of the lineup configuration of the target virtual object in the two encoding sequences contained in the sequence pair to be mutated is interchanged, resulting in two completely new encoding sequences. These two encoding sequences are the derived sequences. This crossover process can be simply referred to as group crossover.
[0106] For example, Figure 6 This is a schematic diagram illustrating the crossover processing of the sequence pair to be mutated provided in an embodiment of this application. The sequence pair to be mutated, 6-1, includes encoding sequence 6-11 and encoding sequence 6-12. The target virtual object is encoded as information 6-111 in encoding sequence 6-11, the lineup configuration of the target virtual object is encoded as information 6-112 in encoding sequence 6-11, the target virtual object is encoded as information 6-121 in encoding sequence 6-12, and the lineup configuration of the target virtual object is encoded as information 6-122 in encoding sequence 6-12. The electronic device swaps encoding information 6-112 and encoding information 6-122 to obtain two new encoding sequences, namely encoding sequence 6-2 and encoding sequence 6-3. These two encoding sequences are the derived sequences.
[0107] It is understood that the virtual objects contained in the two coding sequences in the sequence pair to be mutated should be the same. Thus, the electronic device can randomly select one virtual object from the virtual objects contained in the two coding sequences as the target virtual object, or it can select the virtual object in a preset position, such as the virtual object corresponding to the main position, etc. The embodiments of this application are not limited here.
[0108] The value of the first threshold can be set according to the actual situation, such as 0.4 or 0.8, etc., and this application embodiment does not limit it.
[0109] S1023c: When the crossover coefficient is less than the first threshold, the target exchange position is determined from the sequence position corresponding to the encoding information of the lineup configuration in the sequence pair to be mutated, and the encoding information of the target exchange position in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated.
[0110] When the crossover coefficient is less than a first threshold, the electronic device can randomly extract the sequence positions corresponding to the coded information of the lineup configuration from various positions in the coded sequence, and then randomly select the target exchange position from the sequence positions, or determine a specific position in the sequence position (such as the 1st position, the 5th position, etc.) as the target exchange position. Then, the coded information in the two coded sequences contained in the sequence to be mutated is swapped at the target exchange position. After the swap, two completely new derived sequences can be obtained. This crossover process can be simply referred to as multi-point crossover.
[0111] For example, Figure 7 This is another schematic diagram of the crossover process of the sequence pair to be mutated provided in the embodiments of this application. The sequence pair to be mutated 7-1 contains coding sequence 7-11 and coding sequence 7-12. The electronic device can exchange the coding information of coding sequence 7-11 and coding sequence 7-12 at point 7-2 (a certain target exchange position) and point 7-3 (another target exchange position) to obtain derivative sequence 7-41 and derivative sequence 7-42.
[0112] In this embodiment, the electronic device can generate crossover coefficients and use the relationship between the crossover coefficients and a first threshold to select a crossover method from group crossover and multi-point crossover to complete the crossover process of the sequence pair to be mutated. This makes the crossover process of the sequence pair to be mutated more diverse, thereby making the derived sequences more diverse, so as to obtain more diverse updated virtual lineups in the future.
[0113] In some embodiments of this application, after cross-processing the encoding information of the lineup configuration in the sequence pair to be mutated to obtain the derived sequence of the sequence pair to be mutated, and before performing mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence, i.e. after S1023 and before S1024, the method may further include: S1026, as follows: S1026. Perform compliance verification on the derived sequence and obtain the verification results.
[0114] It should be noted that there are matching rules when creating virtual lineups. For example, some virtual skills can be paired with certain specific virtual objects. Therefore, in this embodiment, after obtaining the derived sequence of the sequence pair to be mutated, the electronic device also needs to verify whether the derived sequence conforms to the matching rules of the virtual lineup, and obtain a verification result. That is, the verification result indicates whether the derived sequence conforms to the matching rules of the virtual lineup.
[0115] In this case, the encoding information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence, i.e., the specific implementation process of S1024, can include: S1024A, as follows: S1024A. When the verification result indicates that the derived sequence conforms to the virtual lineup matching rules, the encoding information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence.
[0116] In other words, the electronic device will only begin mutation processing on the encoded information of the lineup configuration in the derived sequence if the obtained derived sequence conforms to the above matching rules, thus obtaining a mutated sequence. If the derived sequence does not conform to the above matching rules, the electronic device will stop processing the encoded information of the lineup configuration in the derived sequence, that is, it will no longer perform mutation and delete the derived sequence.
[0117] In this embodiment, the electronic device will also obtain a derivative sequence. Only after the compliance verification of the derivative sequence is passed will the next step of processing be carried out on the encoding information of the lineup configuration in the derivative sequence, so as to ensure that the subsequent obtained mutation sequence conforms to the matching rules, thereby ensuring the reliability of updating the virtual lineup.
[0118] In some embodiments of this application, the encoding information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence. The specific implementation process of S1024 may include: S1024a-S1024c, as follows: S1024a. For the coding information of the lineup configuration in the derived sequence, generate corresponding screening coefficients, and based on the screening coefficients and the second threshold, select the coding information to be mutated from the coding information of the lineup configuration in the derived sequence.
[0119] For each encoded information about lineup configuration in the derived sequence, the electronic device determines its corresponding screening coefficient, then compares the screening coefficient with a second threshold, and identifies the encoded information with a screening coefficient greater than or equal to the second threshold as the encoded information to be mutated.
[0120] It is understood that the electronic device can generate a random number for each of the above-mentioned encoded information and determine the generated random number as a screening coefficient. The electronic device can also calculate the similarity between the encoded information and preset information, and determine the coefficient corresponding to the preset information that is most similar to it as the screening coefficient. This application embodiment does not make specific limitations here.
[0121] S1024b: Mutate the coding information to be mutated in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0122] The electronic device performs mutation processing on the selected information to be mutated to obtain its corresponding mutation coding information. Then, it uses the mutation coding information to overwrite the original mutation coding information in the derived sequence, thus obtaining a completely new mutated sequence.
[0123] In this embodiment, the electronic device uses the relationship between the screening coefficient and the second threshold to screen out the coding information to be mutated from the derived sequence, and then performs mutation processing only on the coding information to be mutated to obtain the corresponding mutated coding information. The mutated coding information is then used to replace the coding information to be mutated, thereby completing the mutation processing of the derived sequence.
[0124] In some embodiments of this application, the specific implementation process of mutating the coding information to be mutated in the derived sequence to obtain the mutated sequence corresponding to the derived sequence, i.e., S1024b, may include: S201, and any one of S202 and S203, as follows: S201. Generate the coefficient of variation for the coding information to be mutated.
[0125] Electronic devices can generate variation coefficients for the encoded information to be mutated by generating random numbers, or they can calculate the similarity between the encoded information to be mutated and preset encoded information, and determine the coefficient corresponding to the preset encoded information that is most similar to the encoded information to be mutated as the variation coefficient.
[0126] S202. When the coefficient of variation is greater than or equal to the third threshold, the first target coding information is determined from the coding information database for the coding information to be mutated, and the coding information to be mutated in the derived sequence is replaced by the first target coding information to obtain the mutated sequence of the derived sequence.
[0127] The electronic device compares the coefficient of variation with a third threshold. When the coefficient of variation is greater than or equal to the third threshold, the electronic device retrieves a first target encoding information from the encoding information library of the same type as the encoding information to be mutated. Thus, the type of the first target encoding information is the same as the type of the encoding information to be mutated. Then, the electronic device replaces the encoding information to be mutated with the first target encoding information. The resulting encoding sequence is the mutated sequence of the derived sequence.
[0128] For example, when the encoded information to be mutated is the encoded information of a certain virtual skill, the electronic device will randomly select the encoded information of another virtual skill from the encoded information library as the first target encoded information to replace the encoded information to be mutated. That is, the electronic device replaces a certain virtual skill in the derived sequence with other virtual skills in the skill library to obtain the mutated sequence.
[0129] S203. When the coefficient of variation is less than the third threshold, determine the second target coding information from the derived sequence for the coding information to be mutated, and interchange the second target coding information and the coding information to be mutated to obtain the mutated sequence of the derived sequence.
[0130] When the coefficient of variation is less than the third threshold, the electronic device determines the coding information of the same type as the coding information to be mutated from the derived sequence. Then, it selects a second target coding information from the coding information of the same type, so that the type of the second target coding information is the same as the type of the coding information to be mutated. The electronic device then overwrites the coding information to be mutated with the second target coding information, which is equivalent to swapping the coding information to be mutated and the second target coding information. The new coding sequence obtained after the swap is the mutated sequence.
[0131] For example, when the encoded information to be mutated is the encoded information of a certain virtual skill, the electronic device randomly selects the encoded information of another virtual skill from the derived sequence as the second target encoded information. That is, the electronic device replaces the virtual skill and swaps it with another virtual skill in the derived sequence to obtain the mutated sequence.
[0132] In this embodiment, the electronic device can determine what kind of mutation operation to perform on the derived sequence by the relationship between the coefficient of variation and the third threshold, thereby making the mutated sequences more diverse and further making the updated virtual lineup more diverse.
[0133] In some embodiments of this application, the initial virtual lineup for the i-th iteration is encoded to obtain the encoding sequence of the initial virtual lineup for the i-th iteration, i.e., the specific implementation process of S1021 may include: S1021a-S1021d, as follows: S1021a. The initial virtual lineup of the i-th iteration is parsed to obtain multiple virtual objects and the lineup configuration of each virtual object.
[0134] S1021b: For each virtual object and the lineup configuration of each virtual object, determine the corresponding encoding information respectively.
[0135] The electronic device parses multiple virtual objects from the initial virtual lineup, and parses the lineup configuration corresponding to each virtual object. Then, it encodes each parsed virtual object and its corresponding lineup configuration to obtain the encoding information corresponding to the virtual object and the encoding information corresponding to the lineup configuration.
[0136] It should be noted that the lineup configuration includes at least: virtual skills, team type, and layout position. The electronic device can then assign different coding symbols to different virtual skills, team types, and layout positions. For example, a critical hit skill might be assigned the coding symbol B, and a healing skill might be assigned the coding symbol R. This allows the corresponding coding information to be determined for each element in the lineup configuration. The electronic device can determine the corresponding coding information for virtual objects in a similar manner.
[0137] S1021c: Concatenate the encoding information of the virtual object and the encoding information of the lineup configuration to obtain the sequence fragment of each virtual object.
[0138] S1021d When sequence fragments are determined for multiple virtual objects, the sequence fragments of each virtual object are used to splice together to obtain the encoding sequence of the initial virtual lineup in the i-th iteration.
[0139] The electronic device concatenates the encoded information of the virtual objects and the encoded information of the lineup configuration into a sequence fragment for each virtual object, following the order of virtual objects first and the corresponding lineup configurations second. Then, the sequence fragments of each virtual object are concatenated to obtain the encoded sequence of the initial virtual lineup for the i-th iteration.
[0140] Understandably, electronic devices can concatenate the encoded information of virtual skills, team types, and layout positions in the order of virtual skills, team types, and layout positions to obtain the encoded information of the lineup configuration.
[0141] For example, when virtual objects are represented by H, virtual skills by S, team types by E, and layout positions by P, the electronic device can splice together fragments of HSSSEP in the above order to obtain the sequence fragments of the virtual objects. When similar sequence fragments are determined for all virtual objects, the electronic device can splice them together to obtain the encoded sequence of HSSSEP.
[0142] In this embodiment, the electronic device can encode the virtual object, the virtual skill, team type and layout position of the virtual object respectively, and then use the encoding information corresponding to these contents to integrate into the encoding sequence of the initial virtual lineup, so as to facilitate subsequent cross-processing and mutation of the encoding sequence to obtain the updated virtual lineup.
[0143] In some embodiments of this application, the specific implementation process of generating a reference virtual lineup based on configuration guidance information, i.e., S101, may include: S1011-S1015, as follows: S1011. Read the candidate virtual objects, candidate virtual skills, candidate layout positions, and candidate team types from the configuration guidance information.
[0144] S1012. Randomly select multiple reference virtual objects from the candidate virtual objects to generate the reference virtual lineup.
[0145] The electronic device parses the configuration guidance information to obtain available candidate virtual objects, available candidate virtual skills, candidate layout positions, and candidate team types. Then, the electronic device randomly selects multiple virtual objects from the candidate virtual objects to serve as multiple reference virtual objects for forming a reference virtual lineup.
[0146] S1013. For each reference virtual object, filter matching virtual skills from candidate virtual skills, filter matching layout positions from candidate layout positions, and filter matching team types from candidate team types.
[0147] S1014. Using each reference virtual object, as well as matching virtual skills, matching layout positions, and matching team types, integrate to obtain the sub-virtual lineup of each reference virtual object.
[0148] The electronic device can randomly select from candidate virtual skills, candidate layout positions, and candidate team types to match the corresponding virtual skills, layout positions, and team types for each virtual object. Then, it integrates each reference virtual object and its corresponding matching virtual skills, layout positions, and team types to obtain the sub-virtual lineup for each virtual object.
[0149] S1015. Integrate the sub-virtual lineups of multiple reference virtual objects into a single reference virtual lineup.
[0150] Finally, the electronic device will integrate the sub-virtual lineups corresponding to the different reference virtual objects into a complete virtual lineup, which is the reference virtual lineup.
[0151] In this embodiment of the application, the electronic device can randomly generate a reference virtual lineup based on configuration guidance information, and after multiple random combinations, multiple reference virtual lineups can be obtained, so as to use the reference virtual lineups to measure the lineup strength of the updated virtual lineup.
[0152] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0153] The embodiments of this application are implemented in a scenario where the server optimizes the lineup of a strategy game.
[0154] Figure 8 This is a schematic diagram illustrating the process of optimizing the lineup in a strategy game according to an embodiment of this application. See also... Figure 8 The process may include: S301. The server (electronic device) loads the specified lineup (virtual lineup to be optimized).
[0155] The server can read a specified lineup from the lineup document according to the agreed format and obtain all heroes (virtual objects) in the specified lineup.
[0156] S302. The server reads the configuration document (configuration guidance information).
[0157] Read all available hero (candidate virtual object), skill (candidate virtual skill), unit type (candidate team type), and position (candidate layout position) information from the configuration document of the current game version, and generate an initial lineup and a reference lineup (reference virtual lineup) based on this information.
[0158] S303. The server explores lineups to obtain lineups with higher win-loss ratios (lineup strength) (optimizing virtual lineups).
[0159] The server performs multiple rounds of cross-processing, mutation, evaluation, and evolution on the initial lineup to explore whether there are combinations of skills, troop types, and positions with higher odds for a given lineup, thus obtaining an optimized lineup (optimized virtual lineup).
[0160] The following section explains each step of the lineup optimization process.
[0161] Before loading a specified lineup, the server first defines the lineup format. Figure 9This is a schematic diagram of the lineup format of a specified lineup provided in an embodiment of this application. Figure 9 As we can see, the designated lineup 9-1 contains three heroes: the main general (9-11), the deputy generals (9-12 and 9-13), and each hero carries three skills, one troop type, and one position attribute. Taking the main general (9-111) as an example, the hero 9-111, who acts as the main general, carries skills 9-112, 9-113, and 9-114, troop type 9-115, and position 9-116.
[0162] The server can follow Figure 9 The format is as follows: read the specified lineup, and read the three heroes as the main general and deputy general from the specified lineup.
[0163] Figure 10 This is a schematic diagram illustrating the process of outputting an initial lineup and a reference lineup based on a configuration document, as provided in an embodiment of this application. See also... Figure 10 The process includes: S401, The server reads the configuration document.
[0164] S402, The server reads information from the configuration document.
[0165] The server reads all available hero, skill, unit, and positioning information from the current game version's configuration file.
[0166] S403, The server generates the initial lineup.
[0167] The server randomly assigns three heroes from a specified lineup as either the main general or a deputy general, and randomly combines each hero with skills, troop types, and positions read from the configuration document, generating 50 initial lineups (the initial virtual lineups for the first iteration). The server encodes each lineup as an 18-bit gene (encoding sequence), in the form of HSSSEPHSSSEPHSSSEP, where H represents the hero, S represents the skill, E represents the troop type, and P represents the position. Different lineups have different genes.
[0168] S404, Server generates reference lineup.
[0169] The server randomly selects three heroes (multiple reference virtual objects) from the available heroes read from the configuration document and assigns them to the main general and deputy general respectively. It also randomly matches skills, troop types and positions for each hero to generate 1000 reference lineups.
[0170] S405, the server outputs the initial lineup and reference lineup.
[0171] At this point, the server has completed the process of outputting the initial lineup and reference lineup based on the configuration document.
[0172] Figure 11This is a schematic diagram illustrating the lineup exploration process provided in an embodiment of this application. See also... Figure 11 The process includes: S501, The server reads the initial lineup and reference lineup.
[0173] S502: The server performs cross-processing on the genes of the initial lineup and outputs the child genes.
[0174] S503. The server performs mutation processing on the child's genes to obtain mutated genes.
[0175] S504. The server uses the reference lineup to calculate the advantage / disadvantage of the lineup corresponding to the mutated gene (updating the virtual lineup).
[0176] S505, the server evolves the next generation lineup from the lineup corresponding to the mutated gene and the initial lineup.
[0177] S506. The server determines whether the number of iterations (i.e., i) has reached the maximum number of iterations. If yes, then execute S507; otherwise, execute S502.
[0178] S507: The lineup with the highest win rate output by the server is used as the result of strengthening the specified lineup.
[0179] Furthermore, Figure 12 This is a schematic diagram illustrating the process of cross-processing the genes of the initial lineup provided in this application embodiment. See [link / reference]. Figure 12 The process includes: S5021, The server reads the genes of 50 initial lineups.
[0180] S5022. The server randomly selects 2 genes from the 50 initial gene pairs as parent genes (sequence pairs to be mutated).
[0181] S5023. The server generates a random number (cross coefficient). If the random number is less than 0.4 (first threshold), then execute S5024. If the random number is greater than or equal to 0.4, then execute S5025.
[0182] S5024. The server performs multi-point crossover on the parents' genes to obtain the child's genes (derived sequences).
[0183] The server randomly selects 5 non-hero locations from the 18 genes of the parents' genes (target swap locations), swaps the genes at these 5 locations in the service genes, and obtains the child's genes.
[0184] S5025, The server performs grouping and cross-pollination of parental genes to obtain child genes.
[0185] The server randomly selects one hero (target virtual object) from the specified lineup, swaps the hero's skills, unit type, and position (the encoded information corresponding to the lineup configuration) in the parent genes, and obtains the child's genes.
[0186] S5026. The server determines whether the child's genes meet the rule requirements (matching rules). If yes, execute S5027; otherwise, execute S5022.
[0187] S5027, The server outputs the genes of 50 children.
[0188] At this point, the server has completed the process of cross-processing the genes of the initial lineup.
[0189] Figure 13 This is a schematic diagram illustrating the process of gene mutation processing for a child, as provided in an embodiment of this application. The process includes: S5031, The server reads the genes of 50 children.
[0190] S5032. The server generates random numbers (screening coefficients) and selects the genes (to be mutated coding information) that need to be changed using the random numbers.
[0191] For each child's genes (encoded information), the server needs to determine whether it needs to be changed. A random number between 0 and 1 is assigned to each gene. If the random number is less than 0.05 (the second threshold), the gene needs to be changed; otherwise, it does not.
[0192] S5033. The server generates a random number (coefficient of variation) again. If the random number is less than 0.4 (third threshold), then execute S5034; otherwise, execute S5035.
[0193] S5034, The server generates new genes through gene mutation.
[0194] The server will randomly replace the gene that needs to be changed with another gene of the same type in the gene library (first target encoding information). For example, it can replace the hero's skill with another skill, the unit type with another unit type, the position with another position, and so on.
[0195] S5035, The server generates new genes through gene exchange.
[0196] The server will swap the gene that needs to be changed with the same type of gene (second target encoding information) in the lineup. For example, it can swap the skills of the main general and the deputy general, the troop type of the main general and the deputy general, and the position of the main general and the deputy general.
[0197] S5036. The server determines whether the genes of all 50 children have been mutated or exchanged. If so, it executes S5037; otherwise, it returns to S5032.
[0198] In other words, if the server has performed gene mutations or gene exchanges on all 50 children's genes, then the genes of these 50 children will be restored to the newly generated lineup.
[0199] S5037, The server outputs 50 newly generated lineups.
[0200] At this point, the server has completed the process of modifying the child's genes.
[0201] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0202] The following description continues to illustrate the exemplary structure of the virtual lineup optimization device 255 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the virtual lineup optimization device 255 in the memory 250 may include: The information reading module 2551 is used to read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object; The lineup generation module 2552 is used to generate a reference virtual lineup based on the configuration guidance information; The lineup update module 2553 is used to update the lineup configuration of the initial virtual lineup in the i-th iteration to obtain the updated virtual lineup in the i-th iteration; i is a positive integer, the initial virtual lineup in the 1-th iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup, the updated virtual lineup, and the virtual objects of the virtual lineup to be optimized are all the same. The strength determination module 2554 is used to determine the lineup strength of the updated virtual lineup in the i-th iteration based on the reference virtual lineup; The lineup selection module 2555 is used to determine the initial virtual lineup for the (i+1)th iteration from the initial virtual lineup and the updated virtual lineup of the i-th iteration based on the lineup strength; when i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
[0203] In some embodiments of this application, the strength determination module 2554 is further configured to: pit the updated virtual lineup of the i-th iteration against the reference virtual lineup to obtain the confrontation result; use the confrontation result to count the number of wins and draws of the updated virtual lineup of the i-th iteration; and determine the lineup strength of the updated virtual lineup of the i-th iteration by the ratio of the sum of the number of wins and the number of draws to the total number of confrontation results.
[0204] In some embodiments of this application, the lineup filtering module 2555 is further configured to filter out the N virtual lineups with the greatest lineup strength from the initial virtual lineups of the i-th iteration and the updated virtual lineups of the i-th iteration, and use them as the initial virtual lineups of the (i+1)-th iteration; N is a positive integer.
[0205] In some embodiments of this application, the lineup update module 2553 is further configured to encode the initial virtual lineup of the i-th iteration to obtain the encoded sequence of the initial virtual lineup of the i-th iteration; select a pair of sequences to be mutated from the encoded sequence of the initial virtual lineup of the i-th iteration; perform cross-processing on the encoded information of the lineup configuration in the pair of sequences to be mutated to obtain a derived sequence of the pair of sequences to be mutated; perform mutation processing on the encoded information of the lineup configuration in the derived sequence to obtain a mutated sequence corresponding to the derived sequence; and decode the mutated sequence to obtain the updated virtual lineup of the i-th iteration.
[0206] In some embodiments of this application, the lineup update module 2553 is further configured to generate a crossover coefficient for the sequence pair to be mutated; when the crossover coefficient is greater than or equal to a first threshold, a target virtual object is determined for the sequence pair to be mutated, and the encoding information of the lineup configuration of the target virtual object in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated; when the crossover coefficient is less than the first threshold, a target exchange position is determined from the sequence position corresponding to the encoding information of the lineup configuration in the sequence pair to be mutated, and the encoding information of the target exchange position in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated.
[0207] In some embodiments of this application, the lineup update module 2553 is further configured to perform compliance verification on the derived sequence before performing mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the derived sequence after cross-processing the encoding information of the lineup configuration in the sequence pair to be mutated, and obtaining the mutated sequence corresponding to the derived sequence, after performing mutation processing on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence; the verification result indicates whether the derived sequence conforms to the virtual lineup matching rules; when the verification result indicates that the derived sequence conforms to the virtual lineup matching rules, mutation processing is performed on the encoding information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0208] In some embodiments of this application, the lineup update module 2553 is further configured to generate corresponding filtering coefficients for the encoding information of the lineup configuration in the derived sequence, and based on the filtering coefficients and a second threshold, filter out the encoding information to be mutated from the encoding information of the lineup configuration in the derived sequence; mutate the encoding information to be mutated in the derived sequence to obtain the mutated sequence corresponding to the derived sequence.
[0209] In some embodiments of this application, the lineup update module 2553 is further configured to generate a mutation coefficient for the coding information to be mutated; when the mutation coefficient is greater than or equal to a third threshold, a first target coding information is determined from the coding information database for the coding information to be mutated, and the coding information to be mutated in the derived sequence is replaced by the first target coding information to obtain the mutated sequence of the derived sequence; wherein, the type of the first target coding information is the same as the type of the coding information to be mutated; when the mutation coefficient is less than the third threshold, a second target coding information is determined from the derived sequence for the coding information to be mutated, and the second target coding information and the coding information to be mutated are interchanged to obtain the mutated sequence of the derived sequence; the type of the second target coding information is the same as the type of the coding information to be mutated.
[0210] In some embodiments of this application, the lineup update module 2553 is further configured to parse the initial virtual lineup of the i-th iteration to obtain multiple virtual objects and the lineup configuration of each virtual object; wherein the lineup configuration includes at least: virtual skills, team type and layout position; for each virtual object and the lineup configuration of each virtual object, corresponding encoding information is determined; the encoding information of each virtual object and the encoding information of the corresponding lineup configuration are concatenated to obtain a sequence fragment of each virtual object; when the sequence fragments are determined for multiple virtual objects, the encoding sequence of the initial virtual lineup of the i-th iteration is obtained by concatenating the sequence fragments of each of the multiple virtual objects.
[0211] In some embodiments of this application, the lineup generation module 2552 is further configured to read candidate virtual objects, candidate virtual skills, candidate layout positions, and candidate team types from the configuration guidance information; randomly select multiple reference virtual objects from the candidate virtual objects to generate the reference virtual lineup; for each reference virtual object, select matching virtual skills from the candidate virtual skills, select matching layout positions from the candidate layout positions, and select matching team types from the candidate team types; integrate each reference virtual object, as well as the matching virtual skills, the matching layout positions, and the matching team types, to obtain a sub-virtual lineup for each reference virtual object; and integrate the sub-virtual lineups of multiple reference virtual objects into the reference virtual lineup.
[0212] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual lineup optimization method described above in this application.
[0213] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to execute the virtual lineup optimization method provided in this application. For example, ... Figure 3 The virtual lineup optimization method is shown.
[0214] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0215] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0216] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0217] As an example, executable instructions can be deployed to execute on a single computing device (an implementation of an electronic device), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0218] In summary, through the embodiments of this application, the electronic device can utilize the reference virtual lineup generated based on the original configuration guidance information to determine the lineup strength of the updated virtual lineup obtained from each round of lineup configuration updates. Furthermore, it can filter the lineup strength to obtain the optimized virtual lineup corresponding to the virtual lineup to be optimized. This decouples the optimization of the virtual lineup from the online data of the operating object, simplifying the conditions for virtual lineup optimization. In other words, as long as the configuration guidance information is available, virtual lineup optimization can be performed, thus improving the convenience of virtual lineup optimization. In addition, since the optimization of the virtual lineup is decoupled from the online data of the operating object in this embodiment, there is no need to allocate additional storage space and processing time to the data acquisition process (which typically requires a large amount of online data to achieve virtual lineup optimization), saving computational resources during virtual lineup optimization.
[0219] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for optimizing a virtual lineup, characterized in that, The method includes: Read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object, and generate a reference virtual lineup based on the configuration guidance information; The initial virtual lineup of the i-th iteration is encoded to obtain the encoding sequence of the initial virtual lineup of the i-th iteration; from the encoding sequence of the initial virtual lineup of the i-th iteration, the sequence pairs to be mutated are selected; for the sequence pairs to be mutated, cross coefficients are generated by generating random numbers or by randomly selecting values from multiple preset values. When the crossover coefficient is greater than or equal to the first threshold, a virtual object is randomly selected from the virtual objects contained in the two encoded sequences of the sequence pair to be mutated, or the virtual object in the preset position is determined as the target virtual object, and the encoding information of the lineup configuration of the target virtual object in the sequence pair to be mutated is exchanged to obtain the derived sequence of the sequence pair to be mutated. When the crossover coefficient is less than the first threshold, a target swap position is randomly selected from the sequence positions corresponding to the encoding information of the lineup configuration in the sequence pair to be mutated, or a specific position in the sequence position is determined as the target swap position, and the encoding information of the target swap position in the sequence pair to be mutated is swapped to obtain the derived sequence of the sequence pair to be mutated; The encoded information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence; the mutated sequence is decoded to obtain the updated virtual lineup of the i-th iteration; i is a positive integer, the initial virtual lineup of the first iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup of the i-th iteration, the updated virtual lineup of the i-th iteration, and the virtual objects of the virtual lineup to be optimized are all the same; Based on the reference virtual lineup, the lineup strength of the updated virtual lineup in the i-th iteration is determined, and based on the lineup strength, the initial virtual lineup for the (i+1)-th iteration is determined from the initial virtual lineup in the i-th iteration and the updated virtual lineup in the i-th iteration. When i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
2. The method according to claim 1, characterized in that, The process of determining the strength of the updated virtual lineup in the i-th iteration based on the reference virtual lineup includes: The updated virtual lineup in the i-th iteration is pitted against the reference virtual lineup to obtain the outcome of the confrontation. Using the results of the confrontation, the number of wins and draws of the updated virtual lineup in the i-th iteration are statistically obtained; The ratio of the sum of the number of wins and the number of draws to the total number of confrontation results is determined as the lineup strength of the updated virtual lineup in the i-th iteration.
3. The method according to claim 1 or 2, characterized in that, The step of determining the initial virtual lineup for the (i+1)th iteration from the initial virtual lineup for the i-th iteration and the updated virtual lineup for the i-th iteration based on the lineup strength includes: From the initial virtual lineup of the i-th iteration and the updated virtual lineup of the i-th iteration, select the N virtual lineups with the highest lineup strength, and use them as the initial virtual lineups of the (i+1)-th iteration; N is a positive integer.
4. The method according to claim 1, characterized in that, After obtaining the derived sequence of the sequence pair to be mutated, before performing mutation processing on the encoding information of the array configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence, the method further includes: The derived sequence is subjected to compliance verification to obtain a verification result; the verification result indicates whether the derived sequence conforms to the virtual lineup matching rules. The mutation processing of the encoded information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence includes: When the verification result indicates that the derived sequence conforms to the pairing rules of the virtual lineup, the encoding information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence.
5. The method according to claim 1, characterized in that, The mutation processing of the encoded information of the lineup configuration in the derived sequence to obtain the mutated sequence corresponding to the derived sequence includes: For the encoding information of the lineup configuration in the derived sequence, a corresponding screening coefficient is generated, and based on the screening coefficient and the second threshold, the encoding information to be mutated is obtained from the encoding information of the lineup configuration in the derived sequence. The mutated information in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence.
6. The method according to claim 5, characterized in that, The step of mutating the coding information to be mutated in the derived sequence to obtain the mutated sequence corresponding to the derived sequence includes: Generate a coefficient of variation for the encoded information to be mutated; When the coefficient of variation is greater than or equal to the third threshold, a first target coding information is determined from the coding information database for the coding information to be mutated, and the coding information to be mutated in the derived sequence is replaced by the first target coding information to obtain the mutated sequence of the derived sequence; wherein, the type of the first target coding information is the same as the type of the coding information to be mutated; When the coefficient of variation is less than the third threshold, a second target coding information is determined from the derived sequence for the coding information to be mutated, and the second target coding information and the coding information to be mutated are interchanged to obtain the mutated sequence of the derived sequence; the type of the second target coding information and the type of the coding information to be mutated are the same.
7. The method according to claim 1, characterized in that, The encoding of the initial virtual lineup for the i-th iteration, to obtain the encoding sequence of the initial virtual lineup for the i-th iteration, includes: The initial virtual lineup of the i-th iteration is analyzed to obtain multiple virtual objects and the lineup configuration of each virtual object; wherein, the lineup configuration includes at least: virtual skills, team type and layout position; For each virtual object and for each virtual object's lineup configuration, corresponding encoding information is determined. The encoding information of each virtual object and the encoding information of the corresponding lineup configuration are concatenated to obtain a sequence fragment of each virtual object; When the sequence fragments are determined for multiple virtual objects, the sequence fragments of each of the multiple virtual objects are used to concatenate the encoded sequence of the initial virtual lineup for the i-th iteration.
8. The method according to claim 1, characterized in that, The step of generating a reference virtual lineup based on the configuration guidance information includes: Read the candidate virtual objects, candidate virtual skills, candidate layout positions, and candidate team types from the configuration guidance information; From the candidate virtual objects, a plurality of reference virtual objects are randomly selected for generating the reference virtual lineup; For each of the reference virtual objects, a matching virtual skill is selected from the candidate virtual skills, a matching layout position is selected from the candidate layout positions, and a matching team type is selected from the candidate team types; By utilizing each of the reference virtual objects, as well as the matching virtual skills, the matching layout positions, and the matching team types, a sub-virtual lineup for each of the reference virtual objects is obtained. The sub-virtual lineups of the multiple reference virtual objects are integrated into the reference virtual lineup.
9. A virtual lineup optimization device, characterized in that, The device includes: The information reading module is used to read the specified virtual lineup to be optimized, as well as the configuration guidance information for guiding the lineup matching of the operation object; The lineup generation module is used to generate a reference virtual lineup based on the configuration guidance information; The lineup update module is used to encode the initial virtual lineup of the i-th iteration to obtain the encoding sequence of the initial virtual lineup of the i-th iteration; from the encoding sequence of the initial virtual lineup of the i-th iteration, to select a pair of sequences to be mutated; for the pair of sequences to be mutated, to generate a cross coefficient by generating random numbers or by randomly selecting values from multiple preset values; when the cross coefficient is greater than or equal to a first threshold, to randomly select a virtual object from the virtual objects contained in the two encoding sequences of the pair of sequences to be mutated, or to determine the virtual object in a preset position as the target virtual object, and to exchange the lineup configuration encoding information of the target virtual object in the pair of sequences to be mutated to obtain the derived sequence of the pair of sequences to be mutated; when the cross coefficient is less than the first threshold, to generate a cross coefficient. At the first threshold, a target swap position is randomly selected from the sequence positions corresponding to the encoded information of the lineup configuration in the sequence pair to be mutated, or a specific position in the sequence positions is determined as the target swap position, and the encoded information of the target swap position in the sequence pair to be mutated is swapped to obtain a derived sequence of the sequence pair to be mutated; the encoded information of the lineup configuration in the derived sequence is mutated to obtain the mutated sequence corresponding to the derived sequence; the mutated sequence is decoded to obtain the updated virtual lineup of the i-th iteration; i is a positive integer, the initial virtual lineup of the first iteration is obtained by changing the lineup configuration of the virtual lineup to be optimized, and the initial virtual lineup of the i-th iteration, the updated virtual lineup of the i-th iteration, and the virtual objects of the virtual lineup to be optimized are all the same; The strength determination module is used to determine the lineup strength of the updated virtual lineup in the i-th iteration based on the reference virtual lineup; The lineup selection module is used to determine the initial virtual lineup for the (i+1)th iteration from the initial virtual lineup and the updated virtual lineup of the i-th iteration based on the lineup strength; when i reaches the maximum number of iterations, the virtual lineup with the highest lineup strength is selected from the initial virtual lineup and the updated virtual lineup obtained in each iteration, and used as the optimized virtual lineup corresponding to the virtual lineup to be optimized.
10. The apparatus according to claim 9, characterized in that, The strength determination module is also used to put the updated virtual lineup of the i-th iteration against the reference virtual lineup to obtain the confrontation result; Using the results of the confrontation, the number of wins and draws of the updated virtual lineup in the i-th iteration are statistically obtained; The ratio of the sum of the number of wins and the number of draws to the total number of confrontation results is determined as the lineup strength of the updated virtual lineup in the i-th iteration.
11. The apparatus according to claim 9 or 10, characterized in that, The lineup selection module is also used to select the N virtual lineups with the greatest lineup strength from the initial virtual lineups of the i-th iteration and the updated virtual lineups of the i-th iteration, and use them as the initial virtual lineups of the (i+1)-th iteration. N is a positive integer.
12. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the virtual lineup optimization method according to any one of claims 1 to 8.
13. A computer-readable storage medium storing executable instructions, characterized in that, When the executable instructions are executed by the processor, they implement the virtual lineup optimization method according to any one of claims 1 to 8.
14. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the virtual lineup optimization method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Game lineup generation method and device, equipment and storage medium
CN113457152A