CN112418384A - Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants - Google Patents

Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants Download PDF

Info

Publication number
CN112418384A
CN112418384A CN202011422669.1A CN202011422669A CN112418384A CN 112418384 A CN112418384 A CN 112418384A CN 202011422669 A CN202011422669 A CN 202011422669A CN 112418384 A CN112418384 A CN 112418384A
Authority
CN
China
Prior art keywords
population
evolution
parties
competitive
populations
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011422669.1A
Other languages
Chinese (zh)
Inventor
王琨
姚鹏
张馨
郭梦畅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ocean University of China
Original Assignee
Ocean University of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ocean University of China filed Critical Ocean University of China
Priority to CN202011422669.1A priority Critical patent/CN112418384A/en
Publication of CN112418384A publication Critical patent/CN112418384A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Abstract

The invention relates to a competitive coevolution algorithm for solving asymmetric tasks based on a balance mechanism variant, belonging to the technical field of coevolution. The invention comprises the following steps: firstly, initializing two synergistic parties with asymmetric tasks, namely a host population and a parasite population according to respective coding modes; calculating the proper value of the two cooperative parties in a competitive mode; evaluating the strength of the forces of the two parties according to the fitness value and calculating the reproduction rate; and determining the evolution content by applying a competitive coevolution algorithm based on a balance mechanism variant, namely adding a threshold value and a strong population degradation strategy on the basis of the balance mechanism, and performing evolution on various populations according to respective evolution algorithms according to requirements. Aiming at the situation that tasks in competitive cooperation are not symmetrical, a disadvantaged population protection strategy and a strong population degradation strategy for setting a threshold are added on the basis of a balance mechanism, and the problems of separation and the like caused by the asymmetrical tasks in the competitive cooperation evolution can be effectively solved through verification of a counting problem and a sequencing network problem.

Description

Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants
Technical Field
The invention relates to a competitive coevolution algorithm for solving asymmetric tasks based on a balance mechanism variant, belonging to the technical field of coevolution.
Background
Co-evolution refers to the adaptive co-evolution of two or more interacting species developing during evolution, in which individual populations evolve simultaneously during the learning process, the fitness of the individuals in each population depending on their interaction with the individuals in the other population. According to the difference of the interaction relationship among the populations, the co-evolution can be divided into competitive co-evolution and cooperative co-evolution: the various groups in competitive coevolution are in competitive relationship, and the various groups in cooperative coevolution are in cooperative relationship. In competitive co-evolution, two populations have opposing interests, the success of one population depending on the failure of the other; in collaborative co-evolution, individuals in various populations collectively succeed or fail as a whole.
Competitive co-evolution has been successfully applied in many fields such as function optimization problems, image recognition systems, real-time strategic games, multi-layered perceptrons, etc. In the competitive co-evolution process, the key to ensure the continuous evolution of the two populations in the competitive relationship lies in maintaining the military competition between the two populations, which requires that the two populations are in a state of relatively balanced forces and can generate correct guidance for the evolution direction of the other population. The reasons that may cause the military preparedness competition to be unable to maintain include over specialization, red queen dynamics, gradient loss and the like: the over-specialization means that when two competing groups learn to easily defeat each other, the two competing groups cannot be popularized to a new environment; queen dynamics refers to the stagnation caused by the oscillation of two populations between a set of states; gradient loss means that evolution cannot proceed when all members of the population lose or win the members of the adversary population equally.
Detachment is one type of gradient loss. The separation occurs when the coevolution system is decoupled, namely the relative fitness value of individuals in each population cannot be correctly evaluated, and each population cannot guide the evolution direction of the opponent population, so that the maintenance of the interspecific military competition is seriously influenced. The task of the competitive coevolution algorithm is to co-evolve the populations of both parties, but in general, the various populations are asymmetric, we call the two populations asymmetric as host-parasite populations, which may differ greatly in gene (coding) or behavior (targeting strategy), which asymmetry may lead to an intrinsic advantage of one population, which is the population that enjoys the advantage, thus raising the problem of detachment.
Considering that two parties of the evolution of the competitive coevolution algorithm are mostly different populations, asymmetric tasks occur in many applications, such as minimum sequencing networks, automatic repair of program errors, genetic programming, and the like. In the evolution process, the asymmetric task conditions of the two cooperative parties are easy to cause separation, so that the military competition cannot be maintained, various groups cannot guide the direction of the evolution of the opponent group, and the evolution fails. Therefore, aiming at the situation that tasks in the competitive cooperation are asymmetric, the existing competitive coevolution algorithm is improved, and a balance method variant for setting a threshold value to protect a disadvantaged population and adding a population degradation strategy to keep balance is provided on the basis of a balance method so as to solve the problem of separation caused by the asymmetric tasks in the coevolution.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a competitive coevolution algorithm for solving asymmetric tasks based on a balance mechanism variant, and the problem of separation caused by asymmetric tasks is solved by adding a protection disadvantage population with a set threshold value and adding a population degradation strategy to keep balance on the basis of a balance method.
The competitive coevolution algorithm for solving the asymmetric task based on the balance mechanism variant comprises the following steps:
s1: initializing both parties of the co-evolution: generating a certain number of individuals for the hosts and the parasites which are cooperated in a competitive mode according to respective coding modes, and initializing host populations and parasite populations;
s2: calculating the appropriate value of both sides of the cooperation: according to the competition rule, defining the suitable value of the individuals in the two populations as the number of the opponents in the defeat opponent population;
s3: calculating the reproduction rate of both parties: evaluating the potential strength of the populations of the two parties according to the calculated fitness condition of the populations of the two parties to obtain the potential strength of each population, wherein a balance mechanism specifies that only one population is evolved in each generation in the evolution process aiming at the problems that the tasks of the two parties are asymmetric, the evolution speed is inconsistent and interspecies separation is possible, the probability that each population is selectively evolved, namely the reproduction rate, is determined by the population potential strength and is inversely proportional to the population potential strength, and the higher the population potential strength is, the lower the reproduction rate is;
s4: competitive synergy based on equilibrium mechanism variants: in order to keep the two parties in competitive cooperation balanced, avoid the situation that evolution falls into stagnation and separation occurs between populations, a competitive coevolution algorithm based on variants of a balance mechanism is applied, namely a competitive coevolution algorithm for protecting a set threshold value strategy and a strong population degradation strategy of a disadvantaged population is added into the balance mechanism, the evolution content to be carried out by the current generation is obtained according to the situation of the strength of the potential and the reproduction rate of the two parties in the current generation according to the algorithm requirement, and the population is selected according to the content requirement for evolution.
Preferably, in the step S2, the fitness value is determined by using the way that all individuals participate in competition, and all individuals in the host population are selected to compete with all individuals in the parasite population, and when one party wins the other party, the fitness value of the winning party is added by 1, and the fitness value of the losing party is not changed, that is, the fitness value of the individuals in the two populations is defined as the number of opponents in the population of the defeating opponent.
Preferably, in S3, the evaluation method for the strength of the force of the two populations includes two ways, namely, calculating by the race and calculating by the mean value of fitness: the competition calculation method comprises the steps of selecting an individual from competition parties, comparing the appropriate values of the individual and the individual with the large appropriate value, winning, and carrying out a certain number of competitions to obtain the ratio of the winning times of the competition parties to the total number of competitions, namely the strength of each momentum; the mode of calculating the mean value of the fitness values of the two groups of the competition parties is respectively calculated, and the strength of each group potential is the proportion of the mean value to the sum of the mean values; the reproduction rate of each population is inversely proportional to the population strength, namely, if the host population strength is Str and the parasite population strength is 1-Str, the situation population reproduction rate is 1-Str and the parameter population reproduction rate is Str.
Preferably, in S4, for a small probability event that the dominant population with a fast evolution speed is continuously evolved under a strong strength of the dominant population and a disengagement condition that the strength of the dominant population is far beyond that of the dominant population, which may still occur in a balancing mechanism, a policy of setting a threshold and degrading the dominant population is added in the balancing mechanism, so as to achieve the purposes of keeping a military competition of two competing parties when the evolution speeds of the two competing parties are different, the strength difference between the two competing parties is too large, and the two competing parties are disengaged, maintaining the two competing parties in a relatively balanced state, and avoiding the evolution from being stuck, specifically including the following steps:
s41: according to a strategy for setting a threshold value set by an algorithm and aiming at protecting a disadvantage population (namely a population with a slow evolution speed in the evolution process), judging whether the reproduction rate of the disadvantage population reaches the threshold value or not, and if not, directly judging to select the disadvantage population for evolution;
s42: the method comprises the following steps of (1) setting a degeneration strong population strategy according to an algorithm for solving the problems that the difference between a strong population and a weak population is too large, the populations are separated, and various populations cannot guide the evolution direction of an opponent population: judging whether the potential force difference between the two populations is overlarge, and when the potential force difference between the two populations is overlarge, carrying out degeneration operation on the strong party, namely changing the fitness condition of the individuals, so that the individuals with backward ranking in the populations are selected to be evolved in the subsequent evolution selection process, thereby achieving the purpose of reducing the strength of the strong populations;
s43: and (4) performing evolution content: and obtaining the evolution content to be carried out in the current generation according to the algorithm requirement, and selecting a population according to the content requirement to carry out evolution according to the requirement.
Preferably, in S42, the degenerate dominant population strategy recalculates the fitness value of the individual in the dominant population, so that the low fitness value individual that is originally behind the ranking in the population obtains a higher fitness value, and the higher fitness value individual with the lower fitness value has a higher probability of being selected to participate in generating offspring, thereby reducing the overall strength of the dominant population, balancing the two populations, keeping the competition of the two competing parties, and avoiding the stagnation of evolution;
the formula for the fitness recalculation is shown as follows:
f′=2ω2x-ωx2
wherein f' is the recalculated individual fitness value, x is the score value of each individual in the interval of [0,1] obtained by normalizing the fitness values f of all the individuals of the dominant population, and omega is the degradation coefficient in the interval (0, 0.5) and represents the degradation degree of the population, and is determined by the difference between the populations, and the larger the difference is, the smaller the degradation coefficient is, the higher the degradation degree is.
Preferably, in S43, according to the requirement of the algorithm evolution content, the population to be evolved is evolved according to the evolution algorithm defined by the population, and the dominant population to be degenerated changes the fitness value only in the selection process, without affecting the operation processes of other genetic operators.
Preferably, in S4, the current evolutionary content is determined according to the algorithm requirement and the current competitive situation: determining a population to be evolved according to the population reproduction rate obtained by calculation and a weak population protection strategy for setting a threshold; according to the strategy of the degeneration compelling population, when the inter-species difference is too large, the current generation does not carry out normal evolution, but recalculates the proper value of the individual in the population for the compelling population, carries out the evolution operation towards the degeneration direction, and carries out the evolution on the selected population according to the determined evolution content of the current generation.
The invention has the beneficial effects that: (1) aiming at the situation of asymmetric tasks in competitive coevolution, a balance mechanism is applied, the strength of the potential force of both cooperative parties is evaluated in each generation, the evolution situation is adjusted in real time, the population with high evolution speed is evolved less, the population with low evolution speed is evolved more, and the balance of both cooperative parties is maintained; (2) a threshold setting strategy aiming at protecting the inferior population is added into a balance mechanism, so that the possibility that the superior population with high evolution speed is continuously evolved under the condition of high strength of force is avoided; (3) a strong population degeneration strategy is added in a balance mechanism, the level of offspring individuals of the strong population is reduced by recalculating the fitness value of the individuals in the strong population, the strong population potential is reduced, and the situation that the strength difference of the potential among the populations is large and the populations are separated in the evolution process is solved by degenerating the strong population.
Drawings
FIG. 1 is a schematic of the architecture of the present invention;
FIG. 2 is a flow chart of a co-evolution method of the present invention;
FIG. 3 is a schematic diagram of population reproduction rate calculations of the present invention;
FIG. 4 is a schematic diagram illustrating population reproduction rate calculation in the threshold setting strategy of the present invention;
FIGS. 5(a) -5 (b) are graphs of the counting problem results, evolution results, of the present invention;
FIG. 6 is a schematic diagram of a sequencing network of the present invention;
fig. 7(a) -7 (b) are graphs of the results of the ranking network problem, the evolution result, of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1 to fig. 7(b), the competitive coevolution algorithm based on equilibrium mechanism variants for asymmetric tasks according to the present invention includes the following steps:
s1: initializing both parties of the co-evolution: generating a certain number of individuals for two parties (hosts and parasites) with competitive synergy according to respective coding modes, and initializing host populations and parasite populations;
s2: calculating the appropriate value of both sides of the cooperation: according to the competition rule, the fitness value of the individuals in the two populations is defined as the number of the opponents in the defeat opponent population;
s3: calculating the reproduction rate of both parties: evaluating the potential strength of the populations of the two parties according to the calculated fitness condition of the populations of the two parties to obtain the potential strength of each population, wherein a balance mechanism specifies that only one population is evolved in each generation in the evolution process aiming at the problems that the tasks of the two parties are asymmetric, the evolution speed is inconsistent and interspecies separation is possible, the probability that each population is selectively evolved, namely the reproduction rate, is determined by the population potential strength and is inversely proportional to the population potential strength, and the higher the population potential strength is, the lower the reproduction rate is;
s4: competitive synergy based on equilibrium mechanism variants: in order to keep the two parties in competitive cooperation balanced, avoid the situation that evolution falls into stagnation and separation occurs between populations, a competitive coevolution algorithm based on variants of a balance mechanism is applied, namely a competitive coevolution algorithm for protecting a set threshold value strategy and a strong population degradation strategy of a disadvantaged population is added into the balance mechanism, the evolution content to be carried out by the current generation is obtained according to the situation of the strength of the potential and the reproduction rate of the two parties in the current generation according to the algorithm requirement, and the population is selected according to the content requirement for evolution.
In the step S2, all individuals in the host population are selected to compete with all individuals in the parasite population by using a manner that all individuals participate in the competition, and when one party wins the other party, the fitness of the winning party is increased by 1 and the fitness of the losing party is not changed, that is, the fitness of the individuals in the two populations is defined as the number of opponents in the defeating opponent population.
In S3, the population potential evaluation method includes two ways, namely, calculating by competition and calculating by fitness mean: the competition calculation method comprises the steps of selecting an individual from competition parties, comparing the appropriate values of the individual and the individual with the large appropriate value, winning, and carrying out a certain number of competitions to obtain the ratio of the winning times of the competition parties to the total number of competitions, namely the strength of each momentum; the mode of calculating the mean value of the fitness values of the two groups of the competition parties is respectively calculated, and the strength of each group potential force is the proportion of the mean value to the sum of the mean values. The reproduction rate of each population is inversely proportional to the population strength, i.e., assuming that the host population strength of the potential is Str and the parasite population strength of the potential is 1-Str, the host population reproduction rate is 1-Str and the parasite population reproduction rate is Str.
In S4, aiming at a small probability event that an dominant population with a fast evolution speed continuously evolves under a strong strength of the dominant population and a disengagement condition caused by the dominant population having a strength far exceeding that of the dominant population, which may still occur in a balanced mechanism, a strategy of setting a threshold and degrading the dominant population is added in the balanced mechanism, so as to achieve the purposes of keeping the military competition of two competing parties under the conditions that the evolution speeds of the two competing parties are different, the difference of the strengths of the two competing parties is too large, and the two competing parties disengage, maintaining the two competing parties in a relatively balanced state, and avoiding the evolution from being stuck, and specifically includes the following steps:
s41: according to a strategy for setting a threshold value set by an algorithm and aiming at protecting a disadvantage population (namely a population with a slow evolution speed in the evolution process), judging whether the reproduction rate of the disadvantage population reaches the threshold value or not, and if not, directly judging to select the disadvantage population for evolution;
s42: the strategy of the degeneration strong population (namely the population in the state of over strong force and completely defeating the adversary) is set according to the algorithm and aims to solve the problems that the difference between the strong population and the weak population is too large, the populations are separated from each other, and various populations cannot guide the evolution direction of the adversary population in the evolution process: judging whether the potential force difference between the two populations is overlarge, and when the potential force difference between the two populations is overlarge, carrying out degeneration operation on the strong party, namely changing the fitness condition of the individuals, so that the individuals with backward ranking in the populations are selected to be evolved in the subsequent evolution selection process, thereby achieving the purpose of reducing the strength of the strong populations;
s43: and (4) performing evolution content: and obtaining the evolution content to be carried out in the current generation according to the algorithm requirement, and selecting a population according to the content requirement to carry out evolution according to the requirement.
In the S42, the degradation dominant population strategy is used for recalculating the fitness value of the individual in the dominant population, so that the originally low fitness value individual behind the ranking in the population obtains a higher fitness value, and the individual with the low fitness value and the higher fitness value individual has a higher probability of being selected to participate in generation of filial generations, thereby reducing the overall strength of the dominant population, balancing the potentials of the two populations, keeping competition between the two competing parties, and avoiding the phenomenon that evolution is stagnated. The formula for the fitness recalculation is shown as follows:
f′=2ω2x-ωx2
wherein f' is the recalculated individual fitness value, x is the score value of each individual in the interval of [0,1] obtained by normalizing the fitness values f of all the individuals of the dominant population, and omega is the degradation coefficient in the interval (0, 0.5) and represents the degradation degree of the population, and is determined by the difference between the populations, and the larger the difference is, the smaller the degradation coefficient is, the higher the degradation degree is.
In the step S43, according to the requirement of the algorithm evolution content, the population to be evolved is evolved according to the evolution algorithm defined by the population, and the dominant population to be degenerated changes the fitness value only in the selection process, without affecting the operation processes of other genetic operators.
In the step S4, the contents of the current evolution are determined according to the algorithm requirement and the current situation of the competitive forces: determining a population to be evolved according to the population reproduction rate obtained by calculation and a weak population protection strategy for setting a threshold; according to the strategy of the degeneration compelling population, when the inter-species difference is too large, the current generation does not carry out normal evolution, but recalculates the appropriate value of the individual in the population for the compelling population, and carries out the evolution operation towards the degeneration direction. And (4) evolving the selected population according to the requirements according to the determined current evolutionary content.
The principle of the invention is as follows: aiming at the common situations of inconsistent encoding modes, evolution targets and evolution modes of two cooperative parties and asymmetric tasks in competitive cooperative evolution, defining that only one population is evolved in each generation, keeping the two parties in a balanced state of potential force by adjusting evolution generations of the two parties, evaluating population potential strength of the two cooperative parties in each generation and calculating the reproduction rate, setting a threshold value aiming at the potential strength of a inferior population for protecting the inferior population with low evolution speed, and allowing the superior population to evolve when the potential strength of the inferior population is greater than the threshold value; when the strength difference between the strong population and the weak population is large and separation tendency exists or separation condition occurs, the strategy of degrading the strong population is adopted to maintain the balance of the forces of the two parties, keep competition of the two parties and avoid the phenomenon that evolution is stagnated.
The invention applies a balance mechanism aiming at the situation of asymmetric tasks in competitive coevolution, evaluates the strength of the potential force of both cooperative parties in each generation, adjusts the evolution situation in real time, ensures that the population with high evolution speed is less evolved and the population with low evolution speed is more evolved, and maintains the balance of both cooperative parties; according to the invention, a threshold setting strategy aiming at protecting the inferior population is added into a balance mechanism, so that the possibility that the superior population with high evolution speed is still continuously evolved under the condition of higher strength of the force is avoided; the invention adds a strong population degeneration strategy in a balance mechanism, reduces the level of offspring individuals of the strong population by recalculating the fitness value of the individuals in the strong population, reduces the strong population potential, and degenerates the strong population to solve the problems of large strength difference of the potential between the populations and population separation which may occur in the evolution process.
Example 2:
the present invention will be described in further detail with reference to the following examples, which are provided for illustration of the counting problem.
The counting problem is the problem of counting the number of characters "1" in a binary string, to which an evolutionary algorithm is applied with the aim of obtaining a string with as many characters "1" as possible. The population defined to evolve contains 25 character strings of individuals, each individual contains 100 bit binary characters, and the evolution process only carries out selection and variation. The counting problem is a typical artificially set asymmetry problem, which is introduced by defining different abrupt biases, and largely approaches the actual asymmetry situation in the behavioral manner: defining the probability of 1 for each binary bit variation of an individual in a host population in the evolution process as 0.5, and the probability of 1 for each binary bit variation of an individual in a parasite population as 0.9, wherein the host population is a disadvantaged population, the parasite population is a dominant population, and the parasite population has a faster evolution speed than the host population.
As shown in fig. 1, the architecture diagram of the embodiment of the present invention specifically includes the following steps:
s1: initializing both parties (100) of the synergy, i.e. initializing each bit of the binary string to the character "0" for all individuals in the host population (101) and the parasite population (102);
s2: calculating the fitness values of the two cooperative parties (103), comparing the individuals in the host population with the number of characters '1' in all the individuals in the parasite population, respectively, adding 1 to the fitness value of the one with a larger number, and keeping the fitness value of the one with a smaller number unchanged, namely calculating the number of the defeat opponents as the fitness value of the individuals (104);
s3: calculating the reproduction rates of both cooperative parties (105), firstly, evaluating the potential strength of the two populations according to the calculated fitness conditions of both cooperative parties (106), and then calculating the reproduction rate of the populations according to the two population potential strength (107);
in a specific embodiment: the potential strength evaluates the potential strength of the two populations in a mode of proper value mean value calculation, the mean values of the proper values of the two populations in competition are calculated respectively, and the various population potential strengths are the proportion of the respective mean values in the sum of the mean values. The population reproduction rate is inversely proportional to the population strength, i.e. assuming that the host population has a strength of SHThe strength of the force of the parasite population is SPIn which S isP=1-SHThen the reproduction rate of the host population is SPReproduction rate of parasite population SH
S4: carrying out co-evolution on the populations of the two parties by using a competitive co-evolution algorithm based on equilibrium mechanism variants (108), and selecting the population to be evolved at the present generation (109) according to the calculated reproduction rates of the two parties; then judging whether the reproduction rate of the inferior population reaches a threshold value, if not, directly selecting the inferior population for evolution (110); then, calculating a difference value of the reproduction rates between the two populations, and when the difference value exceeds a certain range, namely the difference value of the forces between the two populations is too large, the population with stronger force intensity needs to be degenerated (111); after the content to be evolved in the current generation is obtained, the evolution is executed according to the requirement (112);
in a specific embodiment: the degeneration compelling population strategy enables the individuals with low fitness values behind ranking in the population to obtain higher fitness values by recalculating fitness values of the individuals in the compelling population, and enables the individuals with low fitness values to be selected to participate in generation of filial generations with higher probability than the individuals with high fitness values, so that the overall strength of the compelling population is reduced, the two populations are balanced in strength, competition between two parties can be kept, and the phenomenon that evolution is stagnated is avoided. The formula for the fitness recalculation is shown as follows:
f′=2ω2x-ωx2
wherein f' is the recalculated individual fitness value, x is the score value of each individual in the interval of [0,1] obtained by normalizing the fitness values f of all the individuals of the dominant population, and omega is the degradation coefficient in the interval (0, 0.5) and represents the degradation degree of the population, and is determined by the difference between the populations, and the larger the difference is, the smaller the degradation coefficient is, the higher the degradation degree is.
S5: the steps S2, S3, S4 are looped until the termination condition is reached.
Fig. 2 shows a flow chart of a competitive coevolution algorithm based on balanced mechanism variants for asymmetric tasks. Initializing a host population (200) and a parasite population (201), calculating a fitness value of individuals in the two populations (202), evaluating the strength of the potential of each population according to the fitness value of the two populations and calculating the population reproduction rate (203), comparing whether the strength of the potential of the inferior population reaches a threshold value, if not, directly selecting the inferior population to evolve, otherwise, selecting an evolved population according to the reproduction rate (204), if the selected host population to evolve, judging whether the strength of the potential of the parasite population is too large (205), if the strength of the potential of the parasite population is far higher than that of the host population, degenerating the parasite population (206), otherwise, normally evolving the host population (207); when the parasite population is selected for evolution, judging whether the difference between the momentum strength of the host population and the momentum strength of the parasite population is too large (208), if the momentum strength of the host population is far beyond the parasite population, degenerating the host population (209), otherwise, normally evolving the parasite population (210), repeating the evolution process until a termination condition is reached (211), and continuously optimizing two parties of competition by using a competition mechanism of competitive co-evolution and a self-feedback mechanism implied by evolution calculation.
Fig. 3 shows a schematic diagram of calculating the population reproduction rate of the present invention, in which the population reproduction rate is inversely proportional to the population strength, and fig. 3(1) (2) shows a schematic diagram of calculating the population reproduction rate when the population strength is evaluated in a manner of applying a competition (300) and in a manner of calculating an appropriate value mean value (301), respectively.
Fig. 4 shows a schematic diagram of calculating the population reproduction rate in the threshold setting strategy of the present invention, when the intensity of the inferior population potential is smaller than the threshold, the inferior population reproduction rate is 1, and the inferior population is directly selected for evolution, and fig. 4(1), (2) respectively show a schematic diagram of calculating the population reproduction rate in the threshold setting strategy corresponding to the inferior population (400) and the superior population (401).
5(a) -5 (b) show the result of counting game of the present invention, FIG. 5(a) is the evolution result obtained by applying the standard competitive co-evolution algorithm to the counting problem, and the fitness of each generation of the host population (500) and the parasite population (501) during the evolution process is shown by box diagram, respectively, it can be found that as the evolution progresses, the fitness of the parasite population tends to 25, the fitness of the host population tends to 0, and the two populations break away from each other; FIG. 5(b) is the evolution result obtained when the competitive coevolution algorithm based on equilibrium mechanism variants of the present invention is applied to the counting problem, and shows the fitness of the host population (502) and the parasite population (503) in each generation during the evolution process, respectively, and it can be found that the fitness of the parasite population and the host population tends to balance as the evolution progresses, and the two populations do not deviate.
Example 3:
the present invention will be described in further detail below with reference to specific embodiments, taking the ranking network problem as an example.
The sorting network is a fixed sequence for comparing real number pairs, and inputs an unordered real number array into the sorting network, so that the sorting function of the unordered real number array can be realized, and the sorting network has evolved to obtain stronger sorting capability and accurately sort more unordered arrays. When a competitive coevolution algorithm is applied to the sorting network problem, one party of the two parties is a sorting network, the other party is a disordered array to be sorted, and a seven-input sorting network is taken as an example, namely when the length of the disordered array input into the sorting network is seven, the evolution difficulty of the sorting network is higher than that of a disordered array, the evolution speed is slower, the sorting network population is defined as a host population, the disordered array population is defined as a parasite population, the host population formed by the sorting network is a disadvantage population, and the parasite population formed by the disordered array is an advantage population.
As shown in fig. 1, the architecture diagram of the embodiment of the present invention specifically includes the following steps:
s1: initializing both parties (100) in synergy, i.e. for all individuals in the host population (101) and the parasite population (102);
in a specific embodiment: the sequencing networks in the host population use integer codes, and 12 sequencing networks are randomly selected from 21 real number pair comparison modes with the numbers of 1 to 21; the disordered array in the parasite population is encoded with integers consisting of random permutations of integers 1 to 7.
S2: calculating fitness values of the two cooperative parties (103), regarding each sorting network in the host population, taking all disordered arrays in the parasite population as input, adding one to the fitness values of the individuals of the sorting network when the sorting network can successfully sort the input disordered arrays, or adding one to the fitness values of the individuals of the disordered arrays, namely defining the fitness values of the sorting networks in the host population as the number of the disordered arrays which are successfully sorted, and defining the fitness values of the disordered arrays in the parasite population as the number of the sorting networks which are not successfully sorted (104);
s3: calculating the reproduction rates of both cooperative parties (105), firstly, evaluating the potential strength of the two populations according to the calculated fitness conditions of both cooperative parties (106), and then calculating the reproduction rate of the populations according to the two population potential strength (107);
in a specific embodiment: the momentum strength is calculated by the competition in a way that one individual is randomly selected from two competition parties respectively, the appropriate value of the two individuals is compared, the individual with the large appropriate value wins, the competition of a certain number of times is carried out, and the ratio of the number of wins of the two competition parties in the total number of the competition is obtained, namely the respective momentum strength. The population reproduction rate is inversely proportional to the population strength, i.e. assuming that the host population has a strength of SHThe strength of the force of the parasite population is SPIn which S isP=1-SHThen the reproduction rate of the host population is SPReproduction rate of parasite population SH
S4: carrying out co-evolution on the populations of the two parties by using a competitive co-evolution algorithm based on equilibrium mechanism variants (108), and selecting the population to be evolved at the present generation (109) according to the calculated reproduction rates of the two parties; then judging whether the reproduction rate of the inferior population reaches a threshold value, if not, directly selecting the inferior population for evolution (110); then, calculating a difference value of the reproduction rates between the two populations, and when the difference value exceeds a certain range, namely the difference value of the forces between the two populations is too large, the population with stronger force intensity needs to be degenerated (111); after the content to be evolved in the current generation is obtained, the evolution is executed according to the requirement (112);
in a specific embodiment: the degeneration compelling population strategy enables the individuals with low fitness values behind ranking in the population to obtain higher fitness values by recalculating fitness values of the individuals in the compelling population, and enables the individuals with low fitness values to be selected to participate in generation of filial generations with higher probability than the individuals with high fitness values, so that the overall strength of the compelling population is reduced, the two populations are balanced in strength, competition between two parties can be kept, and the phenomenon that evolution is stagnated is avoided. The formula for the fitness recalculation is shown as follows:
f′=2ω2x-ωx2
wherein f' is the recalculated individual fitness value, x is the score value of each individual in the interval of [0,1] obtained by normalizing the fitness values f of all the individuals of the dominant population, and omega is the degradation coefficient in the interval (0, 0.5) and represents the degradation degree of the population, and is determined by the difference between the populations, and the larger the difference is, the smaller the degradation coefficient is, the higher the degradation degree is.
In a specific embodiment: evolution operators of the host (sequencing network) population comprise selection, mutation and crossover, the selection operators adopt championship selection, half filial generations are generated by crossover and mutation, and half filial generations are generated by mutation only; the evolution operators of the parasite (disordered array) population only have selection and mutation without crossover, the selection operators adopt tournament selection, and the mutation operation is to exchange integers of optional two positions.
S5: the steps S2, S3, S4 are looped until the termination condition is reached.
Fig. 2 shows a flow chart of a competitive coevolution algorithm based on balanced mechanism variants for asymmetric tasks. Initializing a host population (200) and a parasite population (201), calculating a fitness value of individuals in the two populations (202), evaluating the strength of the potential of each population according to the fitness value of the two populations and calculating the population reproduction rate (203), comparing whether the strength of the potential of the inferior population reaches a threshold value, if not, directly selecting the inferior population to evolve, otherwise, selecting an evolved population according to the reproduction rate (204), if the selected host population to evolve, judging whether the strength of the potential of the parasite population is too large (205), if the strength of the potential of the parasite population is far higher than that of the host population, degenerating the parasite population (206), otherwise, normally evolving the host population (207); when the parasite population is selected for evolution, judging whether the difference between the momentum strength of the host population and the momentum strength of the parasite population is too large (208), if the momentum strength of the host population is far beyond the parasite population, degenerating the host population (209), otherwise, normally evolving the parasite population (210), repeating the evolution process until a termination condition is reached (211), and continuously optimizing two parties of competition by using a competition mechanism of competitive co-evolution and a self-feedback mechanism implied by evolution calculation.
Fig. 3 shows a schematic diagram of calculating the population reproduction rate of the present invention, in which the population reproduction rate is inversely proportional to the population strength, and fig. 3(1) (2) shows a schematic diagram of calculating the population reproduction rate when the population strength is evaluated in a manner of applying a competition (300) and in a manner of calculating an appropriate value mean value (301), respectively.
Fig. 4 shows a schematic diagram of calculating the population reproduction rate in the threshold setting strategy of the present invention, when the intensity of the inferior population potential is smaller than the threshold, the inferior population reproduction rate is 1, and the inferior population is directly selected for evolution, and fig. 4(1), (2) respectively show a schematic diagram of calculating the population reproduction rate in the threshold setting strategy corresponding to the inferior population (400) and the superior population (401).
7(a) -7 (b) show graphs of the results of the counting problem of the present invention, FIG. 7(a) is the evolution results obtained by applying the standard competitive co-evolution algorithm to the ranking network problem, showing the mean of fitness of the host population and the parasite population at each generation during evolution, and it can be found that as evolution progresses, both populations are divorced; FIG. 7(b) is the evolution result obtained when the competitive coevolution algorithm based on the equilibrium mechanism variants of the present invention is applied to the ranking network problem, and shows the mean value of the fitness of the host population and the parasite population at each generation during the evolution process, which is significantly improved compared to the separation of the two populations when the standard competitive coevolution algorithm is applied.
The invention can be widely applied to the situation of co-evolution.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (7)

1. A competitive coevolution algorithm for solving asymmetric tasks based on equilibrium mechanism variants is characterized by comprising the following steps:
s1: initializing both parties of the co-evolution: generating a certain number of individuals for the hosts and the parasites which are cooperated in a competitive mode according to respective coding modes, and initializing host populations and parasite populations;
s2: calculating the appropriate value of both sides of the cooperation: according to the competition rule, defining the suitable value of the individuals in the two populations as the number of the opponents in the defeat opponent population;
s3: calculating the reproduction rate of both parties: evaluating the potential strength of the populations of the two parties according to the calculated fitness condition of the populations of the two parties to obtain the potential strength of each population, wherein a balance mechanism specifies that only one population is evolved in each generation in the evolution process aiming at the problems that the tasks of the two parties are asymmetric, the evolution speed is inconsistent and interspecies separation is possible, the probability that each population is selectively evolved, namely the reproduction rate, is determined by the population potential strength and is inversely proportional to the population potential strength, and the higher the population potential strength is, the lower the reproduction rate is;
s4: competitive synergy based on equilibrium mechanism variants: in order to keep the two parties in competitive cooperation balanced, avoid the situation that evolution falls into stagnation and separation occurs between populations, a competitive coevolution algorithm based on variants of a balance mechanism is applied, namely a competitive coevolution algorithm for protecting a set threshold value strategy and a strong population degradation strategy of a disadvantaged population is added into the balance mechanism, the evolution content to be carried out by the current generation is obtained according to the situation of the strength of the potential and the reproduction rate of the two parties in the current generation according to the algorithm requirement, and the population is selected according to the content requirement for evolution.
2. The competitive coevolution algorithm for solving asymmetric tasks based on balanced mechanism variants as claimed in claim 1, wherein in S2, the fitness value is determined by using the way that all individuals participate in competition, all individuals in the host population are selected to compete with all individuals in the parasite population, when one party defeats the other party, the fitness value of the winning party is added by 1, and the fitness value of the losing party is not changed, that is, the fitness value of the individuals in the two populations is defined as the number of opponents in the defeater population.
3. The competitive coevolution algorithm for solving asymmetric tasks based on equilibrium mechanism variants as claimed in claim 1, wherein in S3, the evaluation method for the strength of the forces of both populations is calculated by competition and by means of the mean value: the competition calculation method comprises the steps of selecting an individual from competition parties, comparing the appropriate values of the individual and the individual with the large appropriate value, winning, and carrying out a certain number of competitions to obtain the ratio of the winning times of the competition parties to the total number of competitions, namely the strength of each momentum; the mode of calculating the mean value of the fitness values of the two groups of the competition parties is respectively calculated, and the strength of each group potential is the proportion of the mean value to the sum of the mean values; the reproduction rate of each population is inversely proportional to the population strength, namely, if the host population strength is Str and the parasite population strength is 1-Str, the situation population reproduction rate is 1-Str and the parameter population reproduction rate is Str.
4. The competitive coevolution algorithm according to claim 1, wherein in S4, for the small probability event that the dominant population with a fast evolution speed is continuously evolved under the condition of strong momentum strength and the disengagement condition that the dominant population has a momentum strength far exceeding that of the dominant population, which may still occur under the equilibrium mechanism, a strategy of setting a threshold to protect the degradation of the dominant population and the dominant population is added into the equilibrium mechanism, so as to achieve the purposes of keeping the military competition of the two competing parties, maintaining the relative equilibrium state of the two competing parties, and avoiding the stagnation of the evolution under the conditions that the evolution speeds of the two competing parties are different, the momentum difference between the two competing parties is too large, and the two competing parties disengage, specifically comprising the following steps:
s41: according to a strategy for setting a threshold value set by an algorithm and aiming at protecting a disadvantage population (namely a population with a slow evolution speed in the evolution process), judging whether the reproduction rate of the disadvantage population reaches the threshold value or not, and if not, directly judging to select the disadvantage population for evolution;
s42: the method comprises the following steps of (1) setting a degeneration strong population strategy according to an algorithm for solving the problems that the difference between a strong population and a weak population is too large, the populations are separated, and various populations cannot guide the evolution direction of an opponent population: judging whether the potential force difference between the two populations is overlarge, and when the potential force difference between the two populations is overlarge, carrying out degeneration operation on the strong party, namely changing the fitness condition of the individuals, so that the individuals with backward ranking in the populations are selected to be evolved in the subsequent evolution selection process, thereby achieving the purpose of reducing the strength of the strong populations;
s43: and (4) performing evolution content: and obtaining the evolution content to be carried out in the current generation according to the algorithm requirement, and selecting a population according to the content requirement to carry out evolution according to the requirement.
5. The competitive coevolution algorithm for solving asymmetric tasks based on balanced mechanism variants as claimed in claim 4, wherein in S42, the degenerate dominant population strategy is to re-calculate the fitness value of individuals in the dominant population, so that the individuals with low fitness value, which are originally in the population behind the ranking, obtain higher fitness value, and the individuals with low fitness value and higher fitness value are more likely to be selected to participate in generation of filial generation, thereby reducing the overall strength of the dominant population, balancing the two populations, keeping competition between two competing parties, and avoiding stagnation of evolution;
the formula for the fitness recalculation is shown as follows:
f′=2ω2x-ωx2
wherein f' is the recalculated individual fitness value, x is the score value of each individual in the interval of [0,1] obtained by normalizing the fitness values f of all the individuals of the dominant population, and omega is the degradation coefficient in the interval (0, 0.5) and represents the degradation degree of the population, and is determined by the difference between the populations, and the larger the difference is, the smaller the degradation coefficient is, the higher the degradation degree is.
6. The competitive coevolution algorithm for solving asymmetric tasks based on balanced mechanism variants as claimed in claim 4, wherein in S43, according to the requirement of algorithm evolution content, the population to be evolved is evolved according to the evolutionary algorithm defined by the population, and the dominant population to be degenerated only changes the fitness value for the selection process without affecting the operation processes of other genetic operators.
7. The competitive coevolution algorithm for solving asymmetric tasks based on balanced mechanism variants as claimed in claim 4, wherein in S4, the current evolutionary content is determined according to the algorithm requirement and the current competitive situation: determining a population to be evolved according to the population reproduction rate obtained by calculation and a weak population protection strategy for setting a threshold; according to the strategy of the degeneration compelling population, when the inter-species difference is too large, the current generation does not carry out normal evolution, but recalculates the proper value of the individual in the population for the compelling population, carries out the evolution operation towards the degeneration direction, and carries out the evolution on the selected population according to the determined evolution content of the current generation.
CN202011422669.1A 2020-12-08 2020-12-08 Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants Pending CN112418384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011422669.1A CN112418384A (en) 2020-12-08 2020-12-08 Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011422669.1A CN112418384A (en) 2020-12-08 2020-12-08 Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants

Publications (1)

Publication Number Publication Date
CN112418384A true CN112418384A (en) 2021-02-26

Family

ID=74775895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011422669.1A Pending CN112418384A (en) 2020-12-08 2020-12-08 Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants

Country Status (1)

Country Link
CN (1) CN112418384A (en)

Similar Documents

Publication Publication Date Title
CN111310915A (en) Data anomaly detection and defense method for reinforcement learning
CN110882544B (en) Multi-agent training method and device and electronic equipment
US7604541B2 (en) System and method for detecting collusion in online gaming via conditional behavior
CN114757351B (en) Defense method for resisting attack by deep reinforcement learning model
Liu et al. Using CIGAR for finding effective group behaviors in RTS game
CN117272306A (en) Federal learning half-target poisoning attack method and system based on alternate minimization
Gourdeau et al. Discriminative neural network for hero selection in professional Heroes of the Storm and DOTA 2
CN112418384A (en) Competitive coevolution algorithm for solving asymmetric tasks based on balance mechanism variants
CN111882072B (en) Intelligent model automatic course training method for playing chess with rules
CN113033754B (en) Evaluation method for high-frequency ground wave radar target tracking algorithm based on collaborative scene evolution
Omkar et al. Cricket team selection using genetic algorithm
CN115659054A (en) Game level recommendation method and device based on reinforcement learning
Lynch et al. Neurodraughts: the role of representation, search, training regime and architecture in a td draughts player
Raja et al. Applying data science for cricket predictions
Mozgovoy et al. Building a believable and effective agent for a 3D boxing simulation game
Bisberg et al. GCN-WP–Semi-supervised graph convolutional networks for win prediction in esports
Ding et al. Profiling and Identifying Smurfs or Boosters on Dota 2 Using K-Means and IQR
Weeks et al. Adventure game with a neural network controlled non-playing character
Price et al. Neuroevolution of multimodal ms. pac-man controllers under partially observable conditions
Perez-Bergquist Applying ESP and region specialists to neuro-evolution for Go
Yang et al. Co-evolutionary learning with strategic coalition for multiagents
Kim et al. Tournament competition and its merits for coevolutionary algorithms
CN109146052B (en) Self-play strategy promotion method of GFT algorithm
CN113988817B (en) Dirty data cleaning method based on intelligent data platform
Murata et al. Performance of genetic network programming for learning agents on perceptual aliasing problem

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication