A New Adaptive Hungarian Mating Scheme in Genetic Algorithms

. In genetic algorithms, selection or mating scheme is one of the important operations. In this paper, we suggest an adaptive mating scheme using previously suggested Hungarian mating schemes. Hungarian mating schemes consist of maximizing the sum of mating distances, minimizing the sum, and random matching. We propose an algorithm to elect one of these Hungarian mating schemes. Every mated pair of solutions has to vote for the next generation mating scheme. The distance between parents and the distance between parent and offspring are considered when they vote. Well-known combinatorial optimization problems, the traveling salesperson problem, and the graph bisection problem are used for the test bed of our method. Our adaptive strategy showed better results than not only pure and previous hybrid schemes but also existing distance-based mating schemes.


Introduction
Mating scheme or selection is one of the important operations in genetic algorithm (GA).Most operations in GAs are closely related to the performance.These operations interact with each other.A small change of a key operation may cause a dramatic change in result.Ochoa et al. [1] presented that assortative mating is a good choice when the mutation rate is high, while disassortative mating is a good choice when the mutation rate is low.
In mating or selection stage, the methods of mating are classified into three groups.The first one gives preference to similar solutions [2,3].This method focuses on exploitation.It assumes that similar solutions have higher chance to make better solutions because they use discovered good schemata.
The second one is dissimilar mating.This method focuses on exploration, and it tries to evade a premature convergence and a fast diversity consumption of similar mating.It is realized mostly by a restriction.Ramezani and Lotfi [4] restricted mating between family solutions such as parent and offspring.They solved function optimization problems and obtained good results.Fernandes et al. [5] reported that dissimilar mating outperforms a simple GA or similar mating in vector quantization problem.
The last group tries to find a better mating scheme by combining two or more mating schemes.Ishibuchi et al. [6,7] considered the number of mating candidates.They used their parameters to control similarity of a mated solution.They proposed a method of changing its controlling parameter at a middle of running.They also presented that the changing parameter made better results (nearer to Pareto-optimal solutions) than fixed parameters.
Galán et al. [8] proposed a mating scheme where each individual has its mating preference value to balance exploitation and exploration.A low value of mating preference makes a match between solutions close to each other, while a high mating preference makes a match between solutions far from each other.The preference is inherited or mutated like a normal gene.They tested their scheme in various environments of function optimization.They showed that their scheme outperformed random mating or a scheme with a fixed preference value.
In this paper, we propose a new adaptive Hungarian mating scheme.Our hybrid scheme adaptively selects a pure scheme for the next generation with voting.The traveling salesperson problem (TSP) and the graph bisection problem are the test problems of our adaptive scheme.We summarize our contributions as follows.(i) We propose a new adaptive mating scheme, (ii) we provide a reasonable explanation for our scheme, (iii) we show that our adaptive hybrid scheme is more effective than any pure Hungarian scheme and a previous simple hybrid scheme for the two test problems, and (iv) finally we show that our scheme changes its action as the size of problem space changes.
In comparison with the preliminary version of this paper [9], we provide the following extended information: (i) empirical observations and theoretical proof of the recommended parameter settings, (ii) detailed results to show the search behaviors of our algorithm, (iii) comparison of solution qualities with existing distance-based mating methods, and (iv) analysis on computation time of the proposed method and existing ones.
The remainder of this paper is divided into five parts.Previously suggested Hungarian mating schemes and their hybrid strategy are presented in Section 2. Motivation of this study is described in Section 3. Section 4 explains our adaptive hybrid mating scheme.In Section 5, we give experimental results and analyze the results.In Section 6, we draw conclusions.

Hungarian Mating Scheme.
Recently, we suggested Hungarian mating schemes [10].We divided population into the same number of female and male individuals.The Hungarian method is applied to mating.In each problem, a suited distance metric is adopted.It will be described in the next subsection.
Figure 1 describes the mating schemes.Distribution of an example population is illustrated in Figure 1(a).Thirty individuals are shown: fifteen plus symbols (+) are female solutions, and fifteen filled circles (•) are male ones.The Euclidean distance is adopted as the distance metric.Figure 1(b) shows a result of random mating scheme which is called "RAND."The result of minimizing the sum of distances is displayed in Figure 1(c).The result is obtained from the following formula with the Hungarian method: min where   's are male solutions,  () 's are their mated female ones, and  is the Euclidean distance function.The scheme in Figure 1(c) will be called "NEAR" in this study.Figure 1(d) shows the result of maximizing the sum of distances.The result is obtained from the following formula with the Hungarian method: max This scheme is called "FAR."NEAR method extremely concentrates on exploitation, while FAR method extremely focuses on exploration.In bijective mating, NEAR method minimizes the sum of distances.It is an extreme strategy to decrease diversity and use inherent parts of solutions.Similarly, FAR method is an extreme method to preserve diversity.

Test Problems and Distance Metric.
Our test problems are TSP and the graph bisection problem.In TSP, a complete undirected graph  is given.Each edge in  has a nonnegative weight.The objective of the problem is to find a minimum tour that passes through all the vertices (i.e., Hamiltonian cycle) of .
Assume an undirected graph  = (, ):  is a vertex set and  is an edge set.-way partitioning is defined as partitioning the vertex set  into  disjoint subsets  1 ,  2 , . . .,   .A -way partition is said to be balanced if the difference of cardinalities between the largest and the smallest subsets is zero or one.The cut size of a partition is the number of edges with endpoints in different subsets of the partition.The -way partitioning problem is the problem of finding a -way balanced partition with minimum cut size.In this paper, we set  to be equal to two and call this problem "graph bisection." The distance metric is the same as that used in our previous study [10].In TSP, for the phenotype distance metric, the quotient swap distance [20] was used.The quotient swap distance is defined as the smallest one among swap distances.The swap distance between  and  is the minimum number of swaps to make  be equal to .In other words, between  and every shifted  the minimum value of the swap distance is the quotient swap distance between  and .In graph bisection, for the phenotype distance metric, the quotient Hamming distance [20] was used.Similar to the quotient swap distance, the quotient Hamming distance is defined as the smallest one among Hamming distances.The Hamming distance between two strings is defined by the number of different positions at which the corresponding symbols are different.In other words, the quotient Hamming distances between  and  are the smaller value of the Hamming distance between  and  and that between  and .

Motivation
We reported that the best Hungarian mating scheme varies according to problems and their sizes [10].We proposed a simple hybrid scheme of changing the mating scheme from NEAR to RAND at the th generation in TSP, where  is the number of cities.The hybrid scheme for graph bisection changes mating scheme from RAND to FAR at the 100th generation.Parameters  and 100 are based on some empirical observation.But the hybrid scheme also has a weakness.The switching time before running of GAs was predetermined.So it is hard to apply the method to new problems or instances.
Galán et al. [8] reported that a self-adaptive mating scheme can be better than traditional random mating and their best-first mating and best-last mating.In the best-first mating, each solution pairs up with its nearest one in the order from the best solution to the worst one.In contrast, in the best-last mating, each solution pairs up with its farthest one in the order from the best solution to the worst one.The best-first mating resembles NEAR method as the best-last mating resembles FAR method.NEAR and FAR are extreme cases of mating.The ideal mating scheme may exist in some middle point of NEAR and FAR as Galán et al. [8] showed in function optimization.
Suggesting a new adaptive hybrid scheme of the Hungarian mating schemes is our main goal.A good scheme may (i) work irrespective of problems or instances, (ii) select its action as environment changes, and (iii) show better results than consistently applied pure scheme.A new scheme with these features will be proposed.
In this paper, we show the influence of the proposed mating scheme, not aiming to beat the state-of-the-art results of TSP and graph bisection.Local optimization may play an important role in making practical solutions.We do not use any local optimization.Instead, we concentrate on balance between exploration and exploitation with a new mating scheme.

Proposed Method
4.1.Voting Rules.We assume the same number of male and female solutions as Goh et al. did in [21].In each generation, our method selects FAR, RAND, or NEAR for the next generation.Our method does not simulate three schemes as they are.Instead, the appropriate scheme is adaptively adopted.For that, a mating scheme for the next generation is selected with majority voting.Every matched pair has to vote.Our crossover operator generates two offspring, and their gender is randomly assigned.The voting is carried out after mutation.So our voting algorithm compares two parents and two offspring after mutation.The rules of voting are described by Algorithm 1.If one of the parents is the same as its son or daughter, this pair votes for FAR scheme.Otherwise, a ratio of distance between parents over the sum of the mother-daughter distance and the father-son distance is considered.In the case where the ratio is less than , this pair votes for FAR scheme.If the ratio is equal to or greater than  and less than , this pair votes for RAND scheme.The remaining case is where the ratio is equal to or greater than .In this case, this pair votes for NEAR scheme.In the next generation, the scheme which gets the most votes is adopted.

Parameter Setting.
We set  to be 0.5 and  to be 1. Figure 2 describes the median of the ratio values according to generation for an instance of each test problem.axis represents generation and -axis represents the ratio values.
We call the median of the ratio values after crossover (before mutation) (thin line) BM.The median of the ratio values after mutation (thick points) is called AM.After crossover (before mutation), most of BM values are close to 1. BM does not change much, while the diversity of population decreases.On the other hand, AM drops slowly as the diversity decreases.
A mutation operator moves an individual to nearby space.The distribution of moving distance by a mutation is independent of the distance between parents.The expected value of BM is one when we use a geometric crossover [22].It will be proven in the next subsection.AM values over 1 appear frequently when the distance between parents is long enough.It means that we have sufficient diversity to consume.So a family votes for NEAR.Besides, the lower bound of BM is 0.5 when we use a geometric crossover.It will also be proven in the next subsection.AM values below 0.5 appear due to mutation effect.They are observed when the distance between parents is very close to 0. So a family votes for FAR.In other words, an influence of the mutation is estimated by the distance between parents.High influence of the mutation or a low AM value means that the matched parents are too close to each other to produce new solutions, while low influence of the mutation or a high AM value means that the parents are far from each other so we can match nearer solutions.

Theoretical Support.
A binary crossover operator is geometric if all offspring are in a convex segment between parents.That is, ( 1 ,  2 ) = ( 1 , ) + (,  2 ), where ( 1 ,  2 ) is a distance between  1 and  2 ,   's are parents, and  is an offspring obtained from a geometric crossover.Let  be the distance between both parents.We assume that  = ( 1 ,  2 ) ̸ = 0, crossover is geometric [22], We remind the reader that our ratio value is defined as where  1 and  2 are offspring obtained from a geometric crossover between  1 and  2 .
Proposition 1.Under these assumptions, the expected value of one's ratio is 1.That is, Proof.It is enough to show that Proposition 2. Under the same assumptions, the lower bound of one's ratio value is 0.5.That is, Proof.By the assumption of geometric crossover, By summing the above inequalities, 2( 1 ,  2 ) ≥ ( 1 ,  1 ) + ( 2 ,  2 ).Hence, we obtain

Experiments
5.1.Tested GA.We use a generational GA for test.Each solution is bijectively matched with opposite gender.A couple of individuals produce one female solution and one male solution.The genders are randomly assigned.We used 50 female and male individuals.We applied elitism [23] as a replacement strategy in both genders.Fifty best solutions remained for the next generation among previous 50 parents and new 50 offspring.Table 1 gives the other genetic operator settings.

Traveling Salesman Problem.
From TSPLIB [24], four Euclidean instances are selected: berlin52, kroA100, bier127, and pr152.In each instance, the number of cities is represented in the right part of the name.Figure 3 displays the fitness of the best individual according to generation.The average of the best fitness values (Avg) and the standard deviation (Std) per 200 generations are shown in Table 2. Method "single best" denotes the best single result among RAND, NEAR, and FAR in each generation.Method "simple hybrid" is the strategy that changes mating scheme once to a proper one.It was introduced in our previous work [10].The results of all figures and tables are the average values over 1,000 runs.In early stages of each run, the simple hybrid method showed the best fitness.But at the end of each run, our method outperformed the others for all instances.
Table 3 shows the statistical test result of significance for Table 2.We used Welch's -test [25].-value of − in Table 3 is computed as follows: where   is the average of ,   is the standard deviation of , and   is the test number of .The more significant result causes the lower  value.In most cases,  values are very close to zero.A plus mark (+) denotes that our scheme has passed -test under significance level, 0.01.For all instances, our scheme is significantly better than the others.Figure 4 shows the average voting rate of three schemes.The graph shows the average over 1,000 runs.In the early stage, RAND and NEAR get higher chance to be elected.NEAR is rarely selected in the early stage.As the diversity decreases, supporters of FAR increase.At the end of each run, almost all families vote for FAR.When we compare four instances in Figure 4, we can conclude that our method is adaptive.Consuming a diversity in a small space is faster than that in a large space.So our algorithm changes the mating scheme from RAND (or rarely NEAR) to FAR.The speed of changing scheme for instance pr152 was slower than that for instance berlin52.

Graph Bisection Problem.
We used four popular instances with 1,000 vertices [26].The difference of the instances is edge density.The right part of each name (such as 05) represents the average vertex degree.Table 4. Method "single best" and method "simple hybrid" are the same as in TSP.In almost all generations of all the instances, our method outperformed the others.Table 5 shows -test for the results in Table 4.It is conducted in the same way as that used in TSP.In all instances except one our scheme was significantly superior to the others.
Figure 6 shows the average voting rate of three schemes.While TSP showed different speed of changing schemes according to each instance, the figures of four graph bisection instances are almost the same as each other.Previously we reported that NEAR showed very poor results in this problem [10].With our new method, NEAR is naturally abandoned because FAR increases very fast.

Comparison with Existing
Methods.We compared our method with existing distance-based mating ones.We implemented variants of Ishibuchi and Shibata's [13] and Galán et al. 's [8] methods with two same-sized genders.Ishibuchi and Shibata's method [13] selects one parent that is the farthest individual from the average among the results of repeated tournament selections of  times.Their method selects the other parent that is the nearest individual from the first parent among the results of repeated tournament selections of  times.We set  and  to be 9 as in [13].The transformed variant selects the first parent from the female solutions and selects the second parent from the male solutions.It is repeated until all solutions are one-to-one matched.Galán et al. 's method [8] selects one parent that is the best.As the other  parent, their method selects the ( − 1)th nearest individual, where  is the mating preference of the first parent.The mating preference is inherited in crossover, and it increases by 1 with probability 0.25 or decreases by 1 with probability 0.25, in mutation.The same as the variant of Ishibuchi and Shibata's method [13], we made this method select the first parent from the female solutions and the second parent from the male solutions.It is repeated until all solutions are one-to-one matched.All the conditions and settings excluding mating are the same as those in the experiments of the previous sections.
Table 6 compares the solution qualities of these two existing methods and ours.For all instances of two test problems, our method significantly outperformed the others.Table 7 compares the computation times with respect to mating.Each value in Table 7 except mating proportion is measured in seconds.Our method took more time than Galán's method.But our method was faster than Ishibuchi's.Galán's method repeats finding the ( − 1)th nearest individual, whereas our method maximizes (or minimizes) the sum of distances.For graph bisection problem, computation times of instances of our method are similar to each other because the instances have the same number of nodes.In TSP, as the solution space grows, the proportion of mating time decreases, because the mating time of our method is mainly bounded by population size.As distance scale grows, mating time increases.It can be resolved by approximating the scale of distance values.Our mating method did not overburden the entire GA, and also we expect reducing time burden through some improved implementation.

Concluding Remarks
We analyzed the proposed adaptive hybrid mating scheme for TSP and graph bisection.FAR scheme is biased on exploitation, while NEAR scheme is biased on exploitation.Our mating scheme assesses the distance of the matched parents with their offspring.With this assessment, our adaptive scheme tries to find a balanced point between exploration and exploitation in each generation.We also compared the proposed method with two existing distance-based methods.The proposed method showed better performance than the two existing methods.
We set the threshold parameters as 0.5 and 1.0 with some observation and the values are theoretically justified.But we expect that the method of dynamically adjusting these values may produce better results.Real-coded problems may have different features from combinatorial optimization.With our scheme, more various problems such as function optimization can be tested.There are still opportunities for further enhancements and we will study the presented method    with various environments such as various crossover, mutation rates, replacement, and local optimization for future work.

5 Figure 2 :
Figure 2: Median of ratio values according to generation.

Figure 5
illustrates the fitness of the best individual over all generations.The results of all figures and tables are written with the average values over 1,000 runs as in TSP.The average of the best fitness values (Avg) and the standard deviation (Std) per 100 generations are listed in

Figure 3 :
Figure 3: Fitness of mating schemes in TSP (the smaller, the better).

Figure 4 :
Figure 4: Voting rates of schemes in TSP.

Figure 5 :
Figure 5: Fitness of mating schemes in graph bisection (the smaller, the better).

Figure 6 :
Figure 6: Voting rates of schemes in graph bisection.

Table 2 :
Results of TSP.

Table 3 :
Statistical test of TSP.
value: the smaller, the more significant.+: significantly better under level 1.00e − 02.

Table 4 :
Results of graph bisection.

Table 5 :
Statistical test of graph bisection.

Table 6 :
Comparison of results on two test problems.
*CPU: Intel Xeon E5530 2.40 GHz.Average from 1,000 runs.Avg: average (the smaller, the better); Std: standard deviation.value: the smaller, the more significant.+:significantly better under level 1.00e − 02.* : it means that this value is less than 1.0e − 300.

Table 7 :
Results of computation time.