fireflyalgorithm

Implementation of Firefly Algorithm in Python

https://github.com/firefly-cpp/fireflyalgorithm

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

firefly-algorithm optimization optimization-algorithms swarm-intelligence

Keywords from Contributors

evolutionary-algorithms nature-inspired-algorithms association-rule-mining association-rules data-mining microframework automl classification-pipelines toml agriculture
Last synced: 4 months ago · JSON representation ·

Repository

Implementation of Firefly Algorithm in Python

Basic Info
  • Host: GitHub
  • Owner: firefly-cpp
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 310 KB
Statistics
  • Stars: 59
  • Watchers: 3
  • Forks: 28
  • Open Issues: 0
  • Releases: 18
Topics
firefly-algorithm optimization optimization-algorithms swarm-intelligence
Created almost 9 years ago · Last pushed 12 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

Firefly Algorithm --- Implementation of Firefly algorithm in Python

PyPI Version PyPI - Python Version Downloads GitHub repo size AUR package GitHub license build

GitHub commit activity Average time to resolve an issue Percentage of issues still open GitHub contributors Packaging status

DOI

📋 About📦 Installation🚀 Usage📚 Reference Papers📄 Cite us🔑 License

📋 About

This package implements a nature-inspired algorithm for optimization called Firefly Algorithm (FA) in Python programming language. 🌿🔍💻

📦 Installation

To install FireflyAlgorithm with pip, use: sh pip install fireflyalgorithm To install FireflyAlgorithm on Fedora, use: sh dnf install python-fireflyalgorithm To install FireflyAlgorithm on Arch Linux, please use an AUR helper: sh $ yay -Syyu python-fireflyalgorithm To install FireflyAlgorithm on Alpine Linux, use: sh $ apk add py3-fireflyalgorithm

🚀 Usage

```python from fireflyalgorithm import FireflyAlgorithm from fireflyalgorithm.problems import sphere

FA = FireflyAlgorithm() best = FA.run(function=sphere, dim=10, lb=-5, ub=5, max_evals=10000)

print(best) ```

Test functions 📈

In 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:

```python from fireflyalgorithm.problems import get_problem

same as from fireflyalgorithm.problems import rosenbrock

rosenbrock = get_problem('rosenbrock') ```

For more information about the implemented test functions, click here.

Command line interface 🖥️

The package also comes with a simple command line interface which allows you to evaluate the algorithm on several popular test functions. 🔬

shell firefly-algorithm -h

```text usage: 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]

Evaluate the Firefly Algorithm on one or more test functions

options: -h, --help show this help message and exit --problem PROBLEM Test problem to evaluate -d DIMENSION, --dimension DIMENSION Dimension of the problem -l LOWER, --lower LOWER Lower bounds of the problem -u UPPER, --upper UPPER Upper bounds of the problem -nfes MAXEVALS, --max-evals MAXEVALS Max number of fitness function evaluations -r RUNS, --runs RUNS Number of runs of the algorithm --pop-size POPSIZE Population size --alpha ALPHA Randomness strength --beta-min BETAMIN Attractiveness constant --gamma GAMMA Absorption coefficient --seed SEED Seed for the random number generator ```

Note: The CLI script can also run as a python module (python -m fireflyalgorithm ...).

📚 Reference Papers

I. Fister Jr., X.-S. Yang, I. Fister, J. Brest, D. Fister. A Brief Review of Nature-Inspired Algorithms for Optimization. Elektrotehniški vestnik, 80(3), 116-122, 2013.

I. Fister Jr., X.-S. Yang, I. Fister, J. Brest. Memetic firefly algorithm for combinatorial optimization in Bioinspired Optimization Methods and their Applications (BIOMA 2012), B. Filipic and J.Silc, Eds. Jozef Stefan Institute, Ljubljana, Slovenia, 2012

I. Fister, I. Fister Jr., X.-S. Yang, J. Brest. A comprehensive review of firefly algorithms. Swarm and Evolutionary Computation 13 (2013): 34-46.

📄 Cite us

Fister Jr., I., Pečnik, L., & Stupan, Ž. (2023). firefly-cpp/FireflyAlgorithm: 0.4.3 (0.4.3). Zenodo. https://doi.org/10.5281/zenodo.10430919

🔑 License

This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

Disclaimer

This 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!

Owner

  • Name: Iztok Fister Jr.
  • Login: firefly-cpp
  • Kind: user
  • Location: Slovenia

Citation (CITATION.cff)

abstract: Implementation of Firefly Algorithm in Python
authors:
- family-names: Fister Jr.
  given-names: Iztok
  orcid: 0000-0002-6418-1272
- affiliation: '@poviolabs'
  family-names: "Pe\u010Dnik"
  given-names: Luka
  orcid: 0000-0002-3897-9774
- family-names: Stupan
  given-names: "\u017Diga"
  orcid: 0000-0001-9847-7306
cff-version: 1.2.0
date-released: '2023-12-25'
doi: 10.5281/zenodo.10430919
license:
- MIT
repository-code: https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.4
title: 'firefly-cpp/FireflyAlgorithm: 0.4.4'
type: software
version: 0.4.4

GitHub Events

Total
  • Release event: 1
  • Push event: 1
  • Create event: 1
Last Year
  • Release event: 1
  • Push event: 1
  • Create event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 95
  • Total Committers: 6
  • Avg Commits per committer: 15.833
  • Development Distribution Score (DDS): 0.347
Past Year
  • Commits: 4
  • Committers: 2
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.25
Top Committers
Name Email Commits
firefly-cpp i****k@i****u 62
zStupan z****n@g****m 25
Tadej Lahovnik t****k@s****i 5
rhododendrom b****2@p****m 1
Luka Pečnik l****6@g****m 1
Carlos Aznarán Laos c****l@u****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 15
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 13 hours
  • Total issue authors: 1
  • Total pull request authors: 6
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.93
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • firefly-cpp (6)
Pull Request Authors
  • zStupan (7)
  • firefly-cpp (3)
  • lahovniktadej (3)
  • rhododendrom (1)
  • lukapecnik (1)
  • carlosal1015 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 19
  • Total downloads:
    • pypi 47 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 52
  • Total maintainers: 2
alpine-edge: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.1%
Dependent packages count: 14.3%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.18: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 11.0%
Forks count: 21.0%
Stargazers count: 22.9%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.18: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 11.0%
Forks count: 21.0%
Stargazers count: 22.9%
Maintainers (1)
Last synced: 5 months ago
pypi.org: fireflyalgorithm

Implementation of Firefly Algorithm in Python

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 47 Last month
Rankings
Forks count: 7.7%
Stargazers count: 9.2%
Dependent packages count: 10.0%
Downloads: 11.7%
Average: 12.1%
Dependent repos count: 21.7%
Maintainers (1)
Last synced: 4 months ago
alpine-edge: py3-fireflyalgorithm-doc

An implementation of the stochastic nature-inspired algorithm for optimization (documentation)

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 15.2%
Dependent packages count: 15.5%
Forks count: 21.0%
Stargazers count: 24.2%
Maintainers (1)
Last synced: 5 months ago
alpine-edge: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 14.6%
Average: 15.4%
Forks count: 22.4%
Stargazers count: 24.4%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.17: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 16.8%
Forks count: 19.4%
Stargazers count: 20.7%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.21: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.22: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.21: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.19: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Maintainers (1)
Last synced: 5 months ago
alpine-v3.21: py3-fireflyalgorithm-doc

An implementation of the stochastic nature-inspired algorithm for optimization (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.22: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.20: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.19: py3-fireflyalgorithm-pyc

Precompiled Python bytecode for py3-fireflyalgorithm

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Maintainers (1)
Last synced: 5 months ago
alpine-v3.22: py3-fireflyalgorithm-doc

An implementation of the stochastic nature-inspired algorithm for optimization (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.20: py3-fireflyalgorithm

An implementation of the stochastic nature-inspired algorithm for optimization

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.20: py3-fireflyalgorithm-doc

An implementation of the stochastic nature-inspired algorithm for optimization (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 5 months ago
alpine-v3.19: py3-fireflyalgorithm-doc

An implementation of the stochastic nature-inspired algorithm for optimization (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Last synced: 5 months ago

Dependencies

poetry.lock pypi
  • attrs 22.1.0 develop
  • colorama 0.4.6 develop
  • exceptiongroup 1.0.0 develop
  • importlib-metadata 5.0.0 develop
  • iniconfig 1.1.1 develop
  • packaging 21.3 develop
  • pluggy 1.0.0 develop
  • pyparsing 3.0.9 develop
  • pytest 7.2.0 develop
  • tomli 2.0.1 develop
  • typing-extensions 4.4.0 develop
  • zipp 3.10.0 develop
  • numpy 1.23.4
  • numpy 1.21.6
pyproject.toml pypi
  • pytest ^7.0.1 develop
  • numpy --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^1.21.5" python: ">=3.7,<3.11" - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^1.22.0" python: "^3.11"
  • python ^3.7
.github/workflows/test.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v3 composite