diff --git a/.github/templates/FEATURE_REQUEST.md b/.github/templates/FEATURE_REQUEST.md
new file mode 100644
index 0000000..5a1ccc4
--- /dev/null
+++ b/.github/templates/FEATURE_REQUEST.md
@@ -0,0 +1,16 @@
+### Feature Request
+
+**About**:
+**Title**:
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
\ No newline at end of file
diff --git a/.github/templates/ISSUE_TEMPLATE.md b/.github/templates/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..90325f5
--- /dev/null
+++ b/.github/templates/ISSUE_TEMPLATE.md
@@ -0,0 +1,18 @@
+### Bug Report
+
+**About**:
+**Title**:
+
+**Steps to reproduce**
+Tell us how to reproduce the bug.
+
+**Expected behavior**
+Tell us what should happen.
+
+**Actual behavior**
+Tell us what happens instead.
+
+**System configuration**
+
+ - OS:
+ - Python version:
\ No newline at end of file
diff --git a/.github/templates/PULL_REQUEST.md b/.github/templates/PULL_REQUEST.md
new file mode 100644
index 0000000..9a87d5d
--- /dev/null
+++ b/.github/templates/PULL_REQUEST.md
@@ -0,0 +1,14 @@
+### Summary
+
+Provide a general description of the code changes in your pull
+request... were there any bugs you had fixed? If so, mention them. If
+these bugs have open GitHub issues, be sure to tag them here as well,
+to keep the conversation linked together.
+
+### Other Information
+
+If there's anything else that's important and relevant to your pull
+request, mention that information here. This could include
+benchmarks, or other information.
+
+Thanks for contributing to Firefly Algorithm!
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18d1380..ecb6ba2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,42 @@
# Changelog
+## [0.4.2](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.2) (2023-12-04)
+
+[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.4.1...0.4.2)
+
+**Merged pull requests:**
+
+- Contribution guide [\#20](https://github.com/firefly-cpp/FireflyAlgorithm/pull/20) ([lahovniktadej](https://github.com/lahovniktadej))
+
+## [0.4.1](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.1) (2023-11-10)
+
+[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.4.0...0.4.1)
+
+**Closed issues:**
+
+- Create Problems.md [\#18](https://github.com/firefly-cpp/FireflyAlgorithm/issues/18)
+
+**Merged pull requests:**
+
+- Add Test Function definitions [\#19](https://github.com/firefly-cpp/FireflyAlgorithm/pull/19) ([zStupan](https://github.com/zStupan))
+
+## [0.4.0](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.0) (2023-11-06)
+
+[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.3.4...0.4.0)
+
+**Closed issues:**
+
+- Enhance tests [\#16](https://github.com/firefly-cpp/FireflyAlgorithm/issues/16)
+- Provide Command Line Interface \(CLI\) [\#13](https://github.com/firefly-cpp/FireflyAlgorithm/issues/13)
+- Add installation instructions for Arch Linux [\#11](https://github.com/firefly-cpp/FireflyAlgorithm/issues/11)
+
+**Merged pull requests:**
+
+- Add tests [\#17](https://github.com/firefly-cpp/FireflyAlgorithm/pull/17) ([zStupan](https://github.com/zStupan))
+- Added a Command Line Interface [\#15](https://github.com/firefly-cpp/FireflyAlgorithm/pull/15) ([zStupan](https://github.com/zStupan))
+- Improve workflows [\#14](https://github.com/firefly-cpp/FireflyAlgorithm/pull/14) ([firefly-cpp](https://github.com/firefly-cpp))
+- Add instructions for install FireflyAlgorithm in Arch Linux [\#12](https://github.com/firefly-cpp/FireflyAlgorithm/pull/12) ([carlosal1015](https://github.com/carlosal1015))
+
## [0.3.4](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.3.4) (2022-12-13)
[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.3.3...0.3.4)
diff --git a/CITATION.cff b/CITATION.cff
new file mode 100644
index 0000000..9737ab3
--- /dev/null
+++ b/CITATION.cff
@@ -0,0 +1,21 @@
+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
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..7e77a3a
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..6162d8d
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,54 @@
+# Contributing to Firefly Algorithm
+:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
+
+## Code of Conduct
+This project and everyone participating in it is governed by the [Firefly Algorithm Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [iztok.fister1@um.si](mailto:iztok.fister1@um.si).
+
+## How Can I Contribute?
+
+### Reporting Bugs
+Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible in the [issue template](.github/templates/ISSUE_TEMPLATE.md).
+
+### Suggesting Enhancements
+
+Open new issue using the [feature request template](.github/templates/FEATURE_REQUEST.md).
+
+### Pull requests
+
+Fill in the [pull request template](.github/templates/PULL_REQUEST.md) and make sure your code is documented.
+
+## Setup development environment
+
+### Requirements
+
+* Poetry: [https://python-poetry.org/docs](https://python-poetry.org/docs)
+
+After installing Poetry and cloning the project from GitHub, you should run the following command from the root of the cloned project:
+
+```sh
+poetry install
+```
+
+All of the project's dependencies should be installed and the project ready for further development. **Note that Poetry creates a separate virtual environment for your project.**
+
+### Dependencies
+
+| Package | Version | Platform |
+|----------|:-------:|:--------:|
+| numpy | ^1.26.1 | All |
+
+#### Development dependencies
+
+| Package | Version | Platform |
+|---------|:--------:|:--------:|
+| pytest | ^7.4.3 | Any |
+
+## Development Tasks
+
+### Testing
+
+Manually run the tests:
+
+```sh
+poetry run pytest
+```
\ No newline at end of file
diff --git a/Problems.md b/Problems.md
new file mode 100644
index 0000000..7bb3ef6
--- /dev/null
+++ b/Problems.md
@@ -0,0 +1,387 @@
+# Test Functions
+
+Bellow You'll find the definitions of all the test functions implemented in this package.
+
+## Ackley
+***Function name:*** `ackley`
+
+```math
+f(x) = -20 e^{-0.2 \sqrt{D^{-1} \sum\nolimits_{i=1}^D x_i^2}} - e^{D^{-1} \sum\nolimits_{i=1}^D \cos(2 \pi x_i)} + 20 + e
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Alpine 1
+***Function name:*** `alpine1`
+
+```math
+f(x) = \sum_{i=1}^{D} \lvert {x_i \sin \left( x_i \right) + 0.1 x_i} \rvert
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Alpine 2
+***Function name:*** `alpine2`
+
+```math
+f(x) = \prod_{i=1}^{D} \sqrt{x_i} \sin(x_i)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 2.808^D`$ for $`x_i^* = 7.917`$
+
+## Cigar
+***Function name:*** `cigar`
+
+```math
+f(x) = x_1^2 + 10^6\sum_{i=2}^{D} x_i^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Cosine Mixture
+***Function name:*** `cosine_mixture`
+
+```math
+f(x) = -0.1 \sum_{i=1}^D \cos (5 \pi x_i) - \sum_{i=1}^D x_i^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = -0.1 D`$ for $`x_i^* = 0`$
+
+## Csendes
+***Function name:*** `csendes`
+
+```math
+f(x) = \sum_{i=1}^D x_i^6 \left( 2 + \sin \frac{1}{x_i}\right)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Dixon-Price
+***Function name:*** `dixon_price`
+
+```math
+f(x) = (x_1 - 1)^2 + \sum_{i = 2}^D i (2x_i^2 - x_{i - 1})^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 2^{- \frac{(2^i - 2)}{2^i}}`$
+
+## Griewank
+***Function name:*** `griewank`
+
+```math
+f(x) = \sum_{i=1}^D \frac{x_i^2}{4000} - \prod_{i=1}^D \cos(\frac{x_i}{\sqrt{i}}) + 1
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Katsuura
+***Function name:*** `katsuura`
+
+```math
+\prod_{i=1}^D \left(1 + i \sum_{j=1}^{32} \frac{\lvert 2^j x_i - round\left(2^j x_i \right) \rvert}{2^j} \right)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 1`$ for $`x_i^* = 0`$
+
+## Levy
+***Function name:*** `levy`
+
+```math
+ \begin{gather}
+ \sin^2 (\pi w_1) + \sum_{i = 1}^{D - 1} (w_i - 1)^2 \left( 1 + 10 \sin^2 (\pi w_i + 1) \right) + (w_d - 1)^2 (1 + \sin^2 (2 \pi w_d)),\,\text{where}\\
+ w_i = 1 + \frac{x_i - 1}{4},\, \text{for all } i = 1, \ldots, D
+ \end{gather}
+
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 1`$
+
+## Michalewicz
+***Function name:*** `michalewicz`
+
+```math
+f(x) = - \sum_{i = 1}^{D} \sin(x_i) \sin^{2m}\left( \frac{ix_i^2}{\pi} \right)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`\text{at } D=2,\,f(x^*) = -1.8013`$ for $`x^* = (2.20, 1.57)`$
+
+## Perm 1
+***Function name:*** `perm1`
+
+```math
+f(x) = \sum_{i = 1}^D \left( \sum_{j = 1}^D (j^i + \beta) \left( \left(\frac{x_j}{j}\right)^i - 1 \right) \right)^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = i`$
+
+## Perm 2
+***Function name:*** `perm2`
+
+```math
+f(x) = \sum_{i = 1}^D \left( \sum_{j = 1}^D (j - \beta) \left( x_j^i - \frac{1}{j^i} \right) \right)^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = \frac{1}{i}`$
+
+## Pinter
+***Function name:*** `pinter`
+
+```math
+f(x) = \sum_{i=1}^D ix_i^2 + \sum_{i=1}^D 20i \sin^2 A + \sum_{i=1}^D i \log_{10} (1 + iB^2),\, \text{where}
+```
+```math
+\begin{align}
+A &= (x_{i-1}\sin(x_i)+\sin(x_{i+1})) \\
+B &= (x_{i-1}^2 - 2x_i + 3x_{i+1} - \cos(x_i) + 1)
+\end{align}
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Powell
+***Function name:*** `powell`
+
+```math
+f(x) = \sum_{i = 1}^{D/4} \left[ (x_{4 i - 3} + 10 x_{4 i - 2})^2 + 5 (x_{4 i - 1} - x_{4 i})^2 + (x_{4 i - 2} - 2 x_{4 i - 1})^4 + 10 (x_{4 i - 3} - x_{4 i})^4 \right]
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Qing
+***Function name:*** `qing`
+
+```math
+f(x) = \sum_{i=1}^D \left(x_i^2 - i\right)^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = \pm \sqrt{i}`$
+
+## Quintic
+***Function name:*** `quintic`
+
+```math
+f(x) = \sum_{i=1}^D \left| x_i^5 - 3x_i^4 + 4x_i^3 + 2x_i^2 - 10x_i - 4\right|
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = -1\quad \text{or} \quad x_i^* = 2`$
+
+## Rastrigin
+***Function name:*** `rastrigin`
+
+```math
+f(x) = 10D + \sum_{i=1}^D \left[x_i^2 -10\cos(2\pi x_i)\right]
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Rosenbrock
+***Function name:*** `rosenbrock`
+
+```math
+f(x) = \sum_{i=1}^{D-1} \left[100 (x_{i+1} - x_i^2)^2 + (x_i - 1)^2 \right]
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 1`$
+
+## Salomon
+***Function name:*** `salomon`
+
+```math
+f(x) = 1 - \cos\left(2\pi\sqrt{\sum\nolimits_{i=1}^D x_i^2} \right)+ 0.1 \sqrt{\sum\nolimits_{i=1}^D x_i^2}
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Schaffer 2
+***Function name:*** `schaffer2`
+
+```math
+f(x) = 0.5 + \frac{ \sin^2 \left( x_1^2 - x_2^2 \right) - 0.5 }{ \left[ 1 + 0.001 \left( x_1^2 + x_2^2 \right) \right]^2 }
+```
+
+**Dimensions:** 2
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x^* = (0, 0)`$
+
+## Schaffer 4
+***Function name:*** `schaffer4`
+
+```math
+f(x) = 0.5 + \frac{ \cos^2 \left( \sin \left( \vert x_1^2 - x_2^2\vert \right) \right)- 0.5 }{ \left[ 1 + 0.001 \left( x_1^2 + x_2^2 \right) \right]^2 }
+```
+
+**Dimensions:** 2
+
+**Global optimum:** $`f(x^*) = 0.292579`$ for $`x^* = (0, \pm 1.25313) \text{or} (\pm 1.25313, 0)`$
+
+## Schwefel
+***Function name:*** `schwefel`
+
+```math
+f(x) = 418.9829D - \sum_{i=1}^{D} x_i \sin(\sqrt{\lvert x_i \rvert})
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 420.9687`$
+
+## Schwefel 2.21
+***Function name:*** `schwefel221`
+
+```math
+f(x) = \max_{1 \leq i \leq D} \vert x_i\vert
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Schwefel 2.22
+***Function name:*** `schwefel222`
+
+```math
+f(x) = \sum_{i=1}^{D} \lvert x_i \rvert +\prod_{i=1}^{D} \lvert x_i \rvert
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Sphere
+***Function name:*** `sphere`
+
+```math
+f(x) = \sum_{i=1}^D x_i^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Step
+***Function name:*** `step`
+
+```math
+f(x) = \sum_{i=1}^D \left( \lfloor \lvert x_i \rvert \rfloor \right)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Step 2
+***Function name:*** `step2`
+
+```math
+f(x) = \sum_{i=1}^D \left( \lfloor x_i + 0.5 \rfloor \right)^2
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = -0.5`$
+
+## Styblinski-Tang
+***Function name:*** `styblinski_tang`
+
+```math
+
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = -39.16599 D`$ for $`x_i^* = -2.903534`$
+
+## Trid
+***Function name:*** `trid`
+
+```math
+f(x) = \sum_{i = 1}^D \left( x_i - 1 \right)^2 - \sum_{i = 2}^D x_i x_{i - 1}
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = \frac{-D (D + 4) (D - 1)}{6}`$ for $`x_i^* = i (d + 1 - i)`$
+
+## Weierstrass
+***Function name:*** `weierstrass`
+
+```math
+f(x) = \sum_{i=1}^D \left[ \sum_{k=0}^{k_{max}} a^k \cos\left( 2 \pi b^k ( x_i + 0.5) \right) \right] - D \sum_{k=0}^{k_{max}} a^k \cos \left(\pi b^k \right)
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+## Whitley
+***Function name:*** `whitley`
+
+```math
+f(x) = \sum_{i=1}^D \sum_{j=1}^D \left[\frac{(100(x_i^2-x_j)^2 + (1-x_j)^2)^2}{4000} - \cos(100(x_i^2-x_j)^2 + (1-x_j)^2)+1\right]
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 1`$
+
+## Zakharov
+***Function name:*** `zakharov`
+
+```math
+f(x) = \sum_{i = 1}^D x_i^2 + \left( \sum_{i = 1}^D 0.5 i x_i \right)^2 + \left( \sum_{i = 1}^D 0.5 i x_i \right)^4
+```
+
+**Dimensions:** $D$
+
+**Global optimum:** $`f(x^*) = 0`$ for $`x_i^* = 0`$
+
+
+# References
+
+[1] P. Ernesto and U. Diliman, [“MVF–Multivariate Test Functions Library in C for Unconstrained Global Optimization,”](http://www.geocities.ws/eadorio/mvf.pdf) University of the Philippines Diliman, Quezon City, 2005.
+
+[2] M. Jamil and X.-S. Yang, [“A literature survey of benchmark functions for global optimisation problems,”](https://arxiv.org/abs/1308.4008) International Journal of Mathematical Modelling and Numerical Optimisation, vol. 4, no. 2, p. 150, Jan. 2013, doi: 10.1504/ijmmno.2013.055204.
+
+[3] J. J. Liang, B. Y. Qu, and P. N. Suganthan, [“Problem definitions and evaluation criteria for the CEC 2014 special session and competition on single objective real-parameter numerical optimization,”](http://bee22.com/manual/tf_images/Liang%20CEC2014.pdf) Computational Intelligence Laboratory, Zhengzhou University, Zhengzhou China and Technical Report, Nanyang Technological University, Singapore, vol. 635, no. 2, 2013.
+
+[4] S. Surjanovic and D. Bingham, Virtual Library of Simulation Experiments: Test Functions and Datasets. Retrieved November 7, 2023, from https://www.sfu.ca/~ssurjano/.
diff --git a/README.md b/README.md
index 8516155..b0a5485 100644
--- a/README.md
+++ b/README.md
@@ -2,30 +2,48 @@
----
+
+Firefly Algorithm --- Implementation of Firefly algorithm in Python
+
-# Firefly Algorithm --- Implementation of Firefly algorithm in Python
+
+
+
+
+
+
+
+
+
----
+
+
+
+
+
+
+
-[](https://pypi.python.org/pypi/fireflyalgorithm)
-
-
-[](https://pepy.tech/project/fireflyalgorithm)
-[](https://aur.archlinux.org/packages/python-fireflyalgorithm)
-[](https://github.com/firefly-cpp/FireflyAlgorithm/blob/master/LICENSE)
-
-[](http://isitmaintained.com/project/firefly-cpp/FireflyAlgorithm "Average time to resolve an issue")
-[](http://isitmaintained.com/project/firefly-cpp/FireflyAlgorithm "Percentage of issues still open")
-
+
+
+
-## About
+
+ 📋 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.
+This package implements a nature-inspired algorithm for optimization called Firefly Algorithm (FA) in Python programming language. 🌿🔍💻
-## Installation:
+## 📦 Installation
-Install FireflyAlgorithm with pip:
+To install FireflyAlgorithm with pip, use:
```sh
pip install fireflyalgorithm
```
@@ -37,8 +55,12 @@ To install FireflyAlgorithm on Arch Linux, please use an [AUR helper](https://wi
```sh
$ yay -Syyu python-fireflyalgorithm
```
+To install FireflyAlgorithm on Alpine Linux, use:
+```sh
+$ apk add py3-fireflyalgorithm
+```
-## Usage:
+## 🚀 Usage
```python
from fireflyalgorithm import FireflyAlgorithm
@@ -50,10 +72,22 @@ best = FA.run(function=sphere, dim=10, lb=-5, ub=5, max_evals=10000)
print(best)
```
-### Command line interface
+### Test functions 📈
-The package also comes with a simple command line interface which allows you to evaluate the algorithm on several
-popular 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](Problems.md).
+
+### 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
@@ -83,17 +117,23 @@ options:
--seed SEED Seed for the random number generator
```
-**Note:** The CLI script can also run as a python module (python -m niaarm ...)
+**Note:** The CLI script can also run as a python module (python -m fireflyalgorithm ...).
+
+## 📚 Reference Papers
-## Reference Papers:
+I. 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.
-I. 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.
+I. 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.
Jozef Stefan Institute, Ljubljana, Slovenia, 2012
-I. 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.
+I. 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.
+
+## 📄 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](https://doi.org/10.5281/zenodo.10430919)
-## License
+## 🔑 License
This package is distributed under the MIT License. This license can be found online at .
diff --git a/fireflyalgorithm/__init__.py b/fireflyalgorithm/__init__.py
index 627a2d6..feb6d54 100644
--- a/fireflyalgorithm/__init__.py
+++ b/fireflyalgorithm/__init__.py
@@ -2,4 +2,4 @@
__all__ = ["FireflyAlgorithm"]
-__version__ = "0.4.0"
+__version__ = "0.4.6"
diff --git a/fireflyalgorithm/problems.py b/fireflyalgorithm/problems.py
index 20a412d..c0718cc 100644
--- a/fireflyalgorithm/problems.py
+++ b/fireflyalgorithm/problems.py
@@ -55,9 +55,9 @@ def griewank(x):
def katsuura(x):
dim = len(x)
k = np.atleast_2d(np.arange(1, 33)).T
- i = np.arange(0, dim * 1)
+ i = np.arange(1, dim + 1)
inner = np.round(2**k * x) * (2.0 ** (-k))
- return np.prod(np.sum(inner, axis=0) * (i + 1) + 1)
+ return np.prod(np.sum(inner, axis=0) * i + 1)
def levy(x):
@@ -124,7 +124,7 @@ def powell(x):
return np.sum(term1 + term2 + term3 + term4)
-def quing(x):
+def qing(x):
dim = len(x)
return np.sum(np.power(x**2 - np.arange(1, dim + 1), 2))
@@ -158,7 +158,7 @@ def schaffer2(x):
def schaffer4(x):
return (
0.5
- + (np.cos(np.sin(x[0] ** 2 - x[1] ** 2)) ** 2 - 0.5)
+ + (np.cos(np.sin(abs(x[0] ** 2 - x[1] ** 2))) ** 2 - 0.5)
/ (1 + 0.001 * (x[0] ** 2 + x[1] ** 2)) ** 2
)
@@ -170,11 +170,11 @@ def schwefel(x):
)
-def schwefel21(x):
+def schwefel221(x):
return np.amax(np.abs(x))
-def schwefel22(x):
+def schwefel222(x):
return np.sum(np.abs(x)) + np.prod(np.abs(x))
@@ -245,7 +245,7 @@ def zakharov(x):
"perm2": perm2,
"pinter": pinter,
"powell": powell,
- "quing": quing,
+ "qing": qing,
"quintic": quintic,
"rastrigin": rastrigin,
"rosenbrock": rosenbrock,
@@ -253,8 +253,8 @@ def zakharov(x):
"schaffer2": schaffer2,
"schaffer4": schaffer4,
"schwefel": schwefel,
- "schwefel21": schwefel21,
- "schwefel22": schwefel22,
+ "schwefel221": schwefel221,
+ "schwefel222": schwefel222,
"sphere": sphere,
"step": step,
"step2": step2,
diff --git a/poetry.lock b/poetry.lock
index 0bf4182..3c04aca 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]]
name = "colorama"
@@ -13,13 +13,13 @@ files = [
[[package]]
name = "exceptiongroup"
-version = "1.1.3"
+version = "1.2.2"
description = "Backport of PEP 654 (exception groups)"
optional = false
python-versions = ">=3.7"
files = [
- {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"},
- {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"},
+ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"},
+ {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"},
]
[package.extras]
@@ -38,65 +38,69 @@ files = [
[[package]]
name = "numpy"
-version = "1.26.1"
+version = "1.26.4"
description = "Fundamental package for array computing in Python"
optional = false
-python-versions = "<3.13,>=3.9"
+python-versions = ">=3.9"
files = [
- {file = "numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af"},
- {file = "numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575"},
- {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244"},
- {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67"},
- {file = "numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2"},
- {file = "numpy-1.26.1-cp310-cp310-win32.whl", hash = "sha256:d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297"},
- {file = "numpy-1.26.1-cp310-cp310-win_amd64.whl", hash = "sha256:d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab"},
- {file = "numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a"},
- {file = "numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9"},
- {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3"},
- {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974"},
- {file = "numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c"},
- {file = "numpy-1.26.1-cp311-cp311-win32.whl", hash = "sha256:b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b"},
- {file = "numpy-1.26.1-cp311-cp311-win_amd64.whl", hash = "sha256:3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53"},
- {file = "numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f"},
- {file = "numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24"},
- {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e"},
- {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124"},
- {file = "numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c"},
- {file = "numpy-1.26.1-cp312-cp312-win32.whl", hash = "sha256:af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66"},
- {file = "numpy-1.26.1-cp312-cp312-win_amd64.whl", hash = "sha256:9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7"},
- {file = "numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e"},
- {file = "numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617"},
- {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e"},
- {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908"},
- {file = "numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5"},
- {file = "numpy-1.26.1-cp39-cp39-win32.whl", hash = "sha256:d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104"},
- {file = "numpy-1.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2"},
- {file = "numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668"},
- {file = "numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42"},
- {file = "numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f"},
- {file = "numpy-1.26.1.tar.gz", hash = "sha256:c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe"},
+ {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"},
+ {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"},
+ {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"},
+ {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"},
+ {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"},
+ {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"},
+ {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"},
+ {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"},
+ {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"},
+ {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"},
+ {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"},
+ {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"},
+ {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"},
+ {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"},
+ {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"},
+ {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"},
+ {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"},
+ {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"},
+ {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"},
+ {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"},
+ {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"},
+ {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"},
+ {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"},
+ {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"},
+ {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"},
+ {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"},
+ {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"},
+ {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"},
+ {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"},
+ {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"},
+ {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"},
+ {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"},
+ {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"},
+ {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"},
+ {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"},
+ {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"},
]
[[package]]
name = "packaging"
-version = "23.2"
+version = "24.2"
description = "Core utilities for Python packages"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
- {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
+ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
+ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
]
[[package]]
name = "pluggy"
-version = "1.3.0"
+version = "1.5.0"
description = "plugin and hook calling mechanisms for python"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"},
- {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"},
+ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"},
+ {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"},
]
[package.extras]
@@ -105,13 +109,13 @@ testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pytest"
-version = "7.4.3"
+version = "7.4.4"
description = "pytest: simple powerful testing with Python"
optional = false
python-versions = ">=3.7"
files = [
- {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"},
- {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"},
+ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
+ {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
]
[package.dependencies]
@@ -127,16 +131,46 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
[[package]]
name = "tomli"
-version = "2.0.1"
+version = "2.2.1"
description = "A lil' TOML parser"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
- {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
+ {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
+ {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
+ {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
+ {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
+ {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
+ {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
+ {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
+ {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
+ {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
+ {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
+ {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
+ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
+ {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
]
[metadata]
lock-version = "2.0"
-python-versions = "^3.9,<3.13"
-content-hash = "aa27aa586ebf5e13d1936db455cb5da27cc641ae1ffc6434877928a3baa9bb82"
+python-versions = "^3.9,<3.14"
+content-hash = "3cd4e3325b88b677715a63c130cd79d70a3e3586c0df36c5d40aba429342caa7"
diff --git a/pyproject.toml b/pyproject.toml
index 9476ee2..c7346a0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,19 +1,21 @@
[tool.poetry]
name = "fireflyalgorithm"
-version = "0.4.0"
+version = "0.4.6"
description = "Implementation of Firefly Algorithm in Python"
authors = ["Iztok Fister Jr. ", "Luka Pečnik ", "Žiga Stupan "]
+keywords = ['computational intelligence', 'firefly algorithm', 'swarm intelligence', 'optimization']
license = "MIT"
readme = "README.md"
homepage = "https://github.com/firefly-cpp/FireflyAlgorithm"
repository = "https://github.com/firefly-cpp/FireflyAlgorithm"
include = [
- { path="LICENSE", format="sdist" }
+ { path="LICENSE", format="sdist" },
+ { path="Problems.md", format="sdist" }
]
[tool.poetry.dependencies]
-python = "^3.9,<3.13"
+python = "^3.9,<3.14"
numpy = "^1.26.1"
[tool.poetry.group.test.dependencies]
diff --git a/tests/test_problems.py b/tests/test_problems.py
index 7ced6bb..c91fed9 100644
--- a/tests/test_problems.py
+++ b/tests/test_problems.py
@@ -17,7 +17,7 @@
perm2,
pinter,
powell,
- quing,
+ qing,
quintic,
rastrigin,
rosenbrock,
@@ -25,8 +25,8 @@
schaffer2,
schaffer4,
schwefel,
- schwefel21,
- schwefel22,
+ schwefel221,
+ schwefel222,
sphere,
step,
step2,
@@ -56,7 +56,7 @@ def test_problem_factory(self):
self.assertEqual(get_problem("perm2"), perm2)
self.assertEqual(get_problem("pinter"), pinter)
self.assertEqual(get_problem("powell"), powell)
- self.assertEqual(get_problem("quing"), quing)
+ self.assertEqual(get_problem("qing"), qing)
self.assertEqual(get_problem("quintic"), quintic)
self.assertEqual(get_problem("rastrigin"), rastrigin)
self.assertEqual(get_problem("rosenbrock"), rosenbrock)
@@ -64,8 +64,8 @@ def test_problem_factory(self):
self.assertEqual(get_problem("schaffer2"), schaffer2)
self.assertEqual(get_problem("schaffer4"), schaffer4)
self.assertEqual(get_problem("schwefel"), schwefel)
- self.assertEqual(get_problem("schwefel21"), schwefel21)
- self.assertEqual(get_problem("schwefel22"), schwefel22)
+ self.assertEqual(get_problem("schwefel221"), schwefel221)
+ self.assertEqual(get_problem("schwefel222"), schwefel222)
self.assertEqual(get_problem("sphere"), sphere)
self.assertEqual(get_problem("step"), step)
self.assertEqual(get_problem("step2"), step2)
@@ -135,9 +135,9 @@ def test_powell(self):
x = np.zeros(5)
self.assertAlmostEqual(powell(x), 0.0)
- def test_quing(self):
+ def test_qing(self):
x = np.sqrt(np.arange(1, 6))
- self.assertAlmostEqual(quing(x), 0.0)
+ self.assertAlmostEqual(qing(x), 0.0)
def test_quintic(self):
x = np.full(5, -1)
@@ -175,11 +175,11 @@ def test_schwefel(self):
def test_schwefel21(self):
x = np.zeros(5)
- self.assertAlmostEqual(schwefel21(x), 0.0)
+ self.assertAlmostEqual(schwefel221(x), 0.0)
def test_schwefel22(self):
x = np.zeros(5)
- self.assertAlmostEqual(schwefel22(x), 0.0)
+ self.assertAlmostEqual(schwefel222(x), 0.0)
def test_sphere(self):
x = np.zeros(5)
@@ -190,8 +190,8 @@ def test_step(self):
self.assertAlmostEqual(step(x), 0.0)
def test_step2(self):
- x = np.full(5, 0.5)
- self.assertAlmostEqual(step(x), 0.0)
+ x = np.full(5, -0.5)
+ self.assertAlmostEqual(step2(x), 0.0)
def test_styblinski_tang(self):
x = np.full(5, -2.903534018185960)
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy