optimize_evolve
Evolves solutions to combinatorial or discrete optimization problems (e.g., feature selection, allocation, permutation) using a genetic algorithm with optional multi-objective Pareto frontier.
Instructions
Genetic algorithm for combinatorial / discrete optimization with optional Pareto frontier for multi-objective problems. Use when the search space is discrete or mixed (binary feature selection, integer allocation, permutation problems like TSP), or when you want to explore multiple non-dominated solutions. For continuous black-box parameters, use optimize_cmaes — it converges faster on smooth objectives. Stochastic: same input gives different best chromosome each run. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geneLength | Yes | Number of genes (variables) per chromosome. | |
| bounds | No | ||
| fitnessWeights | No | Per-gene weights in the default linear fitness sum. Length should equal geneLength. | |
| populationSize | No | Default: 100, capped at 500. | |
| maxGenerations | No | Default: 100, capped at 500. | |
| mutationRate | No | Per-gene mutation probability (default: 0.01). | |
| crossoverRate | No | Crossover probability (default: 0.8). | |
| selectionMethod | No | Default: tournament. | |
| crossoverMethod | No | Default: single-point. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bestChromosome | Yes | ||
| paretoFrontier | No | Non-dominated solutions (multi-objective only). | |
| convergenceGeneration | No | Generation at which best fitness stopped improving. | |
| totalGenerations | Yes | ||
| executionTimeMs | No | ||
| fitnessHistory | No | Last 20 generations' best fitness. |