{"id":18774670,"url":"https://github.com/firefly-cpp/fireflyalgorithm","last_synced_at":"2025-04-05T01:07:18.398Z","repository":{"id":15249143,"uuid":"77826648","full_name":"firefly-cpp/FireflyAlgorithm","owner":"firefly-cpp","description":"Implementation of Firefly Algorithm in Python","archived":false,"fork":false,"pushed_at":"2025-01-04T20:03:28.000Z","size":317,"stargazers_count":59,"open_issues_count":0,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T00:12:47.140Z","etag":null,"topics":["firefly-algorithm","optimization","optimization-algorithms","swarm-intelligence"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firefly-cpp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-02T10:43:04.000Z","updated_at":"2025-01-04T19:05:34.000Z","dependencies_parsed_at":"2023-02-12T21:30:48.837Z","dependency_job_id":"b74297ec-808b-467c-9ad8-c69c8647e4d3","html_url":"https://github.com/firefly-cpp/FireflyAlgorithm","commit_stats":{"total_commits":59,"total_committers":7,"mean_commits":8.428571428571429,"dds":0.3220338983050848,"last_synced_commit":"6d70291476943e53c09fe1cbdb769f67d8a6d149"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-cpp%2FFireflyAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-cpp%2FFireflyAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-cpp%2FFireflyAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefly-cpp%2FFireflyAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firefly-cpp","download_url":"https://codeload.github.com/firefly-cpp/FireflyAlgorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271530,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["firefly-algorithm","optimization","optimization-algorithms","swarm-intelligence"],"created_at":"2024-11-07T19:38:56.509Z","updated_at":"2025-04-05T01:07:18.382Z","avatar_url":"https://github.com/firefly-cpp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://raw.githubusercontent.com/firefly-cpp/FireflyAlgorithm/master/.github/imgs/firefly_logo.png\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\nFirefly Algorithm --- Implementation of Firefly algorithm in Python\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"PyPI Version\" src=\"https://img.shields.io/pypi/v/fireflyalgorithm.svg\" href=\"https://pypi.python.org/pypi/fireflyalgorithm\"\u003e\n  \u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/fireflyalgorithm.svg\"\u003e\n  \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/pypi/dm/fireflyalgorithm.svg\"\u003e\n  \u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/firefly-cpp/FireflyAlgorithm\"\u003e\n  \u003cimg alt=\"AUR package\" src=\"https://img.shields.io/aur/version/python-fireflyalgorithm?color=blue\u0026label=Arch%20Linux\u0026logo=arch-linux\" href=\"https://aur.archlinux.org/packages/python-fireflyalgorithm\"\u003e\n  \u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/firefly-cpp/FireflyAlgorithm.svg\" href=\"https://github.com/firefly-cpp/FireflyAlgorithm/blob/master/LICENSE\"\u003e  \n  \u003cimg alt=\"build\" src=\"https://github.com/firefly-cpp/FireflyAlgorithm/actions/workflows/test.yml/badge.svg\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"GitHub commit activity\" src=\"https://img.shields.io/github/commit-activity/w/firefly-cpp/FireflyAlgorithm.svg\"\u003e\n  \u003cimg alt=\"Average time to resolve an issue\" src=\"http://isitmaintained.com/badge/resolution/firefly-cpp/FireflyAlgorithm.svg\" href=\"http://isitmaintained.com/project/firefly-cpp/FireflyAlgorithm\"\u003e\n  \u003cimg alt=\"Percentage of issues still open\" src=\"http://isitmaintained.com/badge/open/firefly-cpp/FireflyAlgorithm.svg\" href=\"http://isitmaintained.com/project/firefly-cpp/FireflyAlgorithm\"\u003e\n  \u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/firefly-cpp/FireflyAlgorithm.svg\"\u003e\n  \u003cimg alt=\"Packaging status\" src=\"https://repology.org/badge/tiny-repos/python:fireflyalgorithm.svg\" href=\"https://repology.org/project/python:fireflyalgorithm/versions\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"DOI\" src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.10430919.svg\" href=\"https://doi.org/10.5281/zenodo.10430919\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#-about\"\u003e📋 About\u003c/a\u003e •\n  \u003ca href=\"#-installation\"\u003e📦 Installation\u003c/a\u003e •\n  \u003ca href=\"#-usage\"\u003e🚀 Usage\u003c/a\u003e •\n  \u003ca href=\"#-reference-papers\"\u003e📚 Reference Papers\u003c/a\u003e •\n  \u003ca href=\"#-cite-us\"\u003e📄 Cite us\u003c/a\u003e •\n  \u003ca href=\"#-license\"\u003e🔑 License\u003c/a\u003e\n\u003c/p\u003e\n\n## 📋 About\n\nThis package implements a nature-inspired algorithm for optimization called Firefly Algorithm (FA) in Python programming language. 🌿🔍💻\n\n## 📦 Installation\n\nTo install FireflyAlgorithm with pip, use:\n```sh\npip install fireflyalgorithm\n```\nTo install FireflyAlgorithm on Fedora, use:\n```sh\ndnf install python-fireflyalgorithm\n```\nTo install FireflyAlgorithm on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):\n```sh\n$ yay -Syyu python-fireflyalgorithm\n```\nTo install FireflyAlgorithm on Alpine Linux, use:\n```sh\n$ apk add py3-fireflyalgorithm\n```\n\n## 🚀 Usage\n\n```python\nfrom fireflyalgorithm import FireflyAlgorithm\nfrom fireflyalgorithm.problems import sphere\n\nFA = FireflyAlgorithm()\nbest = FA.run(function=sphere, dim=10, lb=-5, ub=5, max_evals=10000)\n\nprint(best)\n```\n\n### Test functions 📈\n\nIn the `fireflyalgorithm.problems` module, you can find the implementations of 33 popular optimization test problems.  Additionally, the module provides a utility function, `get_problem`, that allows you to retrieve a specific optimization problem function by providing its name as a string:\n\n```python\nfrom fireflyalgorithm.problems import get_problem\n\n# same as from fireflyalgorithm.problems import rosenbrock\nrosenbrock = get_problem('rosenbrock')\n```\n\nFor more information about the implemented test functions, [click here](Problems.md).\n\n### Command line interface 🖥️\n\nThe package also comes with a simple command line interface which allows you to evaluate the algorithm on several popular test functions. 🔬\n\n```shell\nfirefly-algorithm -h\n```\n\n```text\nusage: firefly-algorithm [-h] --problem PROBLEM -d DIMENSION -l LOWER -u UPPER -nfes MAX_EVALS [-r RUNS] [--pop-size POP_SIZE] [--alpha ALPHA] [--beta-min BETA_MIN] [--gamma GAMMA] [--seed SEED]\n\nEvaluate the Firefly Algorithm on one or more test functions\n\noptions:\n  -h, --help            show this help message and exit\n  --problem PROBLEM     Test problem to evaluate\n  -d DIMENSION, --dimension DIMENSION\n                        Dimension of the problem\n  -l LOWER, --lower LOWER\n                        Lower bounds of the problem\n  -u UPPER, --upper UPPER\n                        Upper bounds of the problem\n  -nfes MAX_EVALS, --max-evals MAX_EVALS\n                        Max number of fitness function evaluations\n  -r RUNS, --runs RUNS  Number of runs of the algorithm\n  --pop-size POP_SIZE   Population size\n  --alpha ALPHA         Randomness strength\n  --beta-min BETA_MIN   Attractiveness constant\n  --gamma GAMMA         Absorption coefficient\n  --seed SEED           Seed for the random number generator\n```\n\n**Note:** The CLI script can also run as a python module (python -m fireflyalgorithm ...).\n\n\n## 📚 Reference Papers\n\nI. Fister Jr., X.-S. Yang, I. Fister, J. Brest, D. Fister. [A Brief Review of Nature-Inspired Algorithms for Optimization](http://www.iztok-jr-fister.eu/static/publications/21.pdf). Elektrotehniški vestnik, 80(3), 116-122, 2013.\n\nI. Fister Jr., X.-S. Yang, I. Fister, J. Brest. [Memetic firefly algorithm for combinatorial optimization](http://www.iztok-jr-fister.eu/static/publications/44.pdf) in Bioinspired Optimization Methods and their Applications (BIOMA 2012), B. Filipic and J.Silc, Eds.\nJozef Stefan Institute, Ljubljana, Slovenia, 2012\n\nI. Fister, I. Fister Jr., X.-S. Yang, J. Brest. [A comprehensive review of firefly algorithms](http://www.iztok-jr-fister.eu/static/publications/23.pdf). Swarm and Evolutionary Computation 13 (2013): 34-46.\n\n## 📄 Cite us\n\nFister Jr., I., Pečnik, L., \u0026 Stupan, Ž. (2023). firefly-cpp/FireflyAlgorithm: 0.4.3 (0.4.3). Zenodo. [https://doi.org/10.5281/zenodo.10430919](https://doi.org/10.5281/zenodo.10430919)\n\n## 🔑 License\n\nThis package is distributed under the MIT License. This license can be found online at \u003chttp://www.opensource.org/licenses/MIT\u003e.\n\n## Disclaimer\n\nThis framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefly-cpp%2Ffireflyalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirefly-cpp%2Ffireflyalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefly-cpp%2Ffireflyalgorithm/lists"}