Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAT #286

Closed
RamziAI opened this issue Jan 8, 2021 · 2 comments
Closed

BAT #286

RamziAI opened this issue Jan 8, 2021 · 2 comments

Comments

@RamziAI
Copy link

RamziAI commented Jan 8, 2021

Hello. I tried to use the BAT Optimization Algorithm and I expected to get approximately 0, with such benchmark functions as Rosebrock and Ackley, a number of iterations 66000. But the result I get is much higher. I wanted to know is it because of code, or by the algorithm itself?

@RamziAI
Copy link
Author

RamziAI commented Jan 8, 2021

Here I used 1000 iterations, just because the value doesn't decrease after certain point.
from NiaPy.task import StoppingTask, OptimizationType
from NiaPy.algorithms.basic import BatAlgorithm
for i in range(1000):
task = StoppingTask(D=30, nFES=1000, benchmark='ackley')
algorithm = BatAlgorithm(NP=30)
best = algorithm.run(task)
print(best[-1])

@firefly-cpp
Copy link
Contributor

Hi @RamziAI

BA has some limits in solving such benchmarks. It is recommended that you approach with other well-known solvers, e. g. DE or jDE.

Just a remark - You are not running your algorithm using 1000 iterations, but you operate with number of function evaluations. You could use nGEN instead of nFES. However, I believe there will not be any special difference in final solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants