Skip to main content

Implementation of Firefly Algorithm in Python

Project description

Firefly Algorithm --- Implementation of Firefly algorithm in Python


PyPI Version PyPI - Python Version PyPI - Downloads Downloads GitHub license GitHub commit activity Average time to resolve an issue Percentage of issues still open GitHub contributors

Installation:

pip install fireflyalgorithm

To install FireflyAlgorithm on Fedora, use:

dnf install python-fireflyalgorithm

Usage:

import numpy as np
from fireflyalgorithm import FireflyAlgorithm

def sphere(x):
    return np.sum(x ** 2)

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

print(best)

Reference Papers:

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.

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!

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

fireflyalgorithm-0.3.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

fireflyalgorithm-0.3.2-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page