SimonBlanke/Gradient-Free-Optimizers

Lightweight optimization with local, global, population-based and sequential techniques across mixed search spaces

What it solves

Gradient-Free-Optimizers (GFO) provides a unified way to optimize "black-box" functions where gradients are unavailable, impractical, or non-existent. It simplifies the process of finding the best parameters for a given objective function across complex search spaces that combine different types of data (continuous, discrete, categorical, and distribution-backed).

How it works

The library implements 23 different optimization algorithms categorized into local search, global search, population-based, and sequential model-based techniques (such as Bayesian optimization). Users define an objective function to maximize and a search space. The optimizer then proposes parameters, evaluates them via the objective function, and uses its internal strategy to iteratively improve the score.

Who it’s for

It is designed for developers and researchers working on hyperparameter tuning for machine learning models, simulation optimization, feature selection, and engineering design.

Highlights

  • Unified API: Switch between 23 different algorithms with a single line of code change.
  • Mixed Search Spaces: Supports continuous ranges, discrete grids, categorical choices, and SciPy distributions in one space.
  • Built-in Memory: Caching prevents redundant evaluations of expensive objective functions.
  • Minimal Dependencies: Requires only NumPy and pandas, making it suitable for embedded systems or minimal containers.
  • Casting and Constraints: Supports constraint functions to automatically avoid invalid regions of the search space.

Related

  • Project
  • Project
  • Project
  • Project
  • Project