eaopt  by MaxHalford

Go library for evolutionary optimization (genetic algorithm, PSO, differential evolution)

created 9 years ago
902 stars

Top 41.2% on sourcepulse

GitHubView on GitHub
Project Summary

This Go library provides a flexible framework for evolutionary optimization, targeting researchers and engineers who need to solve complex problems without gradient information. It offers implementations of various evolutionary algorithms, including Genetic Algorithms (GA), Particle Swarm Optimization (PSO), and Differential Evolution (DE), allowing users to optimize functions by exploring the search space through breeding and mutation.

How It Works

The core of eaopt is its Genome interface, which abstracts the problem-specific logic. Users implement this interface to define how solutions (genomes) are evaluated, mutated, crossed over, and cloned. This design allows most algorithms to be implemented as special cases of a flexible Genetic Algorithm, enabling customization of operators and models (e.g., generational, steady-state) for tailored optimization strategies. Advanced features like speciation and multi-population migration are also supported.

Quick Start & Requirements

  • Install: go get github.com/MaxHalford/eaopt
  • Prerequisites: Go programming language.
  • Example: The README provides a detailed Go example for minimizing the Drop-Wave function using a Genetic Algorithm.

Highlighted Details

  • Implements GA, PSO, DE, OpenAI Evolution Strategy, Hill Climbing, and Simulated Annealing.
  • Supports advanced GA features: speciation, migration, multiple populations.
  • Customizable evolution models and genetic operators.
  • Parallel evaluation and initialization options for performance.

Maintenance & Community

  • The project is maintained by MaxHalford.
  • Contributions are welcomed, with guidelines provided in the CONTRIBUTING file.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

  • While powerful for gradient-free optimization, eaopt may not outperform gradient-based methods on differentiable functions where local optima are not a concern.
  • Parallelism benefits are most pronounced for computationally expensive Evaluate methods; overhead may negate benefits for cheap evaluations.
Health Check
Last commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Nathan Lambert Nathan Lambert(AI Researcher at AI2), and
1 more.

tianshou by thu-ml

0.1%
9k
PyTorch RL library for algorithm development and application
created 7 years ago
updated 4 days ago
Feedback? Help us improve.