Explore solution candidates across bounded ranges and parameters. Track convergence, diversity, elitism, and objective performance. Tune operators carefully for stronger, faster mathematical optimization outcomes.
Use the settings below to search for the best candidate solution across your chosen interval.
These examples illustrate typical solver configurations and representative outputs.
| Example | Function | Goal | Range | Population | Generations | Sample Best x | Sample Best f(x) |
|---|---|---|---|---|---|---|---|
| 1 | f(x) = -x² + 6x - 2 | Maximize | [-10, 10] | 60 | 80 | ≈ 3.0000 | ≈ 7.0000 |
| 2 | f(x) = x³ - 4x² + x + 5 | Minimize | [-3, 5] | 90 | 120 | ≈ 2.5350 | Illustrative |
| 3 | f(x) = 5sin(2x) + 0.5x | Maximize | [0, 8] | 70 | 100 | Depends on phase | Illustrative |
1. Chromosome decoding
Each binary chromosome maps to a real value using:
x = lower + (decimal / (2^bits - 1)) × (upper - lower)
2. Objective evaluation
The decoded value is inserted into the selected function. Supported models include quadratic, cubic, quartic, sinusoidal-linear, and gaussian-linear forms.
3. Fitness transformation
For maximization, fitness is raw - min(raw) + ε.
For minimization, fitness is max(raw) - raw + ε.
4. Genetic operators
Tournament selection chooses stronger parents. Single-point crossover mixes chromosomes. Mutation flips bits using the chosen mutation rate. Elitism preserves top solutions between generations.
It searches a bounded interval for the best real-valued x that maximizes or minimizes your chosen objective model using a genetic algorithm.
Genetic algorithms work well when derivatives are unavailable, the landscape is noisy, or multiple local optima make conventional methods harder to apply reliably.
More bits increase search resolution and enlarge the search space. That can improve precision, but it may require more generations or a larger population.
Use moderate crossover for mixing strong solutions and low mutation for controlled exploration. Very high mutation can destroy progress, while very low mutation can stall diversity.
Elitism copies the best chromosomes into the next generation unchanged. This helps preserve strong candidates and usually stabilizes convergence speed.
The algorithm starts with random populations and random genetic events. Different runs can explore different regions before converging toward strong candidates.
Yes. Choose the minimize option. The calculator transforms raw objective values into positive selection fitness while still reporting the original objective output.
The chart shows best objective, average objective, and population diversity by generation. Together they reveal progress, stability, and exploration balance.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.