# A Fuzzy Genetic Algorithm Based on Binary Encoding for Solving Multidimensional Knapsack Problems

Authors: M. Jalali Varnamkhasti; L. S. Lee
Journal: Journal of Applied Mathematics
 (2012)

---

## Abstract

The fundamental problem in genetic algorithms is premature convergence, and it is strongly related to the loss of genetic diversity of the population. This study aims at proposing some techniques to tackle the premature convergence by controlling the population diversity. Firstly, a sexual selection mechanism which utilizes the mate chromosome during selection is used. The second technique focuses on controlling the genetic parameters by applying the fuzzy logic controller. Computational experiments are conducted on the proposed techniques and the results are compared with other genetic operators, heuristics, and local search algorithms commonly used for solving multidimensional 0/1 knapsack problems published in the literature.


---

## Body

## 1. Introduction

Combinatorial optimization problems contain many decision variables, and hence exploring the search space and finding the optimal solution remain a major challenge for this type of problem. Problems, such as loading, scheduling, inventory control, and routing, occur in management fields and in many engineering design processes. Most of these problems are members of the class of NP-hard problems as classified by Garey and Johnson [1]. They are usually difficult to solve and cannot be solved in polynomial time.The genetic algorithm (GA) [2] is a heuristic search technique that mimics natural evolution processes such as selection, crossover, and mutation operations. The selection pressure drives the population toward better solutions while crossover, uses genes of selected parents to produce offspring that will form the next generation. Mutation is used to avoid premature convergence and consequently escapes from the local optimal. GAs have been very successful in handling hard combinatorial optimization problems.This study aims at proposing some techniques to tackle the premature convergence of GAs by controlling the population diversity. Firstly, a new sexual selection mechanism which utilizes the mate chromosome during selection is proposed. In a classical GA, chromosomes reproduce asexually: any two chromosomes may be the parents in crossover. Gender division and sexual selection here inspire a model of gendered GA in which crossover takes place only between chromosomes of opposite sex. In this paper, the population is divided into groups of males and females. During the sexual selection, the female chromosome is selected by using the tournament selection while the male chromosome is selected based on the Hamming distance (HD) from the selected female chromosome, fitness value (FV) or the active genes (AGs) of the male chromosome.The performance of a GA is strongly related to the equilibrium between the exploration and the exploitation of the genetic operators. Establishing a suitable relationship between the exploitation and the exploration during the GA implementation is critical for preventing the premature convergence. In this paper, fuzzy tools are used to dynamically control the parameters in the GA in order to create an appropriate balance between exploitation and exploration. In order to dynamically control the parameters in a GA, population diversity based on the phenotype and the genotype properties is applied as inputs in a fuzzy logic controller (FLC). Based on these inputs, the fuzzy selection of crossover operator, crossover probability, mutation operator, and mutation probability are produced as the outputs in the FLC. The FLC is used in four stages:(i)
fuzzy selection for crossover operator,(ii)
fuzzy selection for crossover probability,(iii)
fuzzy selection for mutation operator,(iv)
fuzzy selection for mutation probability.The remainder of this paper is organized as follows. In Section2, a comprehensive literature review is given. Section 3 explains in detail the proposed algorithm. Computational experiments based on the benchmark problem instances from the literature are presented in Section 4. Finally, a brief conclusion is given in Section 5.


## 2. Literature Review

The GAs have grown to became a significant problem-solving technique in a variety of areas which encounter problems of design optimization. It is almost impossible for one to find a uniformly optimum algorithm to resolve all problems of optimization. This is in line with the “no free lunch” theory which argues that any enhanced performance of an algorithm over a particular problem class is paid for in its performance over another exactly. Control parameters and selective operators of the evolutionary algorithms are becoming more popular because of their capabilities in solving different real world problems.Fuzzy logic (FL) and GA can be merged in two possible cases: (i) the application of GA for solving optimization problems related with fuzzy systems and (ii) using fuzzy tools and FL-based techniques for modelling and adapting different GA components. The GA resulting from the merging of the second case is called fuzzy genetic algorithms (FGAs) [3].Some researchers utilized FL to dynamically control the parameters in GA in order to create an appropriate balance between exploitation and exploration. A management technique of crossover and mutation probabilities on the basis of FL was proposed by Song et al. [4] In this technique, the alteration of the average fitness value between two sequential generations is considered as the input variables. The method used by [4] encountered some problems in the fuzzy inference rules that Yun and Gen [5] later overcame by introducing a modification and a scaling factor for the normalization of the input variables.Subbu et al. [6] presented a contrast between the performance of an FGA and a parameter-tuned GA for a nimble production application whereby parameters of the GA were dynamically scheduled by FLCs. The tuned genetic algorithm (TGA) performed superior searches but required more time for searching than the FGA. Therefore, the TGA is slower than the FGA as it uses a canonical static parameter set.Li et al. [7] used fuzzy tools in a GA for controlling the crossover and mutation probabilities. Their FGA utilized the information of both the whole generation and the particular chromosomes. Wang et al. [8] and Wang [9] designed an FGA based on population diversity measurements whereby the fuzzy controller was employed in controlling the crossover and mutation probabilities. Liu et al. [10] designed a hybrid consisting of a fuzzy system and GA which takes into consideration the average fitness value and the best fitness value of chromosomes in each generation to allow a dynamic control of the crossover and mutation probabilities. Herrera et al. [11] and Herrera and Lozano [3, 12, 13] attempted to lay the foundations for FGAs. They formulated different possible definitions for these algorithms. They suggested an exhaustive analysis of fuzzy-adaptive GA and an adaptive approach for controlling the mutation probability based on a utilization of FLCs.Lee and Takagi [14] proposed a method for controlling the crossover and mutation rate. They also presented an automatic fuzzy design technique which was based on a GA. Im and Lee [15] presented adaptive crossover, mutation, and selection using a fuzzy system for GA. In their study, it is not clear how a fuzzy system was based and which parameter of the GA was used for selection rules and membership functions. Jalali Varnamkhasti and Lee [16] proposed a new technique for choosing the female chromosome during sexual selection in a GA. A bilinear allocation lifetime approach is used to label the chromosomes based on their fitness value which will then be used to characterize the diversity of the population. The application of this technique is given by Jafari et al. [17] for committee neural networks.


## 3. Fuzzy Genetic Algorithm

The performance of an FGA depends on the design of various features, the most important of which are population, selection mechanism, crossover, and mutation operators and their probabilities and replacement strategy. In the remaining section, we discussed some of the main components of the FGA as shown in Algorithm1.Algorithm 1:FGA
beginInitialise Population;Fitness Evaluation;repeatPopulation Diversity;Sexual Selection;Fuzzy Controller;Fuzzy Crossover;Fuzzy Mutation;Replacement;until the end condition is satisfied;return the fittest solution found;end


### 3.1. Encoding

Chromosome encoding can be achieved by a variety of encoding methods and the choice of method is usually dependent on the optimization problem structure and precision requisites. However, the most common methods of encoding chromosomes are binary, integer, and real number encoding. The most commonly employed method of the three is binary encoding, primarily because the first works using GA employed this type of encoding. Binary encoding handles each chromosome as cord of bits, either 1 or 0. In this paper, we used standard binary encoding.


### 3.2. Population Diversity

In this study, the genotype and phenotype properties are both considered for the measurement of the population diversity. In the case of the phenotypic measures, the methods presented by Srinivas and Patnaik [18] and Zhu and Liu [19] are used with slight modifications [20]:
(3.1)T1,t=nfiN,T2,t=fmax⁡,t-favg,tfmax⁡,t,
where N:population size, nfi: number of unique fitness values in the population, fmax,t: maximum fitness value in generation t, and, favg,t: average fitness value in generation t.In the case when the genotypic measure is used, an equation similar to part of the technique proposed by Jassadapakorn and Chongstitvatana [21] is used:
(3.2)T3,t=HD(Cfmax⁡,t,Cfmin⁡,t)L,
where HD(Cfmax,t,Cfmin,t): HD between the chromosomes with the highest and the lowest FV, and L: length of the chromosome.In this technique, the HD is calculated in each generation for only two chromosomes: the chromosome with the maximum fitness value(Cfmax)and the one with the minimum fitness value (Cfmin) [20].As regards toT1,t, T2,t, and T3,t, three membership functions are defined. The set of linguistic labels associated with T1,t and T3,t are low, medium, and high and those related to T2,t are low and high. The semantic (meaning) of these labels are illustrated in Figure 1 [20].Figure 1
The set of linguistic labels associated withT1,t,T2,t, and T3,t (source: [20]).


### 3.3. Sexual Selection

The selection mechanism drives the population toward better solutions while the crossover uses genes of the selected parents to produce offspring that will form the next generation. This operator chooses chromosomes in the present generation for use in construction of the following one. In GAs, this operator is quite similar to the biological process of natural selection. The more fitting chromosomes are better able to survive and breed. The rate of the GA convergence depends to a great extent on the selection pressure; strong pressure favours fit chromosomes and leads to fast convergence, and vice versa. Though, when the selection pressure is very high, few highly fitting chromosomes will dominate the population thus lowering the diversity due to exploring the various areas of the solution space and consequently may lead to the premature convergence. On the other hand, when the selection pressure is very weak, the GA will need a higher number of generations to find the optimum solution. A balance between the two is needed to conserve the diversity of the population and escape premature convergence.In this paper, we use the sexual selection proposed in [20]. This technique utilizes the mate chromosome during selection. Note that the layout of the male and female chromosomes in each generation is different. During the sexual selection, a female chromosome is selected by tournament selection of size t from the female group. The selection of the male chromosome is based on the HD from the female chromosome, FV or AG of the male chromosome. Detailed description can be found in [20].To justify the decision of changing the layout of the male and female group in each generation, we tested this technique on four nonlinear numerical functions and compared it with some other sexual selection mechanism available in the literature. A standard GA is used in this experiment with a population size of 20, uniform crossover with probability,pc=1.00, and binary mutation with probability, pm=0.002. In order to better compare the mate selection technique, two types of selection mechanisms, random and tournament selections, are considered. The different sexual selection mechanisms collected from the literature that are used in the GA are listed in Table 1. The computations are to maximise the four test functions listed in Table 2 [22]. Each test function is tested on the GA for 30 times with 2000 generations per run.Table 1
Sexual selection mechanisms.
Population orderGrouping of male and femaleSelectionSelection mechanismRandomly scatteredFirst half male, second half female1Male and female randomly2Male and female with tournament size twoSelect male and female alternately3Male and female randomly4Male and female with tournament size twoSorted in non-increasing order of fitness valuesFirst half male, second half female5Male and female randomly6Male and female with tournament size twoSelect male and female alternately7Male and female randomly8Male and female with tournament size twoTable 2
Test functions (source: [22]).
Test FunctionConstraintsf1(x)={1+(x1+x2+1)2·(19-14x1+3x12-14x2+6x1x2+3x22)}·{30+(2x1-3x2)2·(18-32x1+12x12+48x2-36x1x2+27x22)}-10≤xi≤10f2(x)=(4-2.1x12+x14/3)x12+x1x2+(-4+4x22)x22-3≤x1≤3-2≤x2≤2f3(x)={∑i=15icos((i+1)x1+i)}·{∑i=15icos((i+1)x2+i)}-10≤xi≤10f4(x)=(x2-(5.1/4π2)x12+(5/π)x1-6)2+10(1-1/8π)cos(x1)+10-5≤x1≤100≤x2≤15The average results of 30 runs of the test functions are listed in Table3. By considering the results from each test function, it is clear that the proposed technique of grouping the male and female chromosomes alternately outperforms other grouping techniques of sexual selection mechanisms.Table 3
Comparison of gender grouping mechanisms.
f1f2f3f4Selection 17.02×1010121.56133.82267.57Selection 28.09×1010162.20210.08308.13Selection 38.09×1010162.20210.08308.13Selection 48.35×1010162.20210.23308.13Selection 57.02×1010110.2198.66221.55Selection 67.49×1010117.0260.14308.08Selection 78.11×1010162.20209.83308.13Selection 88.35×1010162.20210.23308.13


### 3.4. Crossover

#### 3.4.1. Fuzzy Crossover Operator

The performance of a GA is dependent on the genetic operators particularly on the type of crossover operator. Effective crossover in GAs is achieved through establishing the optimum relationship between the crossover structure and the search problem itself. The goal of this section is to provide a crossover selection technique based on the diversity of the population and a FLC. A crossover operator is selected in each generation from a list of crossover operators by running fuzzy tools on the results of measurements of the population diversity.Many published works compared the various crossover operators (see, De Jong and Spears [23, 24], Syswerda [25], and Eshelman et al. [26]). These researchers particularly investigated the numbers of crossover points, when some segments were exchanged using k-point type of cross-over techniques. Their results demonstrated that sometimes the final output would be better if the number of crossover points was increased. Besides empirical analysis, substantial efforts have been invested in comparing, from theoretical perspectives, mutation, and crossover as well as the various crossover operators [26]. However, these theories are not general enough to predict when to apply crossover or what type of crossover operator to employ. For instance, these theories did not address the issue of size of the study population even though it may affect the relative usefulness of the crossover operators [23]. Likewise, there is enough evidence suggesting that the relative usefulness of mutation may be influenced by the size of the population. Mutation seems to be more advantageous compared to crossover with small population sizes whereas crossover may be more advantageous than mutation when dealing with large population sizes [26]. Moreover, the relative usefulness of mutation and crossover are influenced by several other factors like the fitness function, the representation, and the selection scheme.For selecting the most appropriate crossover method, the structure of the crossover and the population diversity should be considered. In this study, we are using the technique introduced in [20]. In this technique, some crossover operators based on binary encoding are considered as the default crossover operators. These methods and their abbreviations are presented in Table 4.Table 4
Abbreviations of crossover operators.
Crossover operatorsAbbreviation2-Point crossover2PCk-Point crossoverKPCUniform crossoverUCSegregation crossoverSCInversion crossoverIC(i) Two-Point Crossover [2]
In a two-point crossover operator, two positive integer random numbersr1 andr2 are generated as cross-sites such that r1,r2<L, where L is the length of the chromosome. The genes bracketed by these numbers are exchanged between two mated parents. If the number of crossover point is greater than two, this type of crossover is named as k-Point crossover. In a k-Point crossover, a positive integer random number, r, is generated such that r≤L, where r is the number of cross-points. The genes are exchanged between alternate pairs of the cross-points.(ii) Uniform Crossover [25]
In the uniform crossover operator, each gene from either parent is selected for exchange and an offspring is created by copying the corresponding gene from one of the parent which is chosen using a randomly generated crossover mask. In each generation, a new crossover mask is randomly generated for each pair of parents.(ii) Segregation Crossover [27]
In the segregation crossover operator, two cuts, one from each parent, are selected so that the lengths of these parts are the same and then all genes in these parts are exchanged. In this technique, similarity in the gene positions for exchange is not a necessity. The difference between the SC and 2PC methods lies in the positions of the genes that are exchanged.(iii) Inversion Crossover [27]
In this technique, two positive integer random numbersr1 and r2 are generated as cross-sites such that r1,r2<L. The contents bracketed by these sites are exchanged between two parents. Then, the end points of these exchanged contents switch places.The explanation of the relative crossover operator and population diversity can be found in [20]. There are three levels for crossover ability (CA): low, medium and high. When the CA is low, this means that the operator is weak in keeping population diversity. Medium CA means the operator is appropriate for keeping genetic diversity and it is effective for finding different fitness value. If the CA is high, this means that the operator is useful for increasing genetic diversity and finding different fitness value. Levels of crossover operator based on CA used in this study are given in Table 5 [20].Table 5
Levels of crossover operator based on CA (source: [20]).
LowMediumHigh2-pointk-point UniformSegregationInversionAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels is associated with the ability of keeping the genetic diversity of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2. Note that the standard Mamdani method is used for fuzzy inference system.Figure 2
The set of linguistic labels associated with CA andpc (source: [20]).


#### 3.4.2. Fuzzy Crossover Probability

Crossover is based on probabilistic model-building procedure in a GA. It controls the rate at which solutions are to crossover given that, for each problem, the probability is chosen by the user. The selection of the crossover probability,pc, critically affects the behaviour and performance of a GA. However, guiding selection principles exist in the literature, (see, Grefenstette [28], De Jong [29, 30], Goldberg and Sastry [31], and Schaffer et al. [32]). Researchers usually use a probability of 50%–100% for executing the crossover [33]. Goldberg and Sastry [31] generalized the schema theorem for pc. They argued that the selection pressure corresponds to disruption of schema and showed that when the building blocks are compact (meaning its genes are located close to each other in the chromosome string), the GA works well for a wide range of combinations of pc and selection rates.Adaptive techniques that alter the probability of applying an operator in proportion to the observed performance of the chromosomes created by that operator in the course of a run were proposed by Davis [34]. Fernandes et al. [35] considered a GA that adapts the reproduction rate to the size of the population under investigation. Annunziato and Pizzuti [36] presented a technique for setting the genetic parameters during the course of a run by adapting the population size and the operator rates to the environmental constraint of maximum population size. On the other hand, an approach to determine of the probability of crossover and mutation based on the various fitness potentials of the population was established by Srinivas and Patnaik [18] where they presented a particular approach which eliminates the need for parameters in a crossover-based GA.In this study, the crossover probability is varied on the basis of the phenotype and genotype characteristics of the chromosome. In addition, the population diversity is considered and its probability is estimated by an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with crossover probability comprises of the descriptions of low, medium, and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2 [20].


### 3.5. Mutation

#### 3.5.1. Fuzzy Mutation Operator

In GAs, a mutation operator is applied after performing the crossover. The mutation operator is used to prevent the GAs from falling into a local optimum by preventing the population of chromosomes from becoming very similar to each other, which results in a premature convergence. The arguments presented in this subsection lead to the idea of using fuzzy system for selecting an appropriate mutation operator in order to obtain a more efficient mutation operator. In this study, some of the mutation operators are chosen from the literature. The Common abbreviations of these methods are summarized in Table6.Table 6
Abbreviations of mutation operators.
Mutation operatorAbbreviationBinary mutationBMInterchanging mutationIMReversing mutationRMParity Encoding mutationPEMSimple Sum Coding mutationSSCMInversion Sum Coding mutationISCMCycle Sum Coding mutationCSCM(i) Binary Mutation [2]
A binary mutation operator is applied to each offspring which is represented by a binary code. It introduces small changes to the individual by altering each gene in the offspring from “1” to “0” or vice versa.(ii) Interchanging Mutation [37]
In an interchanging mutation, two random position of the string are chosen and the bits corresponding to those positions are interchanged.(iii) Reversing Mutation [37]
In a reversing mutation, a random position is chosen and the bits next to that position are reversed to produce a new offspring.(iv) Parity Encoding Mutation [38]
LetX={xk} be an n-bit binary sequence, indexed from left to right of chromosome ci, the parity encoding, P(X)={yj}, of X is defined to be yj=∑xk,k=1toj where ∑ is the base 2 summation. For example, P(1101001)=1001110 and P(1001110)=111010. In the PEM, X is replaced by P(X) in offspring ci.(v) Simple Sum Coding Mutation [38]
In this operator, a substring of offspring is selected randomly and then this subset is summed on a base 2 and is replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100)+(1100)=11000 and 1000 replaced the 1100 and new offspring ispi′= (10100011100001011).(vi) Inversion Sum Coding Mutation [38]
A substring of offspring is selected randomly, and then the subset is summed with inverse order of itself on base 2 and replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100) + (0011) =1111 and 1111 replaced the 1100 and new offspring is pi′= (10111111100001011).(vii) Cycle Sum Coding Mutation [38]
In this operation, the start of the sequence is connected to the end to form a cycle. In this cycle, two substrings are considered where the lengths are the same. These substrings are summed together on a base 2 and the result replaces the position of one of the substrings randomly. If the number of genes after summation is more than the places, the extra genes are not considered (right to left).When the BM operator is used as a default mutation operator, a small mutation probability such aspm=1/L, where L is the length of the chromosome, is used as the most common approach. However, this technique has two shortcomings:(i)
when the length of chromosome is short, the mutation probability is high which forces us to choose an experimentation strategy for thepm selection,(ii)
each gene will be checked based on the mutation probability which renders a high computation time.In the IM operator, only two genes are changed for each chromosome. Note that for a long chromosome, this method is not appropriate. If the layout of genes is symmetric or if all genes are similar, the RM technique failed to create new offspring as shown by the example in Figure3.Figure 3
An example of Reversing Mutation.When the SSCM, ISCM, CSCM, or PEM is used as the mutation operator, the performances of the CSCM and PEM operators are sometimes better than those of the ISCM and SSCM operators (Figure4).Figure 4
Comparison of mutation operators of on offspring.When the genetic diversity of the population is high(T3,t≥0.50), the IM and RM operators perform well because the genetic diversity is high and there is no need to made huge changes. Also the time consumptions in the IM and RM methods are less than other operators. Therefore, it is better to use IM or RM in this case. The diversity of the population is considered medium when some gene locations in the chromosomes are the same (0.25≤T3,t≤0.50). In such cases, it is better to use mutation operators that can keep the diversity or amplitude changes on the genetic diversity. Therefore, it is better to use BM or SSCM operators in this case. On the other hand, the diversity of the population is considered low (T3,t<0.25) when some chromosomes are identical. Hence, we need to use mutation operators that can increase the genetic diversity of the population but in reasonable computational time. IM and RM are weak for this situation. In this case, we can use BM or SSCM operator, but the problem is that we have a high mutation probability. Therefore, it is better to use PEM, ISCM, or CSCM in this case. The explanation of the relative mutation operators with the population diversity which consist of three levels of mutation ability (MA) is given in Table 7.Table 7
Levels of mutation operator based on MA.
LowMediumHighInterchangingBinaryParity EncodingReversingSimple Sum CodingInversion Sum CodingCycle Sum CodingAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with MA for keeping genetic diversity comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.Figure 5
The set of linguistic labels associated with MA andpm.


#### 3.5.2. Fuzzy Mutation Probability

The efficiency of the mutation operator as a means of exploring the search space is questionable. A GA using mutation as the only genetic operator would be a random search that is biased toward sampling good hyperplanes rather than poor ones. In order to explore the space reasonably quickly, thepm needs to be high. However, a high pm would disturb the sampling rates, even for the short schemata, and we would then end up with an essentially pure random search. On the other hand, if pm is low, the search would be very slow since application of the mutation operator would often leave a string unchanged. Then the question is: how could one figure out the probability value to be used for mutation?This study has taken the population diversity into consideration and the related probability of mutation has been calculated using an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with mutation probability comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.In a traditional GA, usually a very small number is used for mutation probability. Most of them usedpm=1/L. In this proposed technique, pm=1/L is used as the center point for the mutation probability. The range that is considered in this study is at the interval of (1/L-1/2L,1/L+1/2L)=(1/2L,3/2L).


### 3.6. Fuzzy Rules

The linguistic rules describing the control system consist of two parts: an antecedent block (between theIF and THEN) and a consequent block (following THEN). By making this type of evaluation, fewer rules can be evaluated, thus simplifying the processing logic and perhaps even improving the fuzzy logic system performance. There is the possibility of generating a single rule for each output variable. In this paper, we used the toolbox of Mamdani inference systems from MATLAB fuzzy logic toolbox. The inputs are combined logically using the AND/OR operator to produce output (xi,μi(CA)),(yi,μi(MA)),(zi,μi(pc)),and (wi,μi(pm))response values for all the expected inputs [20]:
(3.3)μi(CA)=max⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(MA)=max⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(pc)=min⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(pm)=min⁡{μi(T1,t),μi(T2,t),μi(T3,t)},
where i=1,2,…,thenumber of rules.Therefore, the proposed fuzzy system with three input variables will have 18(3×2×3) rules for each output variable (CA, MA, pc, andpm). This fuzzy rule base is collectively presented in Table 8. The fuzzy outputs for all rules are finally aggregated to one fuzzy set. To obtain a crisp decision from this fuzzy set, we use the centre of gravity approach for defuzzification [20]:
(3.4)xCA=∑i=1nμi(CA)xi∑i=1nμi(CA),yMA=∑i=1nμi(MA)yi∑i=1nμi(MA),zpc=∑i=1nμi(pc)zi∑i=1nμi(pc),wpm=∑i=1nμi(pm)wi∑i=1nμi(pm).Table 8
Fuzzy rule base for CA,pc, MA, and pm.
RuleT1,tT2,tT3,tCApcMApm1LowLowLowHighHighHighHigh2LowLowMediumHighHighHighHigh3LowLowHighMediumMediumMediumHigh4LowHighLowHighMediumHighHigh5LowHighMediumMediumMediumMediumMedium6LowHighHighMediumLowMediumLow7MediumLowLowHighHighHighHigh8MediumLowMediumMediumMediumMediumMedium9MediumLowHighMediumMediumMediumLow10MediumHighLowMediumMediumMediumMedium11MediumHighMediumMediumMediumMediumLow12MediumHighHighMediumLowMediumLow13HighLowLowHighHighHighHigh14HighLowMediumMediumMediumMediumMedium15HighLowHighLowMediumLowLow16HighHighLowLowMediumLowMedium17HighHighMediumLowLowLowLow18HighHighHighLowLowLowLow


### 3.7. Elitism Replacement with Filtration

After the fuzzy crossover and mutation operators are applied, elitism replacement technique is used as the replacement strategy. The offsprings will have to compete with their parents in order to allow transition into the new population. In other words, fitter chromosomes will survive for the next generation and they are never lost unless better solutions are found. In the elitism replacement technique, both parent and offspring populations are considered together as a single population. Then, this population is sorted in a nonincreasing order of their associated fitness value and the first half of the chromosomes from this combined population are selected as the chromosomes of the new population for the next generation.What is meant, within this context, by saying that two chromosomes are identical is that the loci of their genes are equal. Existence of the identical chromosomes is one of the critical problems for premature convergence. When large proportion of the chromosomes in the population are identical, the diversity of the population will be lost and premature convergence occurs. In order to overcome this problem, the filtration technique is used to add diversity to the new population. In this technique, one of the identical chromosomes is kept while the others are removed and replaced by new feasible chromosomes that are generated randomly. As the filtration procedure involves the process of “identifying,” “regenerating” and “reevaluating,” of the new chromosomes which requires a fair amount of computation time, it is sensible to just invoke the procedure everyR generation (where R is a parameter, e.g., 100) or when there is at least 10 percent of the population that are identical [20].


## 3.1. Encoding

Chromosome encoding can be achieved by a variety of encoding methods and the choice of method is usually dependent on the optimization problem structure and precision requisites. However, the most common methods of encoding chromosomes are binary, integer, and real number encoding. The most commonly employed method of the three is binary encoding, primarily because the first works using GA employed this type of encoding. Binary encoding handles each chromosome as cord of bits, either 1 or 0. In this paper, we used standard binary encoding.


## 3.2. Population Diversity

In this study, the genotype and phenotype properties are both considered for the measurement of the population diversity. In the case of the phenotypic measures, the methods presented by Srinivas and Patnaik [18] and Zhu and Liu [19] are used with slight modifications [20]:
(3.1)T1,t=nfiN,T2,t=fmax⁡,t-favg,tfmax⁡,t,
where N:population size, nfi: number of unique fitness values in the population, fmax,t: maximum fitness value in generation t, and, favg,t: average fitness value in generation t.In the case when the genotypic measure is used, an equation similar to part of the technique proposed by Jassadapakorn and Chongstitvatana [21] is used:
(3.2)T3,t=HD(Cfmax⁡,t,Cfmin⁡,t)L,
where HD(Cfmax,t,Cfmin,t): HD between the chromosomes with the highest and the lowest FV, and L: length of the chromosome.In this technique, the HD is calculated in each generation for only two chromosomes: the chromosome with the maximum fitness value(Cfmax)and the one with the minimum fitness value (Cfmin) [20].As regards toT1,t, T2,t, and T3,t, three membership functions are defined. The set of linguistic labels associated with T1,t and T3,t are low, medium, and high and those related to T2,t are low and high. The semantic (meaning) of these labels are illustrated in Figure 1 [20].Figure 1
The set of linguistic labels associated withT1,t,T2,t, and T3,t (source: [20]).


## 3.3. Sexual Selection

The selection mechanism drives the population toward better solutions while the crossover uses genes of the selected parents to produce offspring that will form the next generation. This operator chooses chromosomes in the present generation for use in construction of the following one. In GAs, this operator is quite similar to the biological process of natural selection. The more fitting chromosomes are better able to survive and breed. The rate of the GA convergence depends to a great extent on the selection pressure; strong pressure favours fit chromosomes and leads to fast convergence, and vice versa. Though, when the selection pressure is very high, few highly fitting chromosomes will dominate the population thus lowering the diversity due to exploring the various areas of the solution space and consequently may lead to the premature convergence. On the other hand, when the selection pressure is very weak, the GA will need a higher number of generations to find the optimum solution. A balance between the two is needed to conserve the diversity of the population and escape premature convergence.In this paper, we use the sexual selection proposed in [20]. This technique utilizes the mate chromosome during selection. Note that the layout of the male and female chromosomes in each generation is different. During the sexual selection, a female chromosome is selected by tournament selection of size t from the female group. The selection of the male chromosome is based on the HD from the female chromosome, FV or AG of the male chromosome. Detailed description can be found in [20].To justify the decision of changing the layout of the male and female group in each generation, we tested this technique on four nonlinear numerical functions and compared it with some other sexual selection mechanism available in the literature. A standard GA is used in this experiment with a population size of 20, uniform crossover with probability,pc=1.00, and binary mutation with probability, pm=0.002. In order to better compare the mate selection technique, two types of selection mechanisms, random and tournament selections, are considered. The different sexual selection mechanisms collected from the literature that are used in the GA are listed in Table 1. The computations are to maximise the four test functions listed in Table 2 [22]. Each test function is tested on the GA for 30 times with 2000 generations per run.Table 1
Sexual selection mechanisms.
Population orderGrouping of male and femaleSelectionSelection mechanismRandomly scatteredFirst half male, second half female1Male and female randomly2Male and female with tournament size twoSelect male and female alternately3Male and female randomly4Male and female with tournament size twoSorted in non-increasing order of fitness valuesFirst half male, second half female5Male and female randomly6Male and female with tournament size twoSelect male and female alternately7Male and female randomly8Male and female with tournament size twoTable 2
Test functions (source: [22]).
Test FunctionConstraintsf1(x)={1+(x1+x2+1)2·(19-14x1+3x12-14x2+6x1x2+3x22)}·{30+(2x1-3x2)2·(18-32x1+12x12+48x2-36x1x2+27x22)}-10≤xi≤10f2(x)=(4-2.1x12+x14/3)x12+x1x2+(-4+4x22)x22-3≤x1≤3-2≤x2≤2f3(x)={∑i=15icos((i+1)x1+i)}·{∑i=15icos((i+1)x2+i)}-10≤xi≤10f4(x)=(x2-(5.1/4π2)x12+(5/π)x1-6)2+10(1-1/8π)cos(x1)+10-5≤x1≤100≤x2≤15The average results of 30 runs of the test functions are listed in Table3. By considering the results from each test function, it is clear that the proposed technique of grouping the male and female chromosomes alternately outperforms other grouping techniques of sexual selection mechanisms.Table 3
Comparison of gender grouping mechanisms.
f1f2f3f4Selection 17.02×1010121.56133.82267.57Selection 28.09×1010162.20210.08308.13Selection 38.09×1010162.20210.08308.13Selection 48.35×1010162.20210.23308.13Selection 57.02×1010110.2198.66221.55Selection 67.49×1010117.0260.14308.08Selection 78.11×1010162.20209.83308.13Selection 88.35×1010162.20210.23308.13


## 3.4. Crossover

### 3.4.1. Fuzzy Crossover Operator

The performance of a GA is dependent on the genetic operators particularly on the type of crossover operator. Effective crossover in GAs is achieved through establishing the optimum relationship between the crossover structure and the search problem itself. The goal of this section is to provide a crossover selection technique based on the diversity of the population and a FLC. A crossover operator is selected in each generation from a list of crossover operators by running fuzzy tools on the results of measurements of the population diversity.Many published works compared the various crossover operators (see, De Jong and Spears [23, 24], Syswerda [25], and Eshelman et al. [26]). These researchers particularly investigated the numbers of crossover points, when some segments were exchanged using k-point type of cross-over techniques. Their results demonstrated that sometimes the final output would be better if the number of crossover points was increased. Besides empirical analysis, substantial efforts have been invested in comparing, from theoretical perspectives, mutation, and crossover as well as the various crossover operators [26]. However, these theories are not general enough to predict when to apply crossover or what type of crossover operator to employ. For instance, these theories did not address the issue of size of the study population even though it may affect the relative usefulness of the crossover operators [23]. Likewise, there is enough evidence suggesting that the relative usefulness of mutation may be influenced by the size of the population. Mutation seems to be more advantageous compared to crossover with small population sizes whereas crossover may be more advantageous than mutation when dealing with large population sizes [26]. Moreover, the relative usefulness of mutation and crossover are influenced by several other factors like the fitness function, the representation, and the selection scheme.For selecting the most appropriate crossover method, the structure of the crossover and the population diversity should be considered. In this study, we are using the technique introduced in [20]. In this technique, some crossover operators based on binary encoding are considered as the default crossover operators. These methods and their abbreviations are presented in Table 4.Table 4
Abbreviations of crossover operators.
Crossover operatorsAbbreviation2-Point crossover2PCk-Point crossoverKPCUniform crossoverUCSegregation crossoverSCInversion crossoverIC(i) Two-Point Crossover [2]
In a two-point crossover operator, two positive integer random numbersr1 andr2 are generated as cross-sites such that r1,r2<L, where L is the length of the chromosome. The genes bracketed by these numbers are exchanged between two mated parents. If the number of crossover point is greater than two, this type of crossover is named as k-Point crossover. In a k-Point crossover, a positive integer random number, r, is generated such that r≤L, where r is the number of cross-points. The genes are exchanged between alternate pairs of the cross-points.(ii) Uniform Crossover [25]
In the uniform crossover operator, each gene from either parent is selected for exchange and an offspring is created by copying the corresponding gene from one of the parent which is chosen using a randomly generated crossover mask. In each generation, a new crossover mask is randomly generated for each pair of parents.(ii) Segregation Crossover [27]
In the segregation crossover operator, two cuts, one from each parent, are selected so that the lengths of these parts are the same and then all genes in these parts are exchanged. In this technique, similarity in the gene positions for exchange is not a necessity. The difference between the SC and 2PC methods lies in the positions of the genes that are exchanged.(iii) Inversion Crossover [27]
In this technique, two positive integer random numbersr1 and r2 are generated as cross-sites such that r1,r2<L. The contents bracketed by these sites are exchanged between two parents. Then, the end points of these exchanged contents switch places.The explanation of the relative crossover operator and population diversity can be found in [20]. There are three levels for crossover ability (CA): low, medium and high. When the CA is low, this means that the operator is weak in keeping population diversity. Medium CA means the operator is appropriate for keeping genetic diversity and it is effective for finding different fitness value. If the CA is high, this means that the operator is useful for increasing genetic diversity and finding different fitness value. Levels of crossover operator based on CA used in this study are given in Table 5 [20].Table 5
Levels of crossover operator based on CA (source: [20]).
LowMediumHigh2-pointk-point UniformSegregationInversionAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels is associated with the ability of keeping the genetic diversity of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2. Note that the standard Mamdani method is used for fuzzy inference system.Figure 2
The set of linguistic labels associated with CA andpc (source: [20]).


### 3.4.2. Fuzzy Crossover Probability

Crossover is based on probabilistic model-building procedure in a GA. It controls the rate at which solutions are to crossover given that, for each problem, the probability is chosen by the user. The selection of the crossover probability,pc, critically affects the behaviour and performance of a GA. However, guiding selection principles exist in the literature, (see, Grefenstette [28], De Jong [29, 30], Goldberg and Sastry [31], and Schaffer et al. [32]). Researchers usually use a probability of 50%–100% for executing the crossover [33]. Goldberg and Sastry [31] generalized the schema theorem for pc. They argued that the selection pressure corresponds to disruption of schema and showed that when the building blocks are compact (meaning its genes are located close to each other in the chromosome string), the GA works well for a wide range of combinations of pc and selection rates.Adaptive techniques that alter the probability of applying an operator in proportion to the observed performance of the chromosomes created by that operator in the course of a run were proposed by Davis [34]. Fernandes et al. [35] considered a GA that adapts the reproduction rate to the size of the population under investigation. Annunziato and Pizzuti [36] presented a technique for setting the genetic parameters during the course of a run by adapting the population size and the operator rates to the environmental constraint of maximum population size. On the other hand, an approach to determine of the probability of crossover and mutation based on the various fitness potentials of the population was established by Srinivas and Patnaik [18] where they presented a particular approach which eliminates the need for parameters in a crossover-based GA.In this study, the crossover probability is varied on the basis of the phenotype and genotype characteristics of the chromosome. In addition, the population diversity is considered and its probability is estimated by an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with crossover probability comprises of the descriptions of low, medium, and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2 [20].


## 3.4.1. Fuzzy Crossover Operator

The performance of a GA is dependent on the genetic operators particularly on the type of crossover operator. Effective crossover in GAs is achieved through establishing the optimum relationship between the crossover structure and the search problem itself. The goal of this section is to provide a crossover selection technique based on the diversity of the population and a FLC. A crossover operator is selected in each generation from a list of crossover operators by running fuzzy tools on the results of measurements of the population diversity.Many published works compared the various crossover operators (see, De Jong and Spears [23, 24], Syswerda [25], and Eshelman et al. [26]). These researchers particularly investigated the numbers of crossover points, when some segments were exchanged using k-point type of cross-over techniques. Their results demonstrated that sometimes the final output would be better if the number of crossover points was increased. Besides empirical analysis, substantial efforts have been invested in comparing, from theoretical perspectives, mutation, and crossover as well as the various crossover operators [26]. However, these theories are not general enough to predict when to apply crossover or what type of crossover operator to employ. For instance, these theories did not address the issue of size of the study population even though it may affect the relative usefulness of the crossover operators [23]. Likewise, there is enough evidence suggesting that the relative usefulness of mutation may be influenced by the size of the population. Mutation seems to be more advantageous compared to crossover with small population sizes whereas crossover may be more advantageous than mutation when dealing with large population sizes [26]. Moreover, the relative usefulness of mutation and crossover are influenced by several other factors like the fitness function, the representation, and the selection scheme.For selecting the most appropriate crossover method, the structure of the crossover and the population diversity should be considered. In this study, we are using the technique introduced in [20]. In this technique, some crossover operators based on binary encoding are considered as the default crossover operators. These methods and their abbreviations are presented in Table 4.Table 4
Abbreviations of crossover operators.
Crossover operatorsAbbreviation2-Point crossover2PCk-Point crossoverKPCUniform crossoverUCSegregation crossoverSCInversion crossoverIC(i) Two-Point Crossover [2]
In a two-point crossover operator, two positive integer random numbersr1 andr2 are generated as cross-sites such that r1,r2<L, where L is the length of the chromosome. The genes bracketed by these numbers are exchanged between two mated parents. If the number of crossover point is greater than two, this type of crossover is named as k-Point crossover. In a k-Point crossover, a positive integer random number, r, is generated such that r≤L, where r is the number of cross-points. The genes are exchanged between alternate pairs of the cross-points.(ii) Uniform Crossover [25]
In the uniform crossover operator, each gene from either parent is selected for exchange and an offspring is created by copying the corresponding gene from one of the parent which is chosen using a randomly generated crossover mask. In each generation, a new crossover mask is randomly generated for each pair of parents.(ii) Segregation Crossover [27]
In the segregation crossover operator, two cuts, one from each parent, are selected so that the lengths of these parts are the same and then all genes in these parts are exchanged. In this technique, similarity in the gene positions for exchange is not a necessity. The difference between the SC and 2PC methods lies in the positions of the genes that are exchanged.(iii) Inversion Crossover [27]
In this technique, two positive integer random numbersr1 and r2 are generated as cross-sites such that r1,r2<L. The contents bracketed by these sites are exchanged between two parents. Then, the end points of these exchanged contents switch places.The explanation of the relative crossover operator and population diversity can be found in [20]. There are three levels for crossover ability (CA): low, medium and high. When the CA is low, this means that the operator is weak in keeping population diversity. Medium CA means the operator is appropriate for keeping genetic diversity and it is effective for finding different fitness value. If the CA is high, this means that the operator is useful for increasing genetic diversity and finding different fitness value. Levels of crossover operator based on CA used in this study are given in Table 5 [20].Table 5
Levels of crossover operator based on CA (source: [20]).
LowMediumHigh2-pointk-point UniformSegregationInversionAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels is associated with the ability of keeping the genetic diversity of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2. Note that the standard Mamdani method is used for fuzzy inference system.Figure 2
The set of linguistic labels associated with CA andpc (source: [20]).


## 3.4.2. Fuzzy Crossover Probability

Crossover is based on probabilistic model-building procedure in a GA. It controls the rate at which solutions are to crossover given that, for each problem, the probability is chosen by the user. The selection of the crossover probability,pc, critically affects the behaviour and performance of a GA. However, guiding selection principles exist in the literature, (see, Grefenstette [28], De Jong [29, 30], Goldberg and Sastry [31], and Schaffer et al. [32]). Researchers usually use a probability of 50%–100% for executing the crossover [33]. Goldberg and Sastry [31] generalized the schema theorem for pc. They argued that the selection pressure corresponds to disruption of schema and showed that when the building blocks are compact (meaning its genes are located close to each other in the chromosome string), the GA works well for a wide range of combinations of pc and selection rates.Adaptive techniques that alter the probability of applying an operator in proportion to the observed performance of the chromosomes created by that operator in the course of a run were proposed by Davis [34]. Fernandes et al. [35] considered a GA that adapts the reproduction rate to the size of the population under investigation. Annunziato and Pizzuti [36] presented a technique for setting the genetic parameters during the course of a run by adapting the population size and the operator rates to the environmental constraint of maximum population size. On the other hand, an approach to determine of the probability of crossover and mutation based on the various fitness potentials of the population was established by Srinivas and Patnaik [18] where they presented a particular approach which eliminates the need for parameters in a crossover-based GA.In this study, the crossover probability is varied on the basis of the phenotype and genotype characteristics of the chromosome. In addition, the population diversity is considered and its probability is estimated by an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with crossover probability comprises of the descriptions of low, medium, and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 2 [20].


## 3.5. Mutation

### 3.5.1. Fuzzy Mutation Operator

In GAs, a mutation operator is applied after performing the crossover. The mutation operator is used to prevent the GAs from falling into a local optimum by preventing the population of chromosomes from becoming very similar to each other, which results in a premature convergence. The arguments presented in this subsection lead to the idea of using fuzzy system for selecting an appropriate mutation operator in order to obtain a more efficient mutation operator. In this study, some of the mutation operators are chosen from the literature. The Common abbreviations of these methods are summarized in Table6.Table 6
Abbreviations of mutation operators.
Mutation operatorAbbreviationBinary mutationBMInterchanging mutationIMReversing mutationRMParity Encoding mutationPEMSimple Sum Coding mutationSSCMInversion Sum Coding mutationISCMCycle Sum Coding mutationCSCM(i) Binary Mutation [2]
A binary mutation operator is applied to each offspring which is represented by a binary code. It introduces small changes to the individual by altering each gene in the offspring from “1” to “0” or vice versa.(ii) Interchanging Mutation [37]
In an interchanging mutation, two random position of the string are chosen and the bits corresponding to those positions are interchanged.(iii) Reversing Mutation [37]
In a reversing mutation, a random position is chosen and the bits next to that position are reversed to produce a new offspring.(iv) Parity Encoding Mutation [38]
LetX={xk} be an n-bit binary sequence, indexed from left to right of chromosome ci, the parity encoding, P(X)={yj}, of X is defined to be yj=∑xk,k=1toj where ∑ is the base 2 summation. For example, P(1101001)=1001110 and P(1001110)=111010. In the PEM, X is replaced by P(X) in offspring ci.(v) Simple Sum Coding Mutation [38]
In this operator, a substring of offspring is selected randomly and then this subset is summed on a base 2 and is replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100)+(1100)=11000 and 1000 replaced the 1100 and new offspring ispi′= (10100011100001011).(vi) Inversion Sum Coding Mutation [38]
A substring of offspring is selected randomly, and then the subset is summed with inverse order of itself on base 2 and replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100) + (0011) =1111 and 1111 replaced the 1100 and new offspring is pi′= (10111111100001011).(vii) Cycle Sum Coding Mutation [38]
In this operation, the start of the sequence is connected to the end to form a cycle. In this cycle, two substrings are considered where the lengths are the same. These substrings are summed together on a base 2 and the result replaces the position of one of the substrings randomly. If the number of genes after summation is more than the places, the extra genes are not considered (right to left).When the BM operator is used as a default mutation operator, a small mutation probability such aspm=1/L, where L is the length of the chromosome, is used as the most common approach. However, this technique has two shortcomings:(i)
when the length of chromosome is short, the mutation probability is high which forces us to choose an experimentation strategy for thepm selection,(ii)
each gene will be checked based on the mutation probability which renders a high computation time.In the IM operator, only two genes are changed for each chromosome. Note that for a long chromosome, this method is not appropriate. If the layout of genes is symmetric or if all genes are similar, the RM technique failed to create new offspring as shown by the example in Figure3.Figure 3
An example of Reversing Mutation.When the SSCM, ISCM, CSCM, or PEM is used as the mutation operator, the performances of the CSCM and PEM operators are sometimes better than those of the ISCM and SSCM operators (Figure4).Figure 4
Comparison of mutation operators of on offspring.When the genetic diversity of the population is high(T3,t≥0.50), the IM and RM operators perform well because the genetic diversity is high and there is no need to made huge changes. Also the time consumptions in the IM and RM methods are less than other operators. Therefore, it is better to use IM or RM in this case. The diversity of the population is considered medium when some gene locations in the chromosomes are the same (0.25≤T3,t≤0.50). In such cases, it is better to use mutation operators that can keep the diversity or amplitude changes on the genetic diversity. Therefore, it is better to use BM or SSCM operators in this case. On the other hand, the diversity of the population is considered low (T3,t<0.25) when some chromosomes are identical. Hence, we need to use mutation operators that can increase the genetic diversity of the population but in reasonable computational time. IM and RM are weak for this situation. In this case, we can use BM or SSCM operator, but the problem is that we have a high mutation probability. Therefore, it is better to use PEM, ISCM, or CSCM in this case. The explanation of the relative mutation operators with the population diversity which consist of three levels of mutation ability (MA) is given in Table 7.Table 7
Levels of mutation operator based on MA.
LowMediumHighInterchangingBinaryParity EncodingReversingSimple Sum CodingInversion Sum CodingCycle Sum CodingAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with MA for keeping genetic diversity comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.Figure 5
The set of linguistic labels associated with MA andpm.


### 3.5.2. Fuzzy Mutation Probability

The efficiency of the mutation operator as a means of exploring the search space is questionable. A GA using mutation as the only genetic operator would be a random search that is biased toward sampling good hyperplanes rather than poor ones. In order to explore the space reasonably quickly, thepm needs to be high. However, a high pm would disturb the sampling rates, even for the short schemata, and we would then end up with an essentially pure random search. On the other hand, if pm is low, the search would be very slow since application of the mutation operator would often leave a string unchanged. Then the question is: how could one figure out the probability value to be used for mutation?This study has taken the population diversity into consideration and the related probability of mutation has been calculated using an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with mutation probability comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.In a traditional GA, usually a very small number is used for mutation probability. Most of them usedpm=1/L. In this proposed technique, pm=1/L is used as the center point for the mutation probability. The range that is considered in this study is at the interval of (1/L-1/2L,1/L+1/2L)=(1/2L,3/2L).


## 3.5.1. Fuzzy Mutation Operator

In GAs, a mutation operator is applied after performing the crossover. The mutation operator is used to prevent the GAs from falling into a local optimum by preventing the population of chromosomes from becoming very similar to each other, which results in a premature convergence. The arguments presented in this subsection lead to the idea of using fuzzy system for selecting an appropriate mutation operator in order to obtain a more efficient mutation operator. In this study, some of the mutation operators are chosen from the literature. The Common abbreviations of these methods are summarized in Table6.Table 6
Abbreviations of mutation operators.
Mutation operatorAbbreviationBinary mutationBMInterchanging mutationIMReversing mutationRMParity Encoding mutationPEMSimple Sum Coding mutationSSCMInversion Sum Coding mutationISCMCycle Sum Coding mutationCSCM(i) Binary Mutation [2]
A binary mutation operator is applied to each offspring which is represented by a binary code. It introduces small changes to the individual by altering each gene in the offspring from “1” to “0” or vice versa.(ii) Interchanging Mutation [37]
In an interchanging mutation, two random position of the string are chosen and the bits corresponding to those positions are interchanged.(iii) Reversing Mutation [37]
In a reversing mutation, a random position is chosen and the bits next to that position are reversed to produce a new offspring.(iv) Parity Encoding Mutation [38]
LetX={xk} be an n-bit binary sequence, indexed from left to right of chromosome ci, the parity encoding, P(X)={yj}, of X is defined to be yj=∑xk,k=1toj where ∑ is the base 2 summation. For example, P(1101001)=1001110 and P(1001110)=111010. In the PEM, X is replaced by P(X) in offspring ci.(v) Simple Sum Coding Mutation [38]
In this operator, a substring of offspring is selected randomly and then this subset is summed on a base 2 and is replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100)+(1100)=11000 and 1000 replaced the 1100 and new offspring ispi′= (10100011100001011).(vi) Inversion Sum Coding Mutation [38]
A substring of offspring is selected randomly, and then the subset is summed with inverse order of itself on base 2 and replaced with the same place in the offspring. If the number of genes after summation is more than the places, the extra genes are not considered (right to left). For example, consider a substring of offspringpi= (10110011100001011) that is chosen between the second and 7th gene. This result is (1100) + (0011) =1111 and 1111 replaced the 1100 and new offspring is pi′= (10111111100001011).(vii) Cycle Sum Coding Mutation [38]
In this operation, the start of the sequence is connected to the end to form a cycle. In this cycle, two substrings are considered where the lengths are the same. These substrings are summed together on a base 2 and the result replaces the position of one of the substrings randomly. If the number of genes after summation is more than the places, the extra genes are not considered (right to left).When the BM operator is used as a default mutation operator, a small mutation probability such aspm=1/L, where L is the length of the chromosome, is used as the most common approach. However, this technique has two shortcomings:(i)
when the length of chromosome is short, the mutation probability is high which forces us to choose an experimentation strategy for thepm selection,(ii)
each gene will be checked based on the mutation probability which renders a high computation time.In the IM operator, only two genes are changed for each chromosome. Note that for a long chromosome, this method is not appropriate. If the layout of genes is symmetric or if all genes are similar, the RM technique failed to create new offspring as shown by the example in Figure3.Figure 3
An example of Reversing Mutation.When the SSCM, ISCM, CSCM, or PEM is used as the mutation operator, the performances of the CSCM and PEM operators are sometimes better than those of the ISCM and SSCM operators (Figure4).Figure 4
Comparison of mutation operators of on offspring.When the genetic diversity of the population is high(T3,t≥0.50), the IM and RM operators perform well because the genetic diversity is high and there is no need to made huge changes. Also the time consumptions in the IM and RM methods are less than other operators. Therefore, it is better to use IM or RM in this case. The diversity of the population is considered medium when some gene locations in the chromosomes are the same (0.25≤T3,t≤0.50). In such cases, it is better to use mutation operators that can keep the diversity or amplitude changes on the genetic diversity. Therefore, it is better to use BM or SSCM operators in this case. On the other hand, the diversity of the population is considered low (T3,t<0.25) when some chromosomes are identical. Hence, we need to use mutation operators that can increase the genetic diversity of the population but in reasonable computational time. IM and RM are weak for this situation. In this case, we can use BM or SSCM operator, but the problem is that we have a high mutation probability. Therefore, it is better to use PEM, ISCM, or CSCM in this case. The explanation of the relative mutation operators with the population diversity which consist of three levels of mutation ability (MA) is given in Table 7.Table 7
Levels of mutation operator based on MA.
LowMediumHighInterchangingBinaryParity EncodingReversingSimple Sum CodingInversion Sum CodingCycle Sum CodingAs for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with MA for keeping genetic diversity comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.Figure 5
The set of linguistic labels associated with MA andpm.


## 3.5.2. Fuzzy Mutation Probability

The efficiency of the mutation operator as a means of exploring the search space is questionable. A GA using mutation as the only genetic operator would be a random search that is biased toward sampling good hyperplanes rather than poor ones. In order to explore the space reasonably quickly, thepm needs to be high. However, a high pm would disturb the sampling rates, even for the short schemata, and we would then end up with an essentially pure random search. On the other hand, if pm is low, the search would be very slow since application of the mutation operator would often leave a string unchanged. Then the question is: how could one figure out the probability value to be used for mutation?This study has taken the population diversity into consideration and the related probability of mutation has been calculated using an FLC. As for theT1,t, T2,t, and T3,t inputs, the set of linguistic labels associated with mutation probability comprises the descriptions of low, medium and high. For each linguistic term, there is a triangular fuzzy set that defines its semantic (meaning) as shown in Figure 5.In a traditional GA, usually a very small number is used for mutation probability. Most of them usedpm=1/L. In this proposed technique, pm=1/L is used as the center point for the mutation probability. The range that is considered in this study is at the interval of (1/L-1/2L,1/L+1/2L)=(1/2L,3/2L).


## 3.6. Fuzzy Rules

The linguistic rules describing the control system consist of two parts: an antecedent block (between theIF and THEN) and a consequent block (following THEN). By making this type of evaluation, fewer rules can be evaluated, thus simplifying the processing logic and perhaps even improving the fuzzy logic system performance. There is the possibility of generating a single rule for each output variable. In this paper, we used the toolbox of Mamdani inference systems from MATLAB fuzzy logic toolbox. The inputs are combined logically using the AND/OR operator to produce output (xi,μi(CA)),(yi,μi(MA)),(zi,μi(pc)),and (wi,μi(pm))response values for all the expected inputs [20]:
(3.3)μi(CA)=max⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(MA)=max⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(pc)=min⁡{μi(T1,t),μi(T2,t),μi(T3,t)},μi(pm)=min⁡{μi(T1,t),μi(T2,t),μi(T3,t)},
where i=1,2,…,thenumber of rules.Therefore, the proposed fuzzy system with three input variables will have 18(3×2×3) rules for each output variable (CA, MA, pc, andpm). This fuzzy rule base is collectively presented in Table 8. The fuzzy outputs for all rules are finally aggregated to one fuzzy set. To obtain a crisp decision from this fuzzy set, we use the centre of gravity approach for defuzzification [20]:
(3.4)xCA=∑i=1nμi(CA)xi∑i=1nμi(CA),yMA=∑i=1nμi(MA)yi∑i=1nμi(MA),zpc=∑i=1nμi(pc)zi∑i=1nμi(pc),wpm=∑i=1nμi(pm)wi∑i=1nμi(pm).Table 8
Fuzzy rule base for CA,pc, MA, and pm.
RuleT1,tT2,tT3,tCApcMApm1LowLowLowHighHighHighHigh2LowLowMediumHighHighHighHigh3LowLowHighMediumMediumMediumHigh4LowHighLowHighMediumHighHigh5LowHighMediumMediumMediumMediumMedium6LowHighHighMediumLowMediumLow7MediumLowLowHighHighHighHigh8MediumLowMediumMediumMediumMediumMedium9MediumLowHighMediumMediumMediumLow10MediumHighLowMediumMediumMediumMedium11MediumHighMediumMediumMediumMediumLow12MediumHighHighMediumLowMediumLow13HighLowLowHighHighHighHigh14HighLowMediumMediumMediumMediumMedium15HighLowHighLowMediumLowLow16HighHighLowLowMediumLowMedium17HighHighMediumLowLowLowLow18HighHighHighLowLowLowLow


## 3.7. Elitism Replacement with Filtration

After the fuzzy crossover and mutation operators are applied, elitism replacement technique is used as the replacement strategy. The offsprings will have to compete with their parents in order to allow transition into the new population. In other words, fitter chromosomes will survive for the next generation and they are never lost unless better solutions are found. In the elitism replacement technique, both parent and offspring populations are considered together as a single population. Then, this population is sorted in a nonincreasing order of their associated fitness value and the first half of the chromosomes from this combined population are selected as the chromosomes of the new population for the next generation.What is meant, within this context, by saying that two chromosomes are identical is that the loci of their genes are equal. Existence of the identical chromosomes is one of the critical problems for premature convergence. When large proportion of the chromosomes in the population are identical, the diversity of the population will be lost and premature convergence occurs. In order to overcome this problem, the filtration technique is used to add diversity to the new population. In this technique, one of the identical chromosomes is kept while the others are removed and replaced by new feasible chromosomes that are generated randomly. As the filtration procedure involves the process of “identifying,” “regenerating” and “reevaluating,” of the new chromosomes which requires a fair amount of computation time, it is sensible to just invoke the procedure everyR generation (where R is a parameter, e.g., 100) or when there is at least 10 percent of the population that are identical [20].


## 4. Computational Experiments

The multidimensional knapsack problem (MKP) is defined as a combinatorial optimization problem that is NP hard. The MKP problems have large application, which includes many applicable problems such as cargo loading, cutting stock, and bin-packing, among others. The goal of an MKP is to boost the sum of values of the items to be chosen from some specified set by means of taking multiple-resource restraints into consideration. This problem has been widely studied over many decades due both to theoretical interests and its broad applications in several fields, like engineering, operations research, management, and computer sciences. Elaborate literature on the MKP and its relations to different problems are published by Pisinger [33], Gavish and Pirkul [39], Martello and Toth [40], Chu and Beasley [41], and Freville and Plateau [42]. Basically, the MKP can be formulated as follows [43]. 						(4.1)max⁡⁡f(x1,x2,…,xn)=∑j=1npjxjs.t∑j=1nwijxij≤cii=1,2,…,m,xj∈{0,1}j=1,2,…,n,withpj>0,wij≥0,ci≥0,
where n:  number of objects; m: number of knapsacks; wij:  consumption of resource i for object j; ci: capacity of the ith knapsack; pj: profit associated with object j; and xj: decision variable with object  j.In this section, we present the computational results of the proposed FGA and the comparisons with other variants of heuristic and local search methods. The remaining parts of this section are organised as follows:(1)
The proposed sexual selection is compared with some selection mechanisms from the literature.(2)
The proposed FGA based on the crossover operator and probability selection technique is compared with some crossover operators with fixed probability from the literature.(3)
The proposed FGA based on the mutation operator and probability selection technique is compared with some mutation operators with fixed probability from the literature.(4)
The completed FGA (based on sexual selection, crossover, and mutation operators with their probability selection technique) is compared with some heuristic and local search algorithms from the literature, namely; GA by Chu and Beasley [41], simulated annealing by Qian and Ding [44], and heuristic algorithms by Magazine and Oguz [45], Volgenant and Zoon [46], and Pirkul [47].


### 4.1. Experimental Design

The benchmark dataset tested in this research is inclusive of 270 problem instances on the multidimensional knapsack problems as proposed by Chu and Beasley [41]. These problem instances have been extensively utilized in literature for the testing of MKP algorithms. These problems include n=100, 250, 500 variables and m=5,10,30 constraints. For each category of n variables, three tightness ratios are considered as α=0.25,0.50,0.75. This set of problems contains 27 different problem sets, each having 10 randomly generated instances, thus a total of 270 problems.In these problem sets,wijare drawn from discrete uniform generator U(0,1000) and the right hand side coefficients ci,i∈{1,…,m}, are set usingci=α∑j=1nwij where α is the tightness ratio. The objective function coefficientspj, j∈{1,…,m} are correlated to wijand are generated aspj=∑i=1m(wij/m)+500ej, where ej is a real number drawn from the continuous uniform generator U(0,1) [41]. The performance of these approaches is measured using the Percentage Deviation (PD) between the benchmark problems taken from the OR Library [48] and our results. That is,
(4.2)PD=|Bi-Ri|Bi×100%,
where Bi is the benchmark result and Ri is the computational result obtained by the proposed algorithm.All algorithms were coded in C++ and ran on a Pentium IV with 2.0 GHz CPU and 2.0 GB of RAM. For each problem instance, 30 runs were performed. In order to have a fair comparison between the algorithms in this experiment, we employed duration of 20 CPU seconds per run.


### 4.2. Computational Results of Selection Mechanisms

In this subsection, we present the computational results of the proposed sexual selection and the comparisons with other variants of selection mechanisms from the literature. The abbreviations of these methods are presented in Table9.Table 9
Abbreviation of selection mechanism.
Selection mechanismAbbreviationSexual selectionSXRoulette WheelRWTournament selectionTSLinear RankingLRStochastic Universal SamplingSUSTruncation selectionTRThe computational experiments reported here were performed using standard GAs (SGAs) with the initial population technique that is proposed by Chu and Beasley [41]. In these algorithms, the population size of 100, uniform crossover with probability,pc=0.70, and binary mutation with probability, pm=1/L, are considered. The replacement strategy is the technique explained in Section 3.7.Generally, the classical selection mechanisms are trying to keep better chromosomes in the population and consequently they tend to be biased toward certain genes. This would lead to premature convergence. In order to prevent premature convergence, diverse solutions and a good coverage of the solution landscape have to be provided in the population. To see whether the sexual selection provides a good coverage and to avoid the premature convergence, in the Figure6, there are the average PDs computed over 10 problem instances with 30 runs each for the selection mechanisms mentioned in Table 9 when the algorithms terminate at 20 CPU seconds per run.Figure 6
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on selection mechanisms.Results emphasised in Figure6 show that the sexual selection finds better and comparable solutions for three categories of standard, large size and more difficult problems described in [41]. Hence, the sexual selection is effective for keeping population diversity, avoiding premature convergence, and, consequently, finding better and comparable solutions.


### 4.3. Computational Results of FGA Based on the Crossover Operator and Probability Selection Technique

In this subsection, we present the computational results of the proposed FGA based on the crossover operator and probability selection technique named FGASC for solving the MKPs. In order to scrutinize the performance of the proposed FGASC, some commonly used crossover operators in binary encoding are considered. Common abbreviations of these operators were mentioned in Table4.The computational experiments reported here were performed by using SGAs with the initial population technique described in [41]. Once again, the population size is kept as 100, with the tournament selection of size two being used as the default selection mechanism, and the binary mutation with probability, pm=1/L, is considered. The replacement strategy is the technique explained in Section 3.7. The crossover operators listed in Table 4 are applied with a fixed crossover probability,pc=0.70 on the SGAs. The average PDs computed over 10 problem instances with 30 runs each of the SGAs and the FGASC when the algorithms terminate at 20 CPU seconds per run are shown in Figure 7.Figure 7
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on crossover operators.Figure7 presents the average PDs of SGAs and FGASC for three categories of standard, large size, and difficult MKPs. The results show that the FGASC performs significantly better than the SGAs. This shows that the FGASC is able to produce better quality solutions compared to SGAs in a fixed CPU time. There is clear evidence from Figure 7 that, on average, the FGASC is the best algorithm followed by the SGAs with SC, IC, UX, KPC, and finally the SGA with 2PC. The algorithms find problems of m=30 to be the most challenging. With other things (n and α) being equal, when we increase the value of m, then PD will increase.


### 4.4. Computational Results of FGA Based on the Mutation Operator and Probability Selection Technique

The computational results of the proposed FGA based on the mutation operator and probability selection technique called FGASM is presented in this subsection. In order to assess the performance of the proposed FGASM, some commonly used mutation operators in binary encoding mentioned in Table6 are considered.The computational experiments reported here were performed by using SGAs with the initial population technique introduced by [41]. In these algorithms, a population with size of 100, tournament selection of size two, 2-point crossover with fixed probability,pc=0.70, and a fixed mutation probability, pm=1/L, are considered. A 2-point crossover is used because this operator is weak in keeping the population diversity. Hence, the effect of the mutation operators towards the computational results will be more comparable. The replacement strategy is technique explained in Section 3.7. The average PDs of the comparison of the FGASM with the other mutation operators on SGAs are shown in Figure 8.Figure 8
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on mutation operators.Figure8 presents the average PDs computed over 10 problem instances with 30 runs each of the SGAs and FGASM for three categories of standard, large size, and difficult MKPs. As observed from Figure 8, the highest average PD is obtained by RM. The average PDs for SSCM, ISCM, CSCM, and PEM are better than that of BM, IM, and RM whereas the average PDs for FGASM are the best. Therefore, we can conclude that the mutation operator and probability selection technique are effective in keeping population diversity, avoiding premature convergence, and, consequently, finding better and comparable solutions for the MKPs.


### 4.5. Comparison of FGA with Heuristics and Local Search Algorithms

In this subsection, we present the results of the proposed complete FGA for solving the MKPs. In order to assess of the performance of the proposed FGA, the heuristics and local search algorithms found in the literature are considered. The abbreviations of these methods are presented in Table10.Table 10
Abbreviation of the heuristics and local search algorithms.
AlgorithmAbbreviationHeuristic by Magazine and OguzM&OHeuristic by Volgenant and ZoonV&ZHeuristic by PirkulMKHEURSimulated Annealing by Qian and DingSAGA by Chu and BeasleyGACBFuzzy Genetic AlgorithmFGAFor all these algorithms, since the original source codes were not available to us, we used the computational results presented in Chu and Beasley [41] and Qian and Ding [44]. The same benchmark problem instances are used for the computational experiments. The numerical results are computed after making 30 independent runs for statistical significance. Each run is terminated if one of the following stopping conditions is satisfied: (1)
the fitness value does not improved after 100 generations;(2)
the number of generations is equal to106; or(3)
the CPU time is more than 500 CPU seconds.Table11 directly compares the performance of the complete FGA with other well-known heuristics and local search algorithms by means of average PDs. The benchmark column represents the average computational results of 10 problem instances from each problem set of the MKPs that are compiled in [48]. For each algorithm, the entries report the average PD computed over 10 problem instances with 30 runs each, which is 300 runs. For each category of m, the final line gives the average PD over all values of n. The final line of Table 11 gives the overall average PD over all categories of m. The results acquired by the FGA show that the FGA is very effective for the three categories of standard, large size, and difficult MKPs. The reported PDs are a measure of how close the heuristic solution is to the linear programming optimum; therefore, much smaller values are expected if compared to the integer optimum. This can be partially verified by comparing the average percentage deviation columns given in Table 11. Finally, the ability of the FGA to generate optimal solutions is demonstrated in the last column, in which the FGA is able to find optimal values for many instances.Table 11
Computational results of FGA with heuristics and local search algorithms.
mnαBenchmarkHeuristics and local search algorithmsFGAM&OV&ZMKHEURSAGACB51000.2524197.2013.6910.301.592.950.990.120.5043252.906.716.900.771.670.450.080.7560471.005.115.860.480.870.320.012500.2560409.706.645.850.533.090.230.010.50109284.605.224.400.241.890.120.000.75151555.903.563.590.160.840.080.005000.25120615.504.934.110.223.410.090.000.50219503.102.962.530.082.040.040.000.75302354.902.312.410.060.920.030.00Average5.685.120.461.960.260.02101000.2522601.9015.8815.553.433.931.560.230.5045659.1010.4110.721.842.090.790.110.7559555.606.075.671.061.060.480.022500.2558993.9011.7310.531.073.210.510.020.50108706.406.835.920.572.140.250.010.75151330.404.423.770.331.010.150.005000.25118565.508.817.900.523.670.240.000.50217274.605.714.140.222.500.110.000.75302556.003.622.930.141.170.070.00Average8.167.461.022.310.460.04301000.2521654.6017.3917.219.024.942.910.530.5041431.3011.8210.193.512.621.340.280.7559199.106.585.922.031.290.830.062500.2556875.9013.5412.413.703.601.190.240.50106673.708.647.121.532.250.530.050.75150443.504.493.910.840.960.310.015000.25115473.509.849.621.893.750.610.050.50216156.907.105.710.732.300.260.000.75302353.403.723.510.481.070.170.00Average9.248.402.642.530.910.14Average7.696.991.372.270.540.07Table11 obviously indicates the transcendent of our proposed FGA over other heuristics and local search algorithms in terms of the quality of the solutions obtained. The average PDs between our best solution and the best-known solution of benchmark is between 0.00% and 0.14% whereas for other heuristics and local search algorithms are 0.26% and 0.91%. On the other hand, if we consider the average PDs for the three categories of standard, large size, and difficult MKPs together, the best average PDs for heuristics and local search algorithms is 0.543%, whereas this number for FGA is 0.068%.From another point of view, as can be seen in Figure9, the M&O and V&Z have the highest average PDs whereas the average PDs for SA, MKHEUR, and GACB algorithms are better than that of the M&O and V&Z algorithms with GACB being the best algorithm between them. However, Figure 9 shows the proposed FGA generates solutions that have much smaller average PDs than other algorithms in all cases. All the algorithms find problems of m=30to be the most challenging. With other things (n and α) being equal, when we increase the value of m, then PD will increase. Note that for all the algorithms, fewer generations are executed within the time limit as the number of knapsacks or constraints become larger.Figure 9
Average percentage deviation of FGA with heuristics and local search algorithms.


## 4.1. Experimental Design

The benchmark dataset tested in this research is inclusive of 270 problem instances on the multidimensional knapsack problems as proposed by Chu and Beasley [41]. These problem instances have been extensively utilized in literature for the testing of MKP algorithms. These problems include n=100, 250, 500 variables and m=5,10,30 constraints. For each category of n variables, three tightness ratios are considered as α=0.25,0.50,0.75. This set of problems contains 27 different problem sets, each having 10 randomly generated instances, thus a total of 270 problems.In these problem sets,wijare drawn from discrete uniform generator U(0,1000) and the right hand side coefficients ci,i∈{1,…,m}, are set usingci=α∑j=1nwij where α is the tightness ratio. The objective function coefficientspj, j∈{1,…,m} are correlated to wijand are generated aspj=∑i=1m(wij/m)+500ej, where ej is a real number drawn from the continuous uniform generator U(0,1) [41]. The performance of these approaches is measured using the Percentage Deviation (PD) between the benchmark problems taken from the OR Library [48] and our results. That is,
(4.2)PD=|Bi-Ri|Bi×100%,
where Bi is the benchmark result and Ri is the computational result obtained by the proposed algorithm.All algorithms were coded in C++ and ran on a Pentium IV with 2.0 GHz CPU and 2.0 GB of RAM. For each problem instance, 30 runs were performed. In order to have a fair comparison between the algorithms in this experiment, we employed duration of 20 CPU seconds per run.


## 4.2. Computational Results of Selection Mechanisms

In this subsection, we present the computational results of the proposed sexual selection and the comparisons with other variants of selection mechanisms from the literature. The abbreviations of these methods are presented in Table9.Table 9
Abbreviation of selection mechanism.
Selection mechanismAbbreviationSexual selectionSXRoulette WheelRWTournament selectionTSLinear RankingLRStochastic Universal SamplingSUSTruncation selectionTRThe computational experiments reported here were performed using standard GAs (SGAs) with the initial population technique that is proposed by Chu and Beasley [41]. In these algorithms, the population size of 100, uniform crossover with probability,pc=0.70, and binary mutation with probability, pm=1/L, are considered. The replacement strategy is the technique explained in Section 3.7.Generally, the classical selection mechanisms are trying to keep better chromosomes in the population and consequently they tend to be biased toward certain genes. This would lead to premature convergence. In order to prevent premature convergence, diverse solutions and a good coverage of the solution landscape have to be provided in the population. To see whether the sexual selection provides a good coverage and to avoid the premature convergence, in the Figure6, there are the average PDs computed over 10 problem instances with 30 runs each for the selection mechanisms mentioned in Table 9 when the algorithms terminate at 20 CPU seconds per run.Figure 6
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on selection mechanisms.Results emphasised in Figure6 show that the sexual selection finds better and comparable solutions for three categories of standard, large size and more difficult problems described in [41]. Hence, the sexual selection is effective for keeping population diversity, avoiding premature convergence, and, consequently, finding better and comparable solutions.


## 4.3. Computational Results of FGA Based on the Crossover Operator and Probability Selection Technique

In this subsection, we present the computational results of the proposed FGA based on the crossover operator and probability selection technique named FGASC for solving the MKPs. In order to scrutinize the performance of the proposed FGASC, some commonly used crossover operators in binary encoding are considered. Common abbreviations of these operators were mentioned in Table4.The computational experiments reported here were performed by using SGAs with the initial population technique described in [41]. Once again, the population size is kept as 100, with the tournament selection of size two being used as the default selection mechanism, and the binary mutation with probability, pm=1/L, is considered. The replacement strategy is the technique explained in Section 3.7. The crossover operators listed in Table 4 are applied with a fixed crossover probability,pc=0.70 on the SGAs. The average PDs computed over 10 problem instances with 30 runs each of the SGAs and the FGASC when the algorithms terminate at 20 CPU seconds per run are shown in Figure 7.Figure 7
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on crossover operators.Figure7 presents the average PDs of SGAs and FGASC for three categories of standard, large size, and difficult MKPs. The results show that the FGASC performs significantly better than the SGAs. This shows that the FGASC is able to produce better quality solutions compared to SGAs in a fixed CPU time. There is clear evidence from Figure 7 that, on average, the FGASC is the best algorithm followed by the SGAs with SC, IC, UX, KPC, and finally the SGA with 2PC. The algorithms find problems of m=30 to be the most challenging. With other things (n and α) being equal, when we increase the value of m, then PD will increase.


## 4.4. Computational Results of FGA Based on the Mutation Operator and Probability Selection Technique

The computational results of the proposed FGA based on the mutation operator and probability selection technique called FGASM is presented in this subsection. In order to assess the performance of the proposed FGASM, some commonly used mutation operators in binary encoding mentioned in Table6 are considered.The computational experiments reported here were performed by using SGAs with the initial population technique introduced by [41]. In these algorithms, a population with size of 100, tournament selection of size two, 2-point crossover with fixed probability,pc=0.70, and a fixed mutation probability, pm=1/L, are considered. A 2-point crossover is used because this operator is weak in keeping the population diversity. Hence, the effect of the mutation operators towards the computational results will be more comparable. The replacement strategy is technique explained in Section 3.7. The average PDs of the comparison of the FGASM with the other mutation operators on SGAs are shown in Figure 8.Figure 8
Average percentage deviation between three categories of standard, large size, and difficult MKPs based on mutation operators.Figure8 presents the average PDs computed over 10 problem instances with 30 runs each of the SGAs and FGASM for three categories of standard, large size, and difficult MKPs. As observed from Figure 8, the highest average PD is obtained by RM. The average PDs for SSCM, ISCM, CSCM, and PEM are better than that of BM, IM, and RM whereas the average PDs for FGASM are the best. Therefore, we can conclude that the mutation operator and probability selection technique are effective in keeping population diversity, avoiding premature convergence, and, consequently, finding better and comparable solutions for the MKPs.


## 4.5. Comparison of FGA with Heuristics and Local Search Algorithms

In this subsection, we present the results of the proposed complete FGA for solving the MKPs. In order to assess of the performance of the proposed FGA, the heuristics and local search algorithms found in the literature are considered. The abbreviations of these methods are presented in Table10.Table 10
Abbreviation of the heuristics and local search algorithms.
AlgorithmAbbreviationHeuristic by Magazine and OguzM&OHeuristic by Volgenant and ZoonV&ZHeuristic by PirkulMKHEURSimulated Annealing by Qian and DingSAGA by Chu and BeasleyGACBFuzzy Genetic AlgorithmFGAFor all these algorithms, since the original source codes were not available to us, we used the computational results presented in Chu and Beasley [41] and Qian and Ding [44]. The same benchmark problem instances are used for the computational experiments. The numerical results are computed after making 30 independent runs for statistical significance. Each run is terminated if one of the following stopping conditions is satisfied: (1)
the fitness value does not improved after 100 generations;(2)
the number of generations is equal to106; or(3)
the CPU time is more than 500 CPU seconds.Table11 directly compares the performance of the complete FGA with other well-known heuristics and local search algorithms by means of average PDs. The benchmark column represents the average computational results of 10 problem instances from each problem set of the MKPs that are compiled in [48]. For each algorithm, the entries report the average PD computed over 10 problem instances with 30 runs each, which is 300 runs. For each category of m, the final line gives the average PD over all values of n. The final line of Table 11 gives the overall average PD over all categories of m. The results acquired by the FGA show that the FGA is very effective for the three categories of standard, large size, and difficult MKPs. The reported PDs are a measure of how close the heuristic solution is to the linear programming optimum; therefore, much smaller values are expected if compared to the integer optimum. This can be partially verified by comparing the average percentage deviation columns given in Table 11. Finally, the ability of the FGA to generate optimal solutions is demonstrated in the last column, in which the FGA is able to find optimal values for many instances.Table 11
Computational results of FGA with heuristics and local search algorithms.
mnαBenchmarkHeuristics and local search algorithmsFGAM&OV&ZMKHEURSAGACB51000.2524197.2013.6910.301.592.950.990.120.5043252.906.716.900.771.670.450.080.7560471.005.115.860.480.870.320.012500.2560409.706.645.850.533.090.230.010.50109284.605.224.400.241.890.120.000.75151555.903.563.590.160.840.080.005000.25120615.504.934.110.223.410.090.000.50219503.102.962.530.082.040.040.000.75302354.902.312.410.060.920.030.00Average5.685.120.461.960.260.02101000.2522601.9015.8815.553.433.931.560.230.5045659.1010.4110.721.842.090.790.110.7559555.606.075.671.061.060.480.022500.2558993.9011.7310.531.073.210.510.020.50108706.406.835.920.572.140.250.010.75151330.404.423.770.331.010.150.005000.25118565.508.817.900.523.670.240.000.50217274.605.714.140.222.500.110.000.75302556.003.622.930.141.170.070.00Average8.167.461.022.310.460.04301000.2521654.6017.3917.219.024.942.910.530.5041431.3011.8210.193.512.621.340.280.7559199.106.585.922.031.290.830.062500.2556875.9013.5412.413.703.601.190.240.50106673.708.647.121.532.250.530.050.75150443.504.493.910.840.960.310.015000.25115473.509.849.621.893.750.610.050.50216156.907.105.710.732.300.260.000.75302353.403.723.510.481.070.170.00Average9.248.402.642.530.910.14Average7.696.991.372.270.540.07Table11 obviously indicates the transcendent of our proposed FGA over other heuristics and local search algorithms in terms of the quality of the solutions obtained. The average PDs between our best solution and the best-known solution of benchmark is between 0.00% and 0.14% whereas for other heuristics and local search algorithms are 0.26% and 0.91%. On the other hand, if we consider the average PDs for the three categories of standard, large size, and difficult MKPs together, the best average PDs for heuristics and local search algorithms is 0.543%, whereas this number for FGA is 0.068%.From another point of view, as can be seen in Figure9, the M&O and V&Z have the highest average PDs whereas the average PDs for SA, MKHEUR, and GACB algorithms are better than that of the M&O and V&Z algorithms with GACB being the best algorithm between them. However, Figure 9 shows the proposed FGA generates solutions that have much smaller average PDs than other algorithms in all cases. All the algorithms find problems of m=30to be the most challenging. With other things (n and α) being equal, when we increase the value of m, then PD will increase. Note that for all the algorithms, fewer generations are executed within the time limit as the number of knapsacks or constraints become larger.Figure 9
Average percentage deviation of FGA with heuristics and local search algorithms.


## 5. Conclusion

This paper proposed some techniques for the measurement of the population diversity based on the phenotype and genotype properties. The contributions of this study are the sexual selection, the crossover and mutation operators, and probabilities selection techniques based on the population diversity using fuzzy logic controllers. The proposed fuzzy genetic algorithm is compared to other heuristic and local search algorithms for solving the multidimensional 0/1 knapsack problems. Extensive computational experiments are carried out to assess the effectiveness of the proposed algorithms compared to other metaheuristic proposed in the literature. The computational results showed that the proposed sexual selection and FGAs are competitive and capable of generating near optimal solutions.



---

*Source: 703601-2012-04-30.xml*