Hi
Is it possible to let the swarm size in the Particle Swarm Optimization be dependent on the number of iterations or maybe the value of the objective function?
Let's say that in the begining I would like to have a large swarm size, in order to find the "best place" to search, but then when it is found, i want to update the particles faster?
Hope It makes sense
Br

 Akzeptierte Antwort

John D'Errico
John D'Errico am 14 Mai 2020
Bearbeitet: John D'Errico am 14 Mai 2020

0 Stimmen

You could write your own PSO tool. But that would be your choice. And there is no assurance this will work better. And structuring exactly the profile of how the decrease works might be an interesting and difficult problem since it would need to work on any general problem.
In fact, it might even be the WORST way to write such a solver. Why? Because it is when you get stuck in a local optimum that you want a LARGE swarm size, to give you the best chance of tunneling out of the local hole the solver is stuck inside.
Another problem with decreasing the swarm size near the end is this is where you are looking for tiny incremental changes to improve the convergence. Remember that near a minimum, any function that is well behaved, thus sufficiently differentiable, the solution will be at a relatively flat spot. As such, keeping the swarm size as large as possible will still help convergence rates. There are even some fractal arguments that argue for a uniform swarm size.
Paradoxically, there are some cases where what seems to be a logical heuristic algorithmic choice is actually the worst thing you can do. I know of at least one case where this is true in the design of optimization algorithms.
But do as you wish. You COULD write your own solver. Or, you could just use the existing solver, employing the largest large swarm size you can afford all the way down, and get a large cup of coffee while you wait. Personally, I dislike coffee, because it tastes bad and just keeps me awake.

2 Kommentare

Malt0668
Malt0668 am 14 Mai 2020
Thanks alot for the answer!
Haha at the moment the coffee would have to last around a week.
John D'Errico
John D'Errico am 14 Mai 2020
So it would be cold, old stale coffee. Ugh. And Starbucks is still closed down: probably non-essential. Too expensive anyway.
I can offer some consolation that I now have roughly 933 hours invested in one problem I am working on. Some of that time is with 8 processors working flat out on parts of the solution, so a lot of CPU cyles on a moderately fast CPU.
I do tricks like set it up to run for a few hours when I am doing something else, or let it run overnight, then effectively save the results in a file so I can see how things went and then continue later from that point.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by