Program generation method, device, equipment and storage medium combining evolutionary computing and deep learning
By combining evolutionary computing and deep learning methods, the problem of difficulty in taking into account both accuracy and efficiency in automatic programming tasks is solved, and efficient and accurate symbol program generation is achieved.
Patent Information
- Application Number
- CN202411825217.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The prior art cannot guarantee task accuracy and processing efficiency at the same time in automatic programming tasks. GP algorithms have challenges in high sample complexity and calculation time-consuming, while deep learning methods lack effective means in improving post-inference models and search.
Combining evolutionary computing and deep learning, the initial population is constructed by inputting the input data of the target programming task into a deep learning model and genetic programming algorithm, and cross-section, semantic mutations, and iterative optimizations are performed until the evolutionary termination conditions are met to generate efficient and accurate symbolic programs.
It improves the search efficiency of automatic programming tasks, while ensuring task accuracy, and can efficiently and accurately generate symbol programs corresponding to automatic encoding tasks.
Smart Images

Figure CN119292581B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a program generation method, apparatus, device and storage medium combining evolutionary computing and deep learning. Background Art
[0002] Genetic Programming (GP) is an evolutionary algorithm that simulates natural selection and genetic mechanisms. With its powerful global search capability, GP is good at exploring large and complex search spaces and has shown great potential in solving complex optimization problems such as automatic programming. However, the current GP algorithm still faces some challenges, mainly including high sample complexity and huge computational time caused by searching from scratch, which limits its application in practice.
[0003] In recent years, deep learning technology has also been used to solve automatic programming problems. They pre-trained Transformer models based on large-scale data sets and autoregressively generated function symbols. These models learned a large number of automatic programming data sets during the pre-training phase and showed strong generalization performance on new automatic programming tasks. However, although deep learning methods can quickly generate high-quality solutions in the reasoning of pre-trained models, they lack improvements and searches after the reasoning model, so the fitting accuracy on automatic programming tasks is still difficult to compare with GP. Summary of the invention
[0004] The main purpose of this application is to provide a program generation method, device, equipment and storage medium that combines evolutionary computing and deep learning, aiming to solve the technical problem that the existing technology cannot ensure task accuracy while taking into account task processing efficiency in automatic programming tasks.
[0005] To achieve the above objectives, the present application proposes a program generation method combining evolutionary computing and deep learning, the program generation method combining evolutionary computing and deep learning comprising:
[0006] Inputting target input data corresponding to the target programming task into a target deep learning model and a target genetic programming algorithm respectively, and constructing an initial population according to a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm;
[0007] Crossing over multiple initial individuals in the initial population to obtain a population to be evolved;
[0008] Performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and constructing an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition;
[0009] A target individual is determined according to the fitness value of each iterative individual in the iterative population, and a target symbol program corresponding to the target input data is determined based on the target individual.
[0010] In one embodiment, the step of inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and constructing the initial population according to the first symbolic program of the target deep learning model and the plurality of second symbolic programs generated by the target genetic programming algorithm comprises:
[0011] Inputting target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, to obtain a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm;
[0012] replicating the first symbolic program and generating a subpopulation according to the replicating result;
[0013] An initial population is constructed according to the subpopulation and a plurality of second symbolic programs.
[0014] In one embodiment, before the step of inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and constructing an initial population according to the first symbolic program of the target deep learning model and the plurality of second symbolic programs generated by the target genetic programming algorithm, the step further includes:
[0015] Obtaining a plurality of sample input data, a sample symbol program corresponding to each sample input data, and a sample output data corresponding to each sample input data;
[0016] Input each sample input data and the sample output data corresponding to each sample input data into the encoder of the deep learning model to be trained for feature extraction, and obtain the latent space representation corresponding to each sample input data;
[0017] Generate a training symbol program corresponding to each sample input data according to the decoder of the deep learning model to be trained and the latent space representation corresponding to each sample input data;
[0018] Compare the training symbol program corresponding to each sample input data with the sample symbol program corresponding to each sample input data to obtain a loss function;
[0019] The network parameters of the deep learning model to be trained are updated according to the loss function to obtain a target deep learning model.
[0020] In one embodiment, the step of performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals includes:
[0021] Randomly selecting mutation individuals from multiple individuals in the population to be evolved to obtain individuals to be mutated and mutation nodes under the individuals to be mutated;
[0022] Calculate according to the target output of the individual to be mutated and the program tree structure of the individual to be mutated to obtain the target semantic value of the subtree where the mutation node is located;
[0023] Inputting the target semantic value and the target data point into the target deep learning model to obtain a mutant subtree of the mutant node;
[0024] The individual to be mutated is updated according to the mutated subtree to obtain a target mutated individual.
[0025] In one embodiment, the step of calculating according to the target output of the individual to be mutated and the program tree structure of the individual to be mutated to obtain the target semantic value of the subtree where the mutated node is located includes:
[0026] Determine the ancestor function of the mutation node according to the program tree structure of the individual to be mutated;
[0027] Recursive calculation is performed based on the brother node set of the ancestor function, the ancestor function, the ancestor subtree output of the ancestor function, the depth of the mutation node and the target output of the individual to be mutated to obtain the target semantic value of the subtree where the mutation node is located.
[0028] In one embodiment, the step of performing crossover on a plurality of initial individuals in the initial population to obtain a population to be evolved comprises:
[0029] Individual selection is performed on a plurality of individuals in the initial population according to a target crossover rate to obtain a plurality of initial individuals;
[0030] Pairing multiple initial individuals to obtain multiple crossover individual pairs;
[0031] Perform crossover operation on each crossover individual pair to obtain multiple offspring individuals;
[0032] Construct the population to be evolved based on each offspring individual.
[0033] In one embodiment, the step of constructing an iterative population based on the target variant individual until the iterative population meets the evolution termination condition includes:
[0034] Constructing an iterative population based on the target variant individuals;
[0035] Calculating the fitness value of the iterative individuals in the iterative population;
[0036] When there is an iteration individual in the iteration population whose fitness value is higher than a target threshold, it is determined that the iteration population meets the evolution termination condition.
[0037] In addition, to achieve the above objectives, the present application also proposes a program generation device combining evolutionary computing and deep learning, wherein the program generation device combining evolutionary computing and deep learning comprises:
[0038] A generation module, configured to input target input data corresponding to a target programming task into a target deep learning model and a target genetic programming algorithm, respectively, and construct an initial population according to a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm;
[0039] A crossover module, used for performing crossover on a plurality of initial individuals in the initial population to obtain a population to be evolved;
[0040] A mutation module, used to perform semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model, generate target mutated individuals, and construct an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition;
[0041] The processing module is used to determine a target individual according to the fitness value of each iterative individual in the iterative population, and determine a target symbol program corresponding to the target input data based on the target individual.
[0042] In addition, to achieve the above-mentioned objectives, the present application also proposes a program generation device that combines evolutionary computing and deep learning, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the program generation method that combines evolutionary computing and deep learning as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the program generation method combining evolutionary computing and deep learning as described above are implemented.
[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the program generation method combining evolutionary computing and deep learning as described above.
[0045] The method of the present application includes: inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, constructing an initial population according to the first symbolic program of the target deep learning model and the multiple second symbolic programs generated by the target genetic programming algorithm; performing crossover on the multiple initial individuals in the initial population to obtain a population to be evolved; performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and constructing an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; determining the target individual according to the fitness value of each iterative individual in the iterative population, and determining the target symbolic program corresponding to the target input data based on the target individual. Through the above method, the powerful search capability of evolutionary computing and the generalization capability of large-scale pre-trained neural network models are combined. Under the coding task, the search efficiency is improved while the task accuracy on the automatic programming task is guaranteed, and the symbolic program corresponding to the automatic coding task can be generated efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1 A flowchart diagram of a program generation method combining evolutionary computing and deep learning provided in Example 1 of the present application;
[0049] Figure 2 A flowchart diagram of the second embodiment of the program generation method combining evolutionary computing and deep learning provided in this application;
[0050] Figure 3 A schematic diagram of target semantics calculation of a program generation method combining evolutionary computing and deep learning provided in Example 2 of the present application;
[0051] Figure 4 A schematic diagram of a genetic programming algorithm mutation based on Transformer for a program generation method combining evolutionary computing and deep learning provided in Example 2 of the present application;
[0052] Figure 5 A brief flowchart of a program generation method combining evolutionary computing and deep learning provided in Example 2 of the present application;
[0053] Figure 6 A schematic diagram of the module structure of a program generation device combining evolutionary computing and deep learning according to an embodiment of the present application;
[0054] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the program generation method combining evolutionary computing and deep learning in the embodiment of the present application.
[0055] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0057] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0058] The main solution of the embodiment of the present application is: input the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and construct an initial population according to the first symbolic program of the target deep learning model and the multiple second symbolic programs generated by the target genetic programming algorithm; crossover multiple initial individuals in the initial population to obtain a population to be evolved; semantically mutate the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and construct an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; determine the target individual according to the fitness value of each iterative individual in the iterative population, and determine the target symbolic program corresponding to the target input data based on the target individual.
[0059] Genetic Programming (GP) is an evolutionary algorithm that simulates natural selection and genetic mechanisms. With its powerful global search capability, GP is good at exploring large and complex search spaces and has shown great potential in solving complex optimization problems such as automatic programming. However, the current GP algorithm still faces some challenges, mainly including high sample complexity and huge computational time caused by searching from scratch, which limits its application in practice. Deep learning technology has also been used to solve automatic programming problems in recent years. They pre-trained Transformer models based on large-scale data sets and autoregressively generated function symbols. These models learned a large number of automatic programming data sets in the pre-training stage and showed strong generalization performance on new automatic programming tasks. However, although deep learning methods can quickly generate high-quality solutions in the reasoning of pre-trained models, they lack improvements and searches after the reasoning model, so the fitting accuracy on automatic programming tasks is still difficult to compare with GP.
[0060] This application provides a solution that combines the powerful search capabilities of evolutionary computing with the generalization capabilities of large-scale pre-trained neural network models. In the encoding task, it improves the search efficiency while ensuring the task accuracy in the automatic programming task, and can efficiently and accurately generate symbolic programs corresponding to the automatic encoding task.
[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a program generation device that combines evolutionary computing and deep learning and can achieve the above functions. The following takes the program generation device that combines evolutionary computing and deep learning as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0062] Based on this, the embodiment of the present application provides a program generation method combining evolutionary computing and deep learning, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the program generation method combining evolutionary computing and deep learning in this application.
[0063] In this embodiment, the method includes steps S10 to S40:
[0064] Step S10, input the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and construct an initial population according to the first symbolic program of the target deep learning model and the multiple second symbolic programs generated by the target genetic programming algorithm.
[0065] It should be noted that the target programming task refers to the automatic programming task that needs to generate the corresponding program; the target input data [X, Y] refers to a set of target data points corresponding to the target programming task. The target output y corresponding to the target data point; the target deep learning model refers to the trained Transformer deep network model, and the target deep learning model can generate the corresponding prediction symbolic program based on the input target input data; the target genetic programming algorithm refers to the GP algorithm.
[0066] It can be understood that the target input data is input to the encoder of the target deep learning model, and then the latent vector generated is processed by the decoder of the target deep learning model. The softmax output of the logits output by the decoder provides the probability of each symbol, and then a beam search is performed, which selects the k symbols with the highest probability based on the predicted probability of the decoder at each autoregressive step. By repeating this process autoregressively, a skeleton of potentially better candidate equations is gradually constructed. In this embodiment, the skeleton refers to a formula with blurred constants, for example, In the example, c is a constant placeholder. Subsequently, the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm is used to optimize the constants of these skeletons. At this stage, the invalid equations generated are screened out, and only the formulas with the correct structure are retained. Finally, the target deep learning model outputs the corresponding predicted symbolic program. In this embodiment, the first symbolic program refers to the predicted symbolic program output by the target deep learning model.
[0067] In a specific implementation, the target input data is input into the GP algorithm, and a plurality of different second symbolic programs are randomly formed through the GP algorithm. Through the first symbolic program and the plurality of second symbolic programs, a complete initial population of the GP algorithm can be constructed, and the initial population includes a plurality of individuals, each of which represents a symbolic program.
[0068] In a feasible implementation, step S10 may include steps A11 to A13:
[0069] Step A11, input the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, to obtain a first symbolic program of the target deep learning model and multiple second symbolic programs generated by the target genetic programming algorithm.
[0070] Step A12, copying the first symbol program and generating a sub-population according to the copying result.
[0071] Step A13, constructing an initial population according to the sub-population and a plurality of second symbol programs.
[0072] It should be noted that the first symbolic program output by the target deep learning model will be converted into individuals in the population, and the converted individuals will be copied to form a sub-population. The sub-population is combined with multiple second symbolic programs to obtain a complete initial population for the GP algorithm. The initial population generated in the above manner can start the search at a better starting point while maintaining population diversity and global search capabilities.
[0073] In a feasible implementation manner, before step S10, steps B11 to B15 may be included:
[0074] Step B11, obtaining a plurality of sample input data, a sample symbol program corresponding to each sample input data, and a sample output data corresponding to each sample input data.
[0075] It should be noted that in the pre-training stage of the deep network model, the training set of the automatic programming problem domain and the corresponding optimal program set will be automatically collected to train the deep network model. The goal of solving the automatic programming task is to generate a Input feature information of dimension Mapping to target output The target program expression At this time, it is necessary to obtain multiple sample input data, sample symbol programs corresponding to each sample input data, and sample output data corresponding to each sample input data, and the data set for pre-training model is expressed as: , the dataset contains M programs and corresponding data points. Specifically, each training sample contains a sample input data , Sample symbol program corresponding to sample input data , sample output data corresponding to sample input data .
[0076] Step B12: input each sample input data and the sample output data corresponding to each sample input data into the encoder of the deep learning model to be trained for feature extraction, so as to obtain the latent space representation corresponding to each sample input data.
[0077] It should be noted that the sample input data of each training sample And the sample output data corresponding to the sample input data Construct a sequence of data points [X, Y] corresponding to each training sample, input multiple sequence data points into the encoder of the deep learning model to be trained for feature extraction, and the encoder maps the sequence data points [X, Y] corresponding to each training sample to a latent space representation z, thereby obtaining a latent space representation corresponding to each training sample. In this embodiment, the latent space representation corresponding to each training sample is also the latent space representation corresponding to each sample input data.
[0078] Step B13, generating a training symbol program corresponding to each sample input data according to the decoder of the deep learning model to be trained and the latent space representation corresponding to each sample input data.
[0079] Step B14, comparing the training symbol program corresponding to each sample input data with the sample symbol program corresponding to each sample input data to obtain a loss function.
[0080] It should be noted that the decoder in the deep learning model to be trained generates the first The symbol corresponds to the probability distribution , and generate the symbol sequence by sampling in the form of autoregression , thus obtaining the training symbol program corresponding to each sample input data.
[0081] Step B15, updating the network parameters of the deep learning model to be trained according to the loss function to obtain a target deep learning model.
[0082] It can be understood that the training symbolic program corresponding to each sample input data is compared with the sample symbolic program corresponding to each sample input data in each training sample to obtain a loss function, and the network parameters of the deep learning model to be trained are updated based on the obtained loss function, and the above steps are repeated until the performance of the model reaches the expected level or the loss function converges, thereby obtaining the target deep learning model. In this embodiment, a supervised learning method is used to train the deep learning model to be trained. Taking the cross entropy loss function as an example, the network parameters The update can be expressed as: By pre-training the deep network model, the generalization and versatility of the network can be enhanced while improving the fitting ability.
[0083] Step S20, crossover is performed on a plurality of initial individuals in the initial population to obtain a population to be evolved.
[0084] It should be noted that, multiple individuals are selected from the initial population as initial individuals for crossover, multiple offspring individuals are generated, and they are inserted into the initial population, thereby obtaining the population to be evolved.
[0085] In a feasible implementation, step S20 may include steps C11 to C14:
[0086] Step C11, performing individual selection on a plurality of individuals in the initial population according to a target crossover rate to obtain a plurality of initial individuals.
[0087] Step C12, pairing the multiple initial individuals to obtain multiple crossover individual pairs.
[0088] Step C13, performing a crossover operation on each crossover individual pair to obtain multiple offspring individuals.
[0089] Step C14, constructing a population to be evolved based on each offspring individual.
[0090] It should be noted that the target crossover rate in this embodiment refers to the set crossover rate , select a certain number of individuals from the initial population, usually based on their fitness values. The proportion of selection is determined by the target crossover rate, ×n individuals will be selected for the crossover operation. is a constant between 0 and 1, and n is the size of the initial population. The selected initial individuals are paired in pairs to form a number of crossover individual pairs. A crossover operation is performed between each pair of crossover individuals. The specific method of crossover depends on the crossover strategy used, such as single-point crossover, multi-point crossover, or multi-directional crossover. During the crossover process, part of the structure of the two initial individuals will be exchanged to form new offspring individuals. The newly generated multiple offspring individuals are inserted into the initial population to replace the eliminated individuals, thereby obtaining the population to be evolved.
[0091] Step S30, performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model, generating target mutated individuals, and constructing an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition.
[0092] It should be noted that the individual to be mutated refers to the individual randomly selected for mutation in the population to be evolved. In the mutation of GP, semantic mutation is performed on the individual to be mutated in the population to be evolved according to the target deep learning model. By mapping the genotype space to the semantic space, the local target semantic value of the individual to be mutated is calculated, and the characteristic of the target deep learning model that can quickly generate a better solution is used to directly generate a local symbolic expression that approximates the target semantics, replace the local symbolic expression of the original individual to be mutated, and obtain the target mutated individual, so as to achieve the purpose of rapid local tuning. An iterative population is generated based on the target mutated individual, and the crossover and mutation of individuals in the iterative population are cyclically performed until the iterative population meets the evolution termination condition. In this embodiment, the evolution termination condition includes but is not limited to the iteration reaching the maximum evolution generation, the fitness value of the individual being higher than the set threshold, and any one of other conditions.
[0093] Step S40, determining a target individual according to the fitness value of each iterative individual in the iterative population, and determining a target symbol program corresponding to the target input data based on the target individual.
[0094] It should be noted that when the iterative population meets the evolution termination condition, the fitness values of each iterative individual in the iterative population are sorted, and the iterative individual with the highest fitness value is taken as the target individual. The target individual is the target symbolic program corresponding to the target input data, that is, the target symbolic program corresponding to the target programming task.
[0095] In a feasible implementation, step S40 may include steps D11 to D13:
[0096] Step D11, constructing an iterative population based on the target variant individuals.
[0097] Step D12, calculating the fitness value of the iterative individuals in the iterative population.
[0098] Step D13: When there is an iteration individual in the iteration population whose fitness value is higher than the target threshold, it is determined that the iteration population meets the evolution termination condition.
[0099] It should be noted that the fitness value of each iterative individual in the iterative population is calculated. When there is an iterative individual with a fitness value higher than the target threshold, it is determined that the iterative population meets the evolution termination condition, and the evolution is terminated at this time; if there is no iterative individual with a fitness value higher than the target threshold and the current evolution generation has not reached the maximum evolution generation, then crossover mutation is performed based on the iterative population cycle to generate the iterative population corresponding to the next evolution.
[0100] It is understood that in the evaluation of this embodiment, the widely used root mean square error (RMSE) indicator is used to evaluate the approximation degree of the prediction formula to simulate the true value formula. RMSE measures the error between the predicted value and the actual value, indicating the accuracy of the prediction. The calculation method is as follows: , therefore, negative RMSE values are calculated as fitness estimates.
[0101] The method of this embodiment includes: inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, constructing an initial population according to the first symbolic program of the target deep learning model and the multiple second symbolic programs generated by the target genetic programming algorithm; performing crossover on the multiple initial individuals in the initial population to obtain a population to be evolved; performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and constructing an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; determining the target individual according to the fitness value of each iterative individual in the iterative population, and determining the target symbolic program corresponding to the target input data based on the target individual. Through the above method, the powerful search capability of evolutionary computing and the generalization capability of large-scale pre-trained neural network models are combined. Under the coding task, the search efficiency is improved while the task accuracy on the automatic programming task is guaranteed, and the symbolic program corresponding to the automatic coding task can be efficiently and accurately generated.
[0102] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 In the program generation method combining evolutionary computing and deep learning, in step S30: semantic mutation is performed on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and also includes steps S31 to S34:
[0103] Step S31, randomly selecting mutation individuals from multiple individuals in the population to be evolved, to obtain individuals to be mutated and mutation nodes under the individuals to be mutated.
[0104] It should be noted that based on the set mutation rate Randomly select mutation individuals from multiple individuals in the population to be evolved to obtain the individuals to be mutated and the mutation nodes N under the individuals to be mutated.
[0105] Step S32, performing calculations based on the target output of the individual to be mutated and the program tree structure of the individual to be mutated, to obtain the target semantic value of the subtree where the mutated node is located.
[0106] It should be noted that based on the target output y of the individual to be mutated, for any node existing on the program tree of the individual to be mutated, the target output of the subtree corresponding to the mutation node N can be calculated according to the target output y and the program tree structure of the individual to be mutated. In this embodiment, the target semantic value of the subtree where the variant node is located refers to the target output of the subtree corresponding to the variant node N. .
[0107] In a feasible implementation, step S32 may include steps E11-E12:
[0108] Step E11, determining the ancestor function of the mutation node according to the program tree structure of the individual to be mutated.
[0109] Step E12, recursively calculate according to the brother node set of the ancestor function, the ancestor function, the ancestor subtree output of the ancestor function, the depth of the mutation node and the target output of the individual to be mutated, to obtain the target semantic value of the subtree where the mutation node is located.
[0110] It should be noted that the ancestor function refers to the first Layer Ancestor , for The set of sibling nodes, assuming that the depth of the mutation node is H, can be calculated according to the formula Calculate the target output of each node in the subtree of the program tree of the individual to be mutated. For function From the above, we can see that the target output of the root node is : Through recursive calculation, we can get the node The target output of mutation node N is: For ease of understanding, input data , For example, the target output calculation process of mutation node N is as follows Figure 3 shown.
[0111] Step S33: input the target semantic value and the target data point into the target deep learning model to obtain a mutant subtree of the mutant node.
[0112] Step S34, updating the individual to be mutated according to the mutated subtree to obtain a target mutated individual.
[0113] It should be noted that the target semantic value and target data point Input to the target deep learning model, the target deep learning model will output the new mutation subtree corresponding to the mutation node. In this embodiment, the semantic mutation rate is . Using mutant subtree Replace the subtree with the mutation node N as the root node ,When the output of the mutant subtree is close to the target semantic value, the whole tree can be made close to the correct symbolic tree, realizing the intelligent mutation of the genetic programming algorithm.
[0114] It is understandable that for ease of understanding, Figure 4 Take the example to illustrate, randomly select the third node of the original individual, that is, +, input its corresponding target semantic value and target input data X into the Transformer network, and obtain the corresponding target subtree predicted by the Transformer: , replacing the subtree with + as the root node. Through the semantic variation based on Transformer, the individual directly converges to the target solution of the problem, making good use of the characteristic that the target deep learning model can quickly generate solutions with good quality.
[0115] This embodiment randomly selects mutated individuals from multiple individuals in the population to be evolved to obtain individuals to be mutated and mutated nodes under the individuals to be mutated; calculates according to the target output of the individuals to be mutated and the program tree structure of the individuals to be mutated to obtain the target semantic value of the subtree where the mutated node is located; inputs the target semantic value and the target data point into the target deep learning model to obtain the mutated subtree of the mutated node; updates the individuals to be mutated according to the mutated subtree to obtain the target mutated individuals. In the above manner, the Transformer model is used to predict the target subtree corresponding to the nodes in the GP individuals, so that the whole approaches the correct solution.
[0116] For example, to help understand the implementation process of the program generation method combining evolutionary computing and deep learning obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 5 , Figure 5 A brief flowchart of a program generation method combining evolutionary computation and deep learning is provided. Specifically:
[0117] Existing genetic programming algorithms have two major limitations in the search process: on the one hand, given a problem to be solved, the algorithm usually starts searching from scratch and fails to make full use of historical experience knowledge. On the other hand, the algorithm mainly relies on random crossover and mutation operations to construct solutions during the evolution process, and the search efficiency is not high.
[0118] In order to overcome the above limitations, this embodiment proposes a method that combines evolutionary computing and deep learning. The characteristic that the pre-trained deep network model can quickly generate solutions with good quality is used to assist the population initialization and local tuning operations of the genetic programming algorithm, thereby improving the search efficiency of the algorithm. The method specifically includes a deep network model pre-training stage and a deep network-assisted GP search stage. In the pre-training stage, a general Transformer model (target deep learning model) is trained based on a huge amount of automatic programming data sets. In the deep network-assisted GP search stage, the Transformer model assists the initialization and mutation process of the GP population, thereby improving the search efficiency of the GP. In terms of initialization, the GP population includes individuals transformed from the Transformer prediction results and individuals formed by random initialization, which increases the diversity of the population and also provides a better search starting point for the GP. In terms of GP mutation, according to the function input and the target semantic value, the Transformer model is used to predict the target subtree corresponding to the node in the GP individual, so that the whole approaches the correct solution.
[0119] For ease of understanding, the overall process of this embodiment is described through the following pseudo code:
[0120] Input: Completed pre-trained Transformer model, automatically programmed input data [X, Y], semantic mutation rate , population size n, crossover rate , mutation rate ;
[0121] Output: the optimal solution found;
[0122] / / Initialize the 0th generation population:
[0123] 1: ;
[0124] 2: Randomly generated individuals,
[0125] / / Evaluate;
[0126] 3: Calculate the fitness for each individual in the population,
[0127] do { / / Create the Generation population:
[0128] / / 1. Copy:
[0129] Select the population individuals and insert them into the population middle;
[0130] / / 2.
[0131] cross:
[0132] Select population of individuals, combine them into pairs, and insert their offspring individuals into the population middle;
[0133] / / 3. Mutation:
[0134] Select population In Individual mutations:
[0135] For each individual I to be mutated:
[0136] Copy individual I;
[0137] if random function then ;
[0138] Execute formula Semantic back propagation in
[0139] if then Perform single-point mutation on individuals;
[0140] Else:
[0141] ;
[0142] Replace the subtree with node as the root node with J;
[0143] end if;
[0144] Else;
[0145] Perform single-point mutation on individual I;
[0146] / / Evaluate the population :
[0147] Calculate population The adaptation of each individual in
[0148] ;
[0149] }
[0150] while the evolution termination condition is not met, such as the fitness is not high enough;
[0151] return population The best individual in .
[0152] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the program generation method of the present application that combines evolutionary computing and deep learning. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.
[0153] This application also provides a program generation device that combines evolutionary computing and deep learning, please refer to Figure 6 , the program generation device combining evolutionary computing and deep learning includes:
[0154] The generation module 10 is used to input the target input data into the target deep learning model and the target genetic programming algorithm respectively, and construct an initial population according to the first symbolic program of the target deep learning model and multiple second symbolic programs generated by the target genetic programming algorithm.
[0155] The crossover module 20 is used to crossover a plurality of initial individuals in the initial population to obtain a population to be evolved.
[0156] The mutation module 30 is used to perform semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model, generate target mutated individuals, and construct an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition.
[0157] The processing module 40 is used to determine a target individual according to the fitness value of each iteration individual in the iteration population, and determine a target symbol program corresponding to the target input data based on the target individual.
[0158] Optionally, the generating module 10 is further used for:
[0159] The target input data is respectively input into a target deep learning model and a target genetic programming algorithm to obtain a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm; the first symbolic program is copied and a subpopulation is generated according to the copying result; an initial population is constructed according to the subpopulation and the plurality of second symbolic programs.
[0160] Optionally, the generating module 10 is further used for:
[0161] Acquire multiple sample input data, sample symbol programs corresponding to each sample input data, and sample output data corresponding to each sample input data; input each sample input data and the sample output data corresponding to each sample input data into the encoder of the deep learning model to be trained for feature extraction to obtain the latent space representation corresponding to each sample input data; generate the training symbol program corresponding to each sample input data according to the decoder of the deep learning model to be trained and the latent space representation corresponding to each sample input data; compare the training symbol program corresponding to each sample input data with the sample symbol program corresponding to each sample input data to obtain a loss function; update the network parameters of the deep learning model to be trained according to the loss function to obtain a target deep learning model.
[0162] Optionally, the variation module 30 is further used for:
[0163] Randomly select mutated individuals from multiple individuals in the population to be evolved to obtain individuals to be mutated and mutation nodes under the individuals to be mutated; calculate according to the target output of the individuals to be mutated and the program tree structure of the individuals to be mutated to obtain the target semantic value of the subtree where the mutation node is located; input the target semantic value and the target data point into the target deep learning model to obtain the mutation subtree of the mutation node; update the individuals to be mutated according to the mutation subtree to obtain the target mutation individual.
[0164] Optionally, the variation module 30 is further used for:
[0165] The ancestor function of the mutated node is determined according to the program tree structure of the individual to be mutated; recursive calculation is performed according to the brother node set of the ancestor function, the ancestor function, the ancestor subtree output of the ancestor function, the depth of the mutated node and the target output of the individual to be mutated to obtain the target semantic value of the subtree where the mutated node is located.
[0166] Optionally, the cross module 20 is further used for:
[0167] According to the target crossover rate, multiple individuals in the initial population are selected to obtain multiple initial individuals; the multiple initial individuals are paired to obtain multiple crossover individual pairs; crossover operations are performed on each crossover individual pair to obtain multiple offspring individuals; and a population to be evolved is constructed according to each offspring individual.
[0168] Optionally, the processing module 40 is further configured to:
[0169] An iterative population is constructed based on the target variant individual; the fitness value of the iterative individual in the iterative population is calculated; when there is an iterative individual in the iterative population whose fitness value is higher than a target threshold, it is determined that the iterative population meets the evolution termination condition.
[0170] The program generation device combining evolutionary computing and deep learning provided by the present application adopts the program generation method combining evolutionary computing and deep learning in the above-mentioned embodiment, which can solve the technical problem that the prior art cannot ensure the task accuracy while taking into account the task processing efficiency in automatic programming tasks. Compared with the prior art, the beneficial effects of the program generation device combining evolutionary computing and deep learning provided by the present application are the same as the beneficial effects of the program generation method combining evolutionary computing and deep learning provided by the above-mentioned embodiment, and the other technical features in the program generation device combining evolutionary computing and deep learning are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0171] The present application provides a program generation device that combines evolutionary computing and deep learning, and the program generation device that combines evolutionary computing and deep learning includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the program generation method that combines evolutionary computing and deep learning in the above-mentioned embodiment one.
[0172] Reference below Figure 7 , which shows a schematic diagram of the structure of a program generation device combining evolutionary computing and deep learning suitable for implementing the embodiment of the present application. The program generation device combining evolutionary computing and deep learning in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The program generation device combining evolutionary computing and deep learning shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0173] like Figure 7As shown, the program generation device combining evolutionary computing and deep learning may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in a read-only memory (ROM: Read Only Memory) 1002 or the program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the program generation device combining evolutionary computing and deep learning are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the program generation device combining evolutionary computing and deep learning to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a program generation device combining evolutionary computing and deep learning with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0174] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0175] The program generation device combining evolutionary computing and deep learning provided by the present application adopts the program generation method combining evolutionary computing and deep learning in the above-mentioned embodiment, which can solve the technical problem that the prior art cannot ensure the task accuracy while taking into account the task processing efficiency in automatic programming tasks. Compared with the prior art, the beneficial effects of the program generation device combining evolutionary computing and deep learning provided by the present application are the same as the beneficial effects of the program generation method combining evolutionary computing and deep learning provided by the above-mentioned embodiment, and the other technical features in the program generation device combining evolutionary computing and deep learning are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0176] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0178] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the program generation method combining evolutionary computing and deep learning in the above-mentioned embodiment.
[0179] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0180] The above-mentioned computer-readable storage medium may be included in a program generation device that combines evolutionary computing and deep learning; or it may exist independently without being assembled into a program generation device that combines evolutionary computing and deep learning.
[0181] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a program generation device that combines evolutionary computing and deep learning, the program generation device that combines evolutionary computing and deep learning: inputs the target input data into the target deep learning model and the target genetic programming algorithm respectively, and constructs an initial population according to the first symbolic program of the target deep learning model and the multiple second symbolic programs generated by the target genetic programming algorithm; crosses multiple initial individuals in the initial population to obtain a population to be evolved; performs semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and constructs an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; determines the target individual according to the fitness value of each iterative individual in the iterative population, and determines the target symbolic program corresponding to the target input data based on the target individual.
[0182] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0183] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0184] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0185] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned program generation method combining evolutionary computing and deep learning, and can solve the technical problem that the prior art cannot ensure task accuracy while taking into account task processing efficiency in automatic programming tasks. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the program generation method combining evolutionary computing and deep learning provided by the above-mentioned embodiments, and will not be repeated here.
[0186] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the program generation method combining evolutionary computing and deep learning as described above.
[0187] The computer program product provided by the present application can solve the technical problem that the prior art cannot ensure task accuracy while taking into account task processing efficiency in automatic programming tasks. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the program generation method combining evolutionary computing and deep learning provided by the above-mentioned embodiment, which will not be repeated here.
[0188] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A program generation method combining evolutionary computing and deep learning, characterized in that: The program generation method combining evolutionary computing and deep learning includes: Inputting target input data corresponding to the target programming task into a target deep learning model and a target genetic programming algorithm respectively, and constructing an initial population according to a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm; Crossing over multiple initial individuals in the initial population to obtain a population to be evolved; Performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals, and constructing an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; Determine a target individual according to the fitness value of each iterative individual in the iterative population, and determine a target symbol program corresponding to the target input data based on the target individual; The step of inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and constructing an initial population according to the first symbolic program of the target deep learning model and the plurality of second symbolic programs generated by the target genetic programming algorithm comprises: Inputting target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, to obtain a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm; replicating the first symbolic program and generating a subpopulation according to the replicating result; constructing an initial population based on the subpopulation and a plurality of second symbolic programs; The step of performing semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model to generate target mutated individuals comprises: Randomly selecting mutation individuals from multiple individuals in the population to be evolved to obtain individuals to be mutated and mutation nodes under the individuals to be mutated; Calculate according to the target output of the individual to be mutated and the program tree structure of the individual to be mutated to obtain the target semantic value of the subtree where the mutation node is located; Inputting the target semantic value and the target data point into the target deep learning model to obtain a mutant subtree of the mutant node; The individual to be mutated is updated according to the mutated subtree to obtain a target mutated individual.
2. The method according to claim 1, characterized in that Before the step of inputting the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, and constructing an initial population according to the first symbolic program of the target deep learning model and the plurality of second symbolic programs generated by the target genetic programming algorithm, the step further includes: Obtaining a plurality of sample input data, a sample symbol program corresponding to each sample input data, and a sample output data corresponding to each sample input data; Input each sample input data and the sample output data corresponding to each sample input data into the encoder of the deep learning model to be trained for feature extraction, and obtain the latent space representation corresponding to each sample input data; Generate a training symbol program corresponding to each sample input data according to the decoder of the deep learning model to be trained and the latent space representation corresponding to each sample input data; Compare the training symbol program corresponding to each sample input data with the sample symbol program corresponding to each sample input data to obtain a loss function; The network parameters of the deep learning model to be trained are updated according to the loss function to obtain a target deep learning model.
3. The method according to claim 1, characterized in that The step of calculating according to the target output of the individual to be mutated and the program tree structure of the individual to be mutated to obtain the target semantic value of the subtree where the mutated node is located comprises: Determine the ancestor function of the mutation node according to the program tree structure of the individual to be mutated; Recursive calculation is performed based on the brother node set of the ancestor function, the ancestor function, the ancestor subtree output of the ancestor function, the depth of the mutation node and the target output of the individual to be mutated to obtain the target semantic value of the subtree where the mutation node is located.
4. The method according to any one of claims 1 to 3, characterized in that The step of performing crossover on a plurality of initial individuals in the initial population to obtain a population to be evolved comprises: Individual selection is performed on a plurality of individuals in the initial population according to a target crossover rate to obtain a plurality of initial individuals; Pairing multiple initial individuals to obtain multiple crossover individual pairs; Perform crossover operation on each crossover individual pair to obtain multiple offspring individuals; Construct the population to be evolved based on each offspring individual.
5. The method according to any one of claims 1 to 3, characterized in that The step of constructing an iterative population based on the target variant individual until the iterative population meets the evolution termination condition comprises: Constructing an iterative population based on the target variant individuals; Calculating the fitness value of the iterative individuals in the iterative population; When there is an iteration individual in the iteration population whose fitness value is higher than a target threshold, it is determined that the iteration population meets the evolution termination condition.
6. A program generation device combining evolutionary computing and deep learning, characterized in that: The program generation device combining evolutionary computing and deep learning includes: A generation module, used to input target input data corresponding to the target programming task into a target deep learning model and a target genetic programming algorithm respectively, and construct an initial population according to a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm; A crossover module, used for performing crossover on a plurality of initial individuals in the initial population to obtain a population to be evolved; A mutation module, used to perform semantic mutation on the individuals to be mutated in the population to be evolved according to the target deep learning model, generate target mutated individuals, and construct an iterative population based on the target mutated individuals until the iterative population meets the evolution termination condition; A processing module, used to determine a target individual according to the fitness value of each iteration individual in the iteration population, and determine a target symbol program corresponding to the target input data based on the target individual; The generation module is further used to input the target input data corresponding to the target programming task into the target deep learning model and the target genetic programming algorithm respectively, to obtain a first symbolic program of the target deep learning model and a plurality of second symbolic programs generated by the target genetic programming algorithm; to copy the first symbolic program and generate a subpopulation according to the copy result; and to construct an initial population according to the subpopulation and the plurality of second symbolic programs; The mutation module is also used to randomly select mutation individuals from multiple individuals in the population to be evolved, obtain the individuals to be mutated and the mutation nodes under the individuals to be mutated; calculate according to the target output of the individuals to be mutated and the program tree structure of the individuals to be mutated, and obtain the target semantic value of the subtree where the mutation node is located; input the target semantic value and target data point into the target deep learning model to obtain the mutation subtree of the mutation node; update the individuals to be mutated according to the mutation subtree to obtain the target mutation individual.
7. A program generation device combining evolutionary computing and deep learning, characterized in that: The program generation device that combines evolutionary computing and deep learning includes: a memory, a processor, and a program generation program that combines evolutionary computing and deep learning stored in the memory and can be run on the processor, and the program generation program that combines evolutionary computing and deep learning is configured to implement the program generation method that combines evolutionary computing and deep learning as described in any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores a program generation program that combines evolutionary computing and deep learning. When the program generation program that combines evolutionary computing and deep learning is executed by a processor, it implements the program generation method that combines evolutionary computing and deep learning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Program generation device, program generation method, and program
CN106462401A
Short-range branch flight scheduling method integrating deep reinforcement learning and genetic algorithm
CN114462664A