# New Insights into Fuzzy Genetic Algorithms for Optimization Problems
## 2 Fuzzy Genetic Algorithms: Dealing with Individuals and Fitness
### Gfga  
The original method splits the whole population into two groups with different genders. While in standard GAs, a crossover between any two individuals is possible, in the GFGA, this is possible only for opposite-gender individuals, as it works in nature. Moreover, selection rules are entirely different for male and female genomes. Some male genomes are randomly selected and matched with female genomes based on population diversity and male genomes' age via fuzzy rules. Each genome has an age, which is simply the number of iterations that have passed since its initialization. Selection is applied based on the maximum age of the individual; when its age is greater than the maximum age, the genome is removed from the population.  
The linguistic variable _age_ has four terms: _[Infant, Teenager, Adult, Elderly]_. The term set for the population diversity is _[Very Low, Low, Medium, High]_. At the selection stage, males are selected randomly, and the age of female partners is estimated based on the age of male partners and population diversity using fuzzy rules. Then, a partner with the age closest to the desired one is selected, and crossover is performed.  
**Remark 2**.: _The term set for age and partner age could be the following (where \(N_{age}=N_{partner-age}\)):_  
* _[Infant, Child, Teenager, Adult, Elderly];_
* _[Newborn, Infant, Toddler, Child, Teenager, Adult, Elderly];_  
_including more linguistic attributes._  
_Similarly, the term set for diversity could be the following:_  
* _[Very Low, Low, Medium, High, Very High];_
* _[Extremely Low, Very Low, Low, Medium, High, Very High, Extremely High];_  
Notice that for the highest age term, the second-highest age term for potential partners is prioritized if there is the highest diversity. With the lowest two diversity terms, there is the lowest age term for potential partners. Hence, the general rule can be written as follows:  
IF age IS term_i AND diversity IS term_j THEN partner_age IS term_{2N-(i+j)+2}} except for the lowest diversity term or the highest age term and second-lowest diversity term:  
IF (age IS term_i AND diversity is term_1) OR (age IS term_N AND diversity IS term_2) THEN partner_age IS term_1.  
Let us assume \(N_{age}=N_{partner\_age}=N_{diversity}=5\), for example. Then the following rule is obtained:  
IF age IS adult AND diversity IS high THEN partner_age IS adult since the index of the age and diversity terms is 4, resulting in an index for the partner age, which equals 4.  
For \(N_{age}=N_{partner\_age}=N_{diversity}=7\), a similar rule is obtained:  
IF age IS adult AND diversity IS very high THEN partner_age IS adult since the index of the age and diversity terms is 5, resulting in an index for the partner age, which equals 6.  
For low and very low diversity, the following rule holds with \(N_{age}=N_{partner\_age}=N_{diversity}=5\).  
IF (age IS adult AND diversity is very low) OR (age IS elderly AND diversity IS low) THEN partner_age IS infant.  
Let \(m\) and \(M\) be the minimum and the maximum age in the population, and let \(n\) and \(P\) denote the population size and half of the population, respectively. The population _diversity_ linguistic variable is defined as follows:  
\[D_{pop}(P)=\begin{cases}\begin{array}{ll}\text{{very}}&\text{{high}}&P\leq L+t \\ \text{{high}}&m+t<P\leq m+t+1\\ \text{{medium}}&m+t+1<P\leq m+t+2\\ \text{{low}}&m+t+2<P\leq m+t+3\\ \text{{very}}&\text{{low}}&P>m+t+3\end{array}\end{cases} \tag{5}\]  
where \(t=\left[\lambda\frac{m+M}{n}\right]\), \(\lambda=\left[\frac{n}{10}\right]\), with \([.]\) denoting the rounding operation returning the nearest integer number.  
Figure 4 shows the _diversity_ variable (5) with trapezoidal MFs.