|
| static std::string | makeFrameName (const std::string &baseName, size_t iter) |
| | Generate frame filename for GA population evolution.
|
| |
| static void | savePopulationFrame2D (const std::string &baseName, size_t iter, const std::vector< opt::GA::Individual > &pop) |
| | Save population snapshot for 2D visualization.
|
| |
| static void | savePopulationFrame3D (const std::string &baseName, size_t iter, const std::vector< opt::GA::Individual > &pop) |
| |
| void | runSphereTest (opt::GA &ga, const opt::Coordinates &lower, const opt::Coordinates &upper) |
| |
| void | runBoundaryTest (opt::GA &ga, const opt::Coordinates &lower, const opt::Coordinates &upper) |
| |
| void | runRastriginTest (opt::GA &, int dim) |
| |
| void | runVisualGABenchmark () |
| |
| void | runVisualGA3DBenchmark () |
| |
| void | runOptimizationBenchmarksGA () |
| |
Genetic Algorithm benchmark suite with visualization.
Comprehensive testing of GA performance with frame-based animation support:
Features:
- Multi-problem benchmark suite (sphere, Rastrigin, Rosenbrock, Ackley)
- Population evolution visualization via frame snapshots
- Real-time convergence tracking
- Comparative analysis of GA vs PSO
Test Problems:
- Sphere: f(x,y) = x² + y², easy unimodal problem
- Rastrigin: Highly multimodal, 25+ local minima in [-5.12, 5.12]²
- Rosenbrock: Long narrow valley, requires fine-tuning
- Ackley: Many local minima with large global basin
Visualization:
- Frame output saved to ga_frames/ subdirectory
- Each iteration generates population snapshot
- Files named: baseName_iter_0.dat, baseName_iter_1.dat, etc.
- Ready for gnuplot animation script generation
- See also
- GA, Optimizer, OptimizationMode
Definition in file ga_benchmarks.cpp.