An evolutionary optimization library for Go implementing genetic algorithms, particle swarm optimization, differential evolution, and other algorithms.
eaopt is an evolutionary optimization library for the Go programming language that implements a variety of metaheuristic algorithms, including genetic algorithms, particle swarm optimization, and differential evolution. It solves optimization problems where gradient-based methods are unsuitable, such as non-differentiable, discontinuous, or black-box functions.
Go developers and researchers working on optimization problems in machine learning, engineering, or scientific computing who need robust, gradient-free optimization methods.
It provides a unified, extensible API for multiple evolutionary algorithms, parallel evaluation capabilities, and the flexibility to customize genetic operators, making it a versatile choice for complex real-world optimization tasks.
:four_leaf_clover: Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a unified API for genetic algorithms, particle swarm optimization, differential evolution, and more, allowing easy switching between methods for different problem types, as detailed in the README's features section.
The GA struct serves as a generic backbone, enabling users to define custom mutation, crossover, selection, and other operators, which is emphasized in the philosophy of separating problem definition from optimization mechanics.
Supports parallel function evaluation to speed up optimization for costly objective functions, with configurable settings in GAConfig, though the README advises caution for cheap functions due to overhead.
Users implement the Genome interface to encapsulate any problem domain, making the library adaptable to diverse optimization tasks, from real-valued functions to combinatorial problems like TSP, as shown in examples.
Requires users to fully implement the Genome interface—including Evaluate, Mutate, Crossover, and Clone methods—for each new problem, which demands substantial coding and understanding of evolutionary concepts, limiting quick adoption.
Setting up algorithms involves tuning numerous parameters (e.g., population sizes, migration frequencies, models), which can be error-prone and daunting without expertise, as highlighted in the detailed GAConfig section.
Parallel evaluation may introduce unnecessary overhead for cheap objective functions, and the evolutionary approach itself is less efficient than gradient-based methods for differentiable problems, as admitted in the FAQ.