Reinforcement Learning for Everyone.
Project description
MetaHeurOpt
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81a152a138675b601c951d43f8b1b3e84beab278614c83cc8b4b90b531dd4e54
|
|
| MD5 |
300adcdc9d8d311258af995f0876fbb3
|
|
| BLAKE2b-256 |
ddb051b5042a7ace58d3593e81b13b1e0b8fe06c2c3141574ef6431372a4b2be
|
Provenance
The following attestation bundles were made for metaheuropt-0.0.1.tar.gz:
Publisher:
python-publish.yml on alejotoro-o/metaheuropt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaheuropt-0.0.1.tar.gz -
Subject digest:
81a152a138675b601c951d43f8b1b3e84beab278614c83cc8b4b90b531dd4e54 - Sigstore transparency entry: 987198159
- Sigstore integration time:
-
Permalink:
alejotoro-o/metaheuropt@d89d18eb771365590f761cc5a00f4232df0f03ef -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/alejotoro-o
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d89d18eb771365590f761cc5a00f4232df0f03ef -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06560d5444dee7a76d8f5767df2d9e2166b6cfb4ee0f07a53387997d02676a04
|
|
| MD5 |
f12655f8ff06cf4c01af1a16d1469356
|
|
| BLAKE2b-256 |
df42f09c5581448faeddf084bab0e1fedbef60bf0340ff57dec6976eb3c08dfa
|
Provenance
The following attestation bundles were made for metaheuropt-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on alejotoro-o/metaheuropt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaheuropt-0.0.1-py3-none-any.whl -
Subject digest:
06560d5444dee7a76d8f5767df2d9e2166b6cfb4ee0f07a53387997d02676a04 - Sigstore transparency entry: 987198206
- Sigstore integration time:
-
Permalink:
alejotoro-o/metaheuropt@d89d18eb771365590f761cc5a00f4232df0f03ef -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/alejotoro-o
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d89d18eb771365590f761cc5a00f4232df0f03ef -
Trigger Event:
release
-
Statement type: