A Comparative Study between Haploid Genetic Algorithms and Diploid Genetic Algorithms
This paper compares two forms of genetic algorithm. A haploid genetic algorithm stores one chromosome in each individual. The tested diploid genetic algorithm stores two chromosomes and evaluates their pointwise average.
The authors report better objective values from the diploid algorithm across a broad benchmark set. The diploid algorithm usually takes more time. This result supports further testing, but it does not establish that diploidy is always superior.
Purpose
A genetic algorithm can converge too early. Selection then makes the population similar, crossover loses useful variation, and the search can stop at a local optimum.
The paper tests whether a two-chromosome representation can reduce this problem. It compares solution quality, execution time, convergence, population spread, and crossover behaviour.
Nature of the method
A standard genetic algorithm is haploid in this paper. Each individual contains one real-valued chromosome. That chromosome also specifies the candidate solution that the objective function evaluates.
A diploid individual contains two real-valued chromosomes of equal length. At each locus, the algorithm averages the two gene values. The resulting vector is the expressed phenotype.
| Element | Haploid algorithm | Diploid algorithm |
|---|---|---|
| Stored genotype | One chromosome | Two chromosomes |
| Candidate solution | The stored chromosome | The pointwise mean of both chromosomes |
| Objective evaluation | Evaluate the chromosome | Evaluate the averaged phenotype |
| Recombination | Combine two parent chromosomes | Combine chromosomes or derived gametes from two diploid parents |
| Storage per individual | One vector of length D | Two vectors of length D |
This method does not implement a learned dominant or recessive allele. Both chromosomes influence every expressed gene equally. The tested system is therefore one specific form of diploid genetic algorithm.
Core mechanism
Genotype and phenotype
Let the two chromosomes be C1 and C2. Each chromosome has D real-valued genes. The expressed gene at locus i is the mean of the two stored values at that locus.
The objective function receives only the expressed phenotype. Selection therefore acts on the average, while recombination and mutation act on the two stored chromosomes.
This separation can preserve hidden variation. Two individuals can express similar phenotypes while storing different chromosome pairs. Later crossover can expose that stored variation.
Selection
The experiments use roulette-wheel selection. A candidate with higher fitness receives a higher probability of selection.
The paper defines fitness as the benchmark objective and minimises every benchmark. It then gives a roulette formula that favours larger objective values. These two statements are incompatible if implemented literally.
An implementation must convert a minimisation objective into an increasing fitness measure. A rank-based or tournament selector can also remove this ambiguity.
Crossover
Two diploid parents contain four source chromosomes. The tested operators combine these sources in several ways and can produce more offspring than a haploid crossover.
- Discrete operators exchange one segment, two segments, or individual genes.
- Arithmetic operators form weighted combinations of corresponding genes.
- Blend crossover samples genes from an interval around parental values.
- Max-min arithmetic crossover adds locus-wise minimum and maximum offspring.
- Linear crossover creates three gametes per parent and combines them into nine offspring.
The main comparison uses two-point crossover. A later experiment compares nine crossover settings drawn from seven operator families.
Mutation
Mutation changes random loci on both chromosomes. The experiments use a mutation rate of 0.05. The paper does not specify the mutation distribution in enough detail for exact reproduction.
Implementation procedure
- Choose a real-valued chromosome of length D for the optimisation problem.
- Create each diploid individual as two chromosomes within the permitted variable bounds.
- Average corresponding genes to create the expressed phenotype.
- Evaluate the objective function on that phenotype.
- Convert objective values into a valid selection measure.
- Select parent pairs and apply one diploid crossover operator.
- Mutate loci on both chromosomes and enforce the variable bounds.
- Form the next population and continue until the evaluation budget ends.
- Return the best expressed phenotype, not an unexpressed chromosome.
Use an equal objective-evaluation budget when you compare the haploid and diploid forms. Equal population sizes do not imply equal work because the diploid operators create more candidates.
Experimental setup
| Problems | 17 continuous benchmark functions |
|---|---|
| Dimensions | 25 and 50 |
| Runs | 30 per condition |
| Generations | 200 |
| Population | 1,000 individuals in the equal-size comparison |
| Mutation rate | 0.05 |
| Crossover | Two-point crossover with probability 1.0 |
| Selection | Roulette wheel |
| Implementation | Java on one Intel Core i3-8100 system |
The authors also compare smaller diploid populations with larger haploid populations. They test 500 diploid individuals against 1,000 haploid individuals, then 1,000 against 2,000.
Reported results
Equal population sizes
The diploid algorithm reports a better mean best value on all 17 functions at both dimensions. Reported improvements vary widely across functions and dimensions.
At dimension 25, the paper reports improvements from 7.40% to 94.67%. At dimension 50, it reports improvements from 8.48% to 83.97%.
The diploid runs usually take about 2.5 to 3.5 times as long. The extra work comes from storing, recombining, and mutating two chromosomes.
Smaller diploid populations
The smaller diploid populations usually report better objective values with similar execution times. This comparison is more useful because it partly controls the extra representation cost.
One reported value conflicts with the paper’s general conclusion. For the 50-dimensional Ridge function, Table 6 gives -1.4667 for HGA and -0.4346 for DGA.
The stated minimum is -5 on the tested domain. The haploid value is therefore better in that row. The printed improvement of 42.58% does not follow from those values.
Crossover comparison
The diploid form usually reports a better mean for every crossover setting. Several blend and linear settings approach the known optimum on some functions.
Four settings produce ties at the optimum. These are one Rastrigin setting and three Step-function settings.
Convergence and population spread
The haploid algorithm converges three to 24 generations earlier in the displayed cases. The authors interpret this speed as premature convergence toward local optima.
The paper defines population diversity as the difference between the worst and best objective values in one generation. By this measure, the haploid populations are usually more diverse.
The authors nevertheless argue that the diploid population searches more thoroughly. Their diversity measure does not directly test genotype diversity or coverage of the search space.
When to use the method
Consider this diploid representation for continuous black-box optimisation when premature convergence is a serious risk. It is most plausible for multimodal landscapes and inexpensive objective functions.
The method is also useful as a diversity-preserving baseline. It offers a simple alternative to niching, immigration, fitness sharing, or restricted mating.
Do not select it only because the paper reports universal superiority. Test it against a strong standard algorithm under the same evaluation and time budgets.
Avoid it when each objective evaluation is expensive unless a small diploid population compensates for the added work. Measure this trade-off on the target problem.
Limits and failure points
The result concerns one diploid design
The phenotype is always the pointwise mean of two chromosomes. Other dominance rules, discrete encodings, and ploidy mechanisms can behave differently.
The main comparison does not equalise computation
Equal population sizes give the diploid algorithm more stored genes and more recombination work. The paper reports time, but it does not equalise objective evaluations.
The diversity measure is indirect
A best-to-worst objective range measures fitness spread. It does not measure genotype distance, phenotype coverage, lineage survival, or occupancy of distinct basins.
The statistical evidence is incomplete
The paper reports means and standard deviations but no confidence intervals or hypothesis tests. Many standard deviations are extremely small despite stochastic runs and non-optimal means.
The paper does not give random seeds, source code, or full run data. These omissions prevent a direct audit of the unusual variance values.
Some benchmark descriptions are inconsistent
Several function properties or optima conflict with the printed formulas. For example, the Rastrigin function is not globally convex on the stated domain.
The Exponential function is described with a minimum of zero, but its formula and tables use -1. The separability list also conflicts with earlier function descriptions.
The selection rule needs correction
The printed roulette formula favours large objective values, while the problems require minimisation. A user must supply a valid fitness transformation or another selector.
The mechanism remains a hypothesis
The results show a performance difference in the reported experiments. They do not show that hidden genetic variation or better search-space coverage caused that difference.
External validity is narrow
The test set contains continuous numerical functions at two dimensions. It does not cover constrained, combinatorial, noisy, dynamic, or expensive real-world objectives.
Extent of the result
The paper gives evidence that an averaged two-chromosome representation can improve a particular real-coded genetic algorithm on common continuous benchmarks.
The evidence also shows a cost. With equal population sizes, the diploid algorithm takes substantially more time and converges more slowly.
The paper does not prove that diploid genetic algorithms are always better. It does not isolate the causal mechanism or provide enough material for exact reproduction.
The practical conclusion is conditional. Treat diploidy as an algorithmic option that can trade extra representation and search work for better final objective values.
Operating checklist
- Define the phenotype rule explicitly.
- Use a minimisation-safe selection method.
- Count objective evaluations, offspring, memory, and wall time.
- Compare equal evaluation budgets and equal time budgets.
- Measure genotype and phenotype diversity separately.
- Use independent seeds and publish per-run results.
- Test against tuned haploid, niching, and restart baselines.
- Report uncertainty and correct for multiple benchmark comparisons.
- Validate the method on the actual problem class before adoption.
Citation
Petrovan, Adrian, Oliviu Matei, and Petrică C. Pop. 2023. “A Comparative Study between Haploid Genetic Algorithms and Diploid Genetic Algorithms.” Carpathian Journal of Mathematics 39 (2): 433–458. https://doi.org/10.37193/CJM.2023.02.08.
This primer is a critical technical summary of the paper. It is not an independent replication.