{"id":25007854,"url":"https://github.com/samashi47/metaheuristics","last_synced_at":"2026-05-01T09:32:41.982Z","repository":{"id":225018949,"uuid":"764870066","full_name":"Samashi47/Metaheuristics","owner":"Samashi47","description":"Implementation of various metaheuristic algorithms in C++ and Python ","archived":false,"fork":false,"pushed_at":"2024-10-06T10:52:36.000Z","size":19594,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T01:14:38.872Z","etag":null,"topics":["ant-lion-optimizer","cpp","genetic-algorithm","grey-wolf-optimizer","metaheuristics","multi-verse-optimizer","optimization","python3","simulated-annealing","tabu-search"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samashi47.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-28T21:26:44.000Z","updated_at":"2024-10-06T10:52:40.000Z","dependencies_parsed_at":"2024-04-03T12:38:34.216Z","dependency_job_id":"af2a5d9b-0280-48d9-922b-17f2ea0eec93","html_url":"https://github.com/Samashi47/Metaheuristics","commit_stats":null,"previous_names":["samashi47/metaheuristics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Samashi47/Metaheuristics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samashi47%2FMetaheuristics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samashi47%2FMetaheuristics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samashi47%2FMetaheuristics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samashi47%2FMetaheuristics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samashi47","download_url":"https://codeload.github.com/Samashi47/Metaheuristics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samashi47%2FMetaheuristics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ant-lion-optimizer","cpp","genetic-algorithm","grey-wolf-optimizer","metaheuristics","multi-verse-optimizer","optimization","python3","simulated-annealing","tabu-search"],"created_at":"2025-02-05T02:56:00.832Z","updated_at":"2026-05-01T09:32:41.959Z","avatar_url":"https://github.com/Samashi47.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metaheuristics\n\nThis repository contains code and resources for a university course on Metaheuristics and stochastic search algorithms.\n\n### Author: Ahmed Samady\n### Supervised by: Pr. Khalid Jebari\n\n## Overview\n\nThe purpose of this repository is to provide implementations of various metaheuristic algorithms in Python and C++. It covers topics such as Genetic Algorithms, Simulated Annealing, Multi-Verse Optimizer, and more.\n## Note\n\nThe Python implementations in this repository for GWO [[1]](#1)[[2]](#2), MVO [[3]](#3)[[4]](#4), and ALO [[5]](#5)[[6]](#6) are adapted from the MATLAB implementations by Dr. Seyedali Mirjalili.\n### Optimization Algorithms\n\n|       Algorithm       |       Python       |        C++         |\n|-----------------------|--------------------|--------------------|\n| Genetic Algorithms  (incomplete)  |        :x:         | :white_check_mark: |\n| Tabu Search           |        :x:         | :white_check_mark: |\n| Simulated Annealing   |        :x:         | :white_check_mark: |\n| Grey Wolf Optimizer   | :white_check_mark: |        :x:         |\n| Multi-Verse Optimizer | :white_check_mark: |        :x:         |\n| Ant Lion Optimizer    | :white_check_mark: |        :x:         |\n\n## Getting Started\nTo get started with this repository, follow these steps:\nClone the repository:\n```bash\ngit clone -b main --single-branch [https://github.com/Samashi47/Metaheuristics]\n```\nNavigate to the directory of the cloned repository:\n```bash\ncd Metaheuristics\n```\n### Python\nCreate a virtual environment in the repository by typing the followwing command:\n```bash\npython -m venv /path/to/repo/on/your/local/machine\n```\nAfter cloning the project and creating your venv, activate the venv by:\n\n```bash\n.venv\\Scripts\\activate\n```\nYou can run the following command to install the dependencies:\n```bash\npip3 install -r requirements.txt\n```\n\u003e [!NOTE]  \n\u003e You should run the main scripts of the ALO, GWO, and MVO algorithms from the base directory so that they can access the common folder that has the Utils class in it (e.g. `python '.\\Grey Wolf Optimizer\\main.py'`).\n\n### C++\nCompile the C++ files. For example, to run the `Simulated Annealing` implementation, you can compile the `sa.cpp` file in the `Simulated Annealing` folder using g++:\n```bash\ng++ -o sa sa.cpp\n```\nRun the compiled file:\n```bash\n./sa\n```\n## Contributing\n\nContributions to this repository are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.\n\n## Contact\n\nFor any questions or inquiries, please contact the owner of this repository or open an issue.\n\nHappy coding!\n## Cite me\n### Bibtex generic citation\n```txt\n@misc{Samady,\n  title={Samashi47/metaheuristics: Implementation of various metaheuristic algorithms in C++ and python},\n  url={https://github.com/Samashi47/Metaheuristics},\n  journal={GitHub},\n  author={Samady, Ahmed}\n}\n```\n### APA7\n```txt\nSamady, A. Samashi47/metaheuristics: Implementation of various metaheuristic algorithms in C++ and python. GitHub. https://github.com/Samashi47/Metaheuristics\n```\n## References\n\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e Seyedali Mirjalili (2024). Grey Wolf Optimizer (GWO) [MATLAB Central File Exchange](https://www.mathworks.com/matlabcentral/fileexchange/44974-grey-wolf-optimizer-gwo). Retrieved April 22, 2024. \\\n\u003ca id=\"2\"\u003e[2]\u003c/a\u003e Mirjalili, S., Mirjalili, S. M., \u0026 Lewis, A. (2014). Grey Wolf Optimizer. Advances in Engineering Software, 69, 46–61. doi:10.1016/j.advengsoft.2013.12.007 \\\n\u003ca id=\"3\"\u003e[3]\u003c/a\u003e Seyedali Mirjalili (2024). Multi-Verse Optimizer (MVO) [MATLAB Central File Exchange](https://www.mathworks.com/matlabcentral/fileexchange/50112-multi-verse-optimizer-mvo). Retrieved April 22, 2024. \\\n\u003ca id=\"4\"\u003e[4]\u003c/a\u003e Mirjalili, S., Mirjalili, S. M., \u0026 Hatamlou, A. (2015). Multi-Verse Optimizer: a nature-inspired algorithm for global optimization. Neural Computing and Applications, 27(2), 495–513. doi:10.1007/s00521-015-1870-7 \\\n\u003ca id=\"5\"\u003e[5]\u003c/a\u003e Seyedali Mirjalili (2024). Ant Lion Optimizer (ALO) [MATLAB Central File Exchange](https://www.mathworks.com/matlabcentral/fileexchange/49920-ant-lion-optimizer-alo). Retrieved April 22, 2024. \\\n\u003ca id=\"6\"\u003e[6]\u003c/a\u003e Mirjalili, S. (2015). The Ant Lion Optimizer. Advances in Engineering Software, 83, 80–98. doi:10.1016/j.advengsoft.2015.01.010 \\\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamashi47%2Fmetaheuristics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamashi47%2Fmetaheuristics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamashi47%2Fmetaheuristics/lists"}