← all repositories
100/Solid

Gradient-free optimization without the gradient of a learning curve

A Python toolkit that bundles seven classic metaheuristics into a uniform inheritance-based API for rapid prototyping.

584 stars Python ML FrameworksOther AI
Solid
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

Solid wraps seven derivative-free optimization algorithms—genetic algorithms, evolutionary algorithms, simulated annealing, particle swarm, tabu search, harmony search, and stochastic hill climbing—into a single Python library. You subclass an algorithm, implement a handful of abstract methods (_fitness, _crossover, etc.), and call .run(). The README promises “very rapid development” and positions the library as teaching-friendly and hackable.

The interesting bit

The uniform API is the quiet virtue here. Every algorithm exposes the same .run() contract, so swapping simulated annealing for particle swarm is a one-line import change. The “clout” string-matching example in the README is toy-sized, but it makes the inheritance pattern obvious in ten lines of code.

Key highlights

  • Seven algorithms under one roof: GA, EA, simulated annealing, PSO, tabu search, harmony search, stochastic hill climb
  • Install via pip install solidpy
  • Abstract base classes enforce a consistent interface across all optimizers
  • Returns best solution and objective value from every .run() call
  • Test suite included; uses pytest

Caveats

  • Documentation lives on a GitHub Pages site; the README itself is sparse on configuration details and parameter tuning guidance
  • No performance benchmarks or comparison tables are provided
  • Travis CI badge suggests the project may not have migrated to modern CI

Verdict

Solid suits researchers, students, or practitioners who need to test multiple metaheuristics quickly without wrestling with disparate APIs. If you need production-grade convergence guarantees or GPU-accelerated population methods, look elsewhere.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.