Skip to main content

Reinforcement Learning for Everyone.

Project description

MetaHeurOpt

PyPI - License PyPI - Version PyPI - Python Version PyPI Downloads

Here is the rest of the README.md for your package. I have researched the original citations for each algorithm to ensure the table is academically complete.

Description

MetaHeurOpt is a modular Python library designed for the execution, benchmarking, and statistical analysis of metaheuristic optimization algorithms. It provides a standardized framework to compare diverse algorithms—ranging from classic evolutionary strategies to modern physics-inspired and swarm intelligence models—on complex continuous optimization problems.

Installation

You can install the stable version of MetaHeurOpt directly from PyPI:

pip install metaheuropt

Usage Example

Below is a quick start guide to comparing solvers. For a more detailed walkthrough, including statistical tables and 3D landscape visualization, check out the /examples/example.ipynb notebook.

import numpy as np
from metaheuropt.solvers import GA, PSO
from metaheuropt.core import Optimizer
from metaheuropt.analysis import ResultsAnalyzer

# 1. Define your objective function
def sphere(x):
    return np.sum(np.square(x))

# 2. Configure experiment
dims = 10
bounds = (np.array([-5.12] * dims), np.array([5.12] * dims))
num_runs = 5
max_iter = 100

# 3. Select solvers
solvers = [
    GA(bounds=bounds, pop_size=50, max_iter=max_iter),
    PSO(bounds=bounds, pop_size=50, max_iter=max_iter),
]

# 4. Run optimization
opt = Optimizer(solvers=solvers, obj_func=sphere, num_runs=num_runs)
opt.run(save_results=True, results_folder="demo_results")

# 5. Analyze and visualize
analyzer = ResultsAnalyzer("demo_results")
analyzer.plot_convergence()
analyzer.perform_stats(full=True)

Available Algorithms

The library currently supports the following high-performance metaheuristics:

Code Name Original Reference
GA Genetic Algorithm K. F. Man et al. (1976)
PSO Particle Swarm Optimization Kennedy & Eberhart (1995)
MVO Multi-Verse Optimizer Mirjalili et al. (2016)
CMA-ES Covariance Matrix Adaptation Evolution Strategy Hansen & Ostermeier (2001)
GWO Grey Wolf Optimizer Mirjalili et al. (2014)
JADE Adaptive Differential Evolution with Archive Zhang & Sanderson (2009)
NSGA-II Non-dominated Sorting Genetic Algorithm II Deb et al. (2002)
WOA Whale Optimization Algorithm Mirjalili & Lewis (2016)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metaheuropt-0.0.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metaheuropt-0.0.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file metaheuropt-0.0.1.tar.gz.

File metadata

  • Download URL: metaheuropt-0.0.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metaheuropt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81a152a138675b601c951d43f8b1b3e84beab278614c83cc8b4b90b531dd4e54
MD5 300adcdc9d8d311258af995f0876fbb3
BLAKE2b-256 ddb051b5042a7ace58d3593e81b13b1e0b8fe06c2c3141574ef6431372a4b2be

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaheuropt-0.0.1.tar.gz:

Publisher: python-publish.yml on alejotoro-o/metaheuropt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metaheuropt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: metaheuropt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for metaheuropt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06560d5444dee7a76d8f5767df2d9e2166b6cfb4ee0f07a53387997d02676a04
MD5 f12655f8ff06cf4c01af1a16d1469356
BLAKE2b-256 df42f09c5581448faeddf084bab0e1fedbef60bf0340ff57dec6976eb3c08dfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaheuropt-0.0.1-py3-none-any.whl:

Publisher: python-publish.yml on alejotoro-o/metaheuropt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page