Skip to main content

An Open-source Library for Latest Meta-heuristic Algorithms in Python

Project description

mealpy-legacy-collection

License: MIT PyPI - Version PyPI - Implementation PyPI - Python Version PyPI - Wheel GitHub Release Date PyPI - Downloads

GitHub Actions Workflow Status GitHub Actions Workflow Status

Is a lightweight, heavily refactored fork of MEALPY (MEta-Heuristic Algorithms using PYthon), stripped down to its absolute mathematical core. It serves as a pure, bloat-free repository that preserves the historical collection of population-based metaheuristic algorithms (PBM), acting as an open architectural catalog for educational purposes, clean research, and rapid prototyping within our ecosystem.

Unlike monolithic optimization frameworks, mealpy-legacy-collection cuts out all secondary overhead such as visualization tools, complex logging, and heavy external dependencies focusing strictly on the raw algorithmic logic and mathematical transition operators of these legacy implementations. This ensures a clean, decoupled foundation for developers to study, test, and benchmark classic metaheuristics without the friction of modern software bloat.

Why?

  • Lean Core & Zero Bloat: Amputated all UI, plotting, and file-writing features to create an ultra-lightweight library, making this massive historical catalog ideal to be consumed as a clean, plug-and-play mathematical dependency.
  • Aggressive Agent Refactoring: Redesigned the original agent state model to eliminate heavy Python object/dictionary overhead, shifting towards a streamlined, flat population structure that maximizes data locality.
  • Didactic Catalog Architecture: Re-engineered with a highly pedagogical layout. Students and researchers can open any legacy algorithm, understand its transition rules in pure Python/NumPy in just a few lines of code, and easily use the structure as a mold to study or adapt classic metaheuristics.
  • Ecosystem Ready: Built to operate as a decoupled, standardized engine, making this collection perfectly tailored to be driven by external benchmarking, evaluation frameworks, and modern optimization wrappers.

Credits & Citation Request

This project is based is entirely built upon the foundational work, dedication, and effort of the original MEALPY authors, Nguyen Van Thieu and Seyedali Mirjalili, as well as the global community of researchers and scientists who originally designed, investigated, and implemented the diverse metaheuristic algorithms contained within this collection. This fork merely restructures their brilliant mathematical work for decoupled, lightweight, and didactic purposes.

If you use this library, its restructured architecture, or the underlying algorithms in your academic research, please ensure proper credit is given to the original creators by citing:

@article{van2023mealpy,
  title={MEALPY: An open-source library for latest meta-heuristic algorithms in Python},
  author={Van Thieu, Nguyen and Mirjalili, Seyedali},
  journal={Journal of Systems Architecture},
  year={2023},
  publisher={Elsevier},
  doi={10.1016/j.sysarc.2023.102871}
}

@article{van2023groundwater,
  title={Groundwater level modeling using Augmented Artificial Ecosystem Optimization},
  author={Van Thieu, Nguyen and Barma, Surajit Deb and Van Lam, To and Kisi, Ozgur and Mahesha, Amai},
  journal={Journal of Hydrology},
  volume={617},
  pages={129034},
  year={2023},
  publisher={Elsevier},
  doi={https://doi.org/10.1016/j.jhydrol.2022.129034}
}

@article{ahmed2021comprehensive,
  title={A comprehensive comparison of recent developed meta-heuristic algorithms for streamflow time series forecasting problem},
  author={Ahmed, Ali Najah and Van Lam, To and Hung, Nguyen Duy and Van Thieu, Nguyen and Kisi, Ozgur and El-Shafie, Ahmed},
  journal={Applied Soft Computing},
  volume={105},
  pages={107282},
  year={2021},
  publisher={Elsevier},
  doi={10.1016/j.asoc.2021.107282}
}

Algorithmic Citations

To honor the individual authors who contributed each method to the field of approximate optimization, we strongly encourage you to cite the specific foundational papers for the algorithms used in your experiments.

You can find the complete list of original scientific papers and their corresponding citations in our dedicated REFERENCES.md file included within this repository.

Goals

The sole purpose of this repository is to preserve a clean, decoupled collection of both classical and state-of-the-art nature-inspired metaheuristic algorithms. By stripping away all monolithic overhead, our goal is to provide a standardized, raw algorithmic library that can be effortlessly integrated, embedded, and reused across any Python environment—whether for academic research, proprietary commercial software, or high-performance computing clusters.

What you can do

  • Universal Reusability: Import and execute any metaheuristic algorithm across any third-party framework or custom pipeline without dependency conflicts.
  • Pure Logic Inspection: Open and study the raw mathematical transition operators of a massive catalog of population-based algorithms.
  • Zero-Friction Integration: Consume the entire collection as a lightweight, plug-and-play mathematical engine.
  • Benchmark-Ready Sourcing: Use these legacy implementations as standardized baselines for modern benchmarking and comparative evaluation suites.

Usage

Installation

$ pip install mealpy-legacy-collection --upgrade
  • Install the pre-release version directly from the source code:
$ git clone https://github.com/ltsim/mealpy-legacy-collection.git
$ cd mealpy-legacy-collection
$ python -m pip install .
  • In case, you want to install the development version from Github:
$ pip install git+https://github.com/ltsim/mealpy-legacy-collection.git 

Optimizer Classification Table

  • Meta-heuristic Categories: (Based on this article)

    • Evolutionary-based: Algorithms inspired by Darwin's law of natural selection and evolutionary computing principles
    • Swarm-based: Algorithms drawing inspiration from the collective movement and interaction of swarms (e.g., birds, social insects).
    • Physics-based: Algorithms derived from physical laws and phenomena (e.g., Newton's law of universal gravitation, black holes, multiverse theory).
    • Human-based: Algorithms inspired by human interactions and behaviors (e.g., queuing search, teaching-learning processes).
    • Biology-based: Algorithms based on biological creatures or microorganisms.
    • System-based: Algorithms inspired by ecological systems, immune systems, or network systems.
    • Math-based: Algorithms developed from mathematical forms or laws (e.g., sine-cosine functions).
    • Music-based: Algorithms drawing inspiration from musical instruments or compositions.
  • Difficulty - Difficulty Level (Personal Opinion): Objective observation from author. Depend on the number of parameters, number of equations, the original ideas, time spend for coding, source lines of code (SLOC).

    • Easy: A few paras, few equations, SLOC very short
    • Medium: more equations than Easy level, SLOC longer than Easy level
    • Hard: Lots of equations, SLOC longer than Medium level, the paper hard to read.
    • Hard* - Very hard: Lots of equations, SLOC too long, the paper is very hard to read.

For newbie, we recommend to read the paper of algorithms which difficulty is "easy" or "medium" difficulty level.

Warning: Algorithms Suspected of Plagiarism

During our implementation and classification of metaheuristic optimization algorithms, we identified a set of methods that raise serious concerns regarding scientific integrity and originality. These algorithms are typically published under different names, but they appear to share:

  • The same core mathematical models, equations, and update rules.
  • Only superficial changes in naming, metaphors, or biological analogies.
  • Publications authored by the same or overlapping research groups.
  • Heavy criticism on public academic forums such as PubPeer, where many of these papers are flagged for self-plagiarism, redundant publication, or lack of novelty.
  • Some of these papers may be withdrawn or retracted in the future, as investigations unfold.

For these reasons, we strongly advise the exclusion of the following algorithms from scientific benchmarking, comparative studies, or any applications unless their originality is transparently validated.

I have personally implemented these algorithms, which is why I can confidently say that they are nearly identical and likely cases of plagiarism. For this reason, I will no longer spend time coding such algorithms in the future. This warning is intended to help others avoid using or relying on these methods in their work.

Ethical Reminder

Researchers and students are urged to exercise caution when referencing or applying the algorithms listed above. Using unoriginal or unethical work can compromise the scientific credibility of any downstream research and introduce misleading experimental results.

Check PubPeer1 and PubPeer2 to find ongoing discussions and critiques from the academic community.

For detailed information about the updates in each new version, see the ChangeLog file.


  • Maintained by: LTSIM @ 2026
  • Developed by: Thieu @ 2023

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

mealpy_legacy_collection-2026.1.tar.gz (230.2 kB view details)

Uploaded Source

Built Distribution

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

mealpy_legacy_collection-2026.1-py3-none-any.whl (408.2 kB view details)

Uploaded Python 3

File details

Details for the file mealpy_legacy_collection-2026.1.tar.gz.

File metadata

File hashes

Hashes for mealpy_legacy_collection-2026.1.tar.gz
Algorithm Hash digest
SHA256 b9fa5570aeefcda12466dc158a28d6209a91cbdceb0ec4a14f2f9954c6abea9a
MD5 3c3a6f7b050e488dd49edfd39437fbe4
BLAKE2b-256 a4ff84970593179a9d6a41a23252c141d1b4697f2dbecb0860226856a4095426

See more details on using hashes here.

Provenance

The following attestation bundles were made for mealpy_legacy_collection-2026.1.tar.gz:

Publisher: publish.yml on ltsim/mealpy-legacy-collection

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

File details

Details for the file mealpy_legacy_collection-2026.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mealpy_legacy_collection-2026.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fef0aa6e543abae4a46eb511e48c53320eb3cc65ca4eb527e30a5000defece8e
MD5 4f01d6816fe921b0910826036485e1c2
BLAKE2b-256 3fb5fd52101757a57f0eb2be124cd8aeb92214e674fefc2ea8dac85cf12fe636

See more details on using hashes here.

Provenance

The following attestation bundles were made for mealpy_legacy_collection-2026.1-py3-none-any.whl:

Publisher: publish.yml on ltsim/mealpy-legacy-collection

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