Particle Swarm Optimization
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.forth Profile…
 Up
Particle Swarm Optimization         


Author: Marcel Hendrix
Date: Feb 2, 2008 02:19

Triggered by a (German) C't article, last week I experimented a bit
with Particle Swarm Optimization. The original C++ code accompanying
the article is *completely unreadable* (64 apparently auto-generated
files without a clear centre, and providing zero insight), so
I reimplemented the algorithm from the article description and
Googled references:
http://www.gamasutra.com/features/20051213/villiers_01.shtml
http://cirg.cs.up.ac.za/visitPage.php?pageID=resgroups&groupID=swarms&showContent... .

Unfortunately, I found the results quite unconvincing. The number of
calculations needed for successful completion far exceeds the number
that would be needed by simulated annealing (the method I finally
selected for an HF amplifier optimization job at work).

However, the appended code may save interested hands-on-type readers
some digging around. And the pictures are nice too :-)

The display shows the swarm converging to the strongest peak of some
target function. If you make the strongest peak narrower, the swarm
ignores it. This is certainly not what should happen.

For this kind of program OOF could've been useful, but I managed
splendidly with some ad-hoc constructs.
Show full article (7.80Kb)
32 Comments
Re: Particle Swarm Optimization         


Author: Paul E. Bennett
Date: Feb 3, 2008 13:30

Marcel Hendrix wrote:
> Triggered by a (German) C't article, last week I experimented a bit
> with Particle Swarm Optimization. The original C++ code accompanying
> the article is *completely unreadable* (64 apparently auto-generated
> files without a clear centre, and providing zero insight), so
> I reimplemented the algorithm from the article description and
> Googled references:

[%%X]

Well Marcel, that should keep those baying for sight of decent code amused
for a while. ;>

--
********************************************************************
Paul E. Bennett...............topmail.co.uk>
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-811095
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
no comments
Re: Particle Swarm Optimization         


Author: Anton Ertl
Date: Feb 10, 2008 09:29

mhx@iae.nl (Marcel Hendrix) writes:
>Triggered by a (German) C't article, last week I experimented a bit
>with Particle Swarm Optimization.
...
>Unfortunately, I found the results quite unconvincing. The number of
>calculations needed for successful completion far exceeds the number
>that would be needed by simulated annealing (the method I finally
>selected for an HF amplifier optimization job at work).

Yes. Maybe I missed something, but the particle swarm stuff seems to
be similar to ant algorithms to me; and that fails to convince me, too
(but maybe I miss the point of that, too): We know the best path yet
after the first ant walks it, no need to simulate multiple ants
walking the same path. Such algorithms may have a place if you have
massive parallelism, and very limited communication bandwidth compared
to computation, but not in settings that most of us use.
Show full article (1.48Kb)
22 Comments
Re: Particle Swarm Optimization         


Author: Marcel Hendrix
Date: Feb 10, 2008 12:41

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: Particle Swarm Optimization
> mhx@iae.nl (Marcel Hendrix) writes:
>> Triggered by a (German) C't article, last week I experimented a bit
>> with Particle Swarm Optimization.
> ...
>> Unfortunately, I found the results quite unconvincing.
[..]
> Yes. Maybe I missed something, but the particle swarm stuff seems to
> be similar to ant algorithms to me; and that fails to convince me, too
> (but maybe I miss the point of that, too): We know the best path yet
> after the first ant walks it, no need to simulate multiple ants
> walking the same path. Such algorithms may have a place if you have
> massive parallelism, and very limited communication bandwidth compared
> to computation, but not in settings that most of us use.
Show full article (2.05Kb)
no comments
Re: Particle Swarm Optimization         


Author: Albert van der Horst
Date: Feb 11, 2008 02:52

In article <22823313213559@frunobulax.edu>, Marcel Hendrix wrote:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: Particle Swarm Optimization
>> mhx@iae.nl (Marcel Hendrix) writes:
>>> Triggered by a (German) C't article, last week I experimented a bit
>>> with Particle Swarm Optimization.
>> ...
>>> Unfortunately, I found the results quite unconvincing.
>[..]
>> Yes. Maybe I missed something, but the particle swarm stuff seems to
>> be similar to ant algorithms to me; and that fails to convince me, too
>> (but maybe I miss the point of that, too): We know the best path yet
>> after the first ant walks it, no need to simulate multiple ants
>> walking the same path. Such algorithms may have a place if you have
>> massive parallelism, and very limited communication bandwidth compared
>> to computation, but not in settings that most of us use.
>
>Well, ant algorithms can solve 'discrete' problems (without
>derivatives) which is useful. AFAIK, particle swarms can't
>handle such discrete problems, and are very bad at accurately
>finding derivatives. Apparently the algorithm is so deeply ...
Show full article (2.26Kb)
17 Comments
Re: Particle Swarm Optimization         


Author: Anton Ertl
Date: Feb 11, 2008 04:55

mhx@iae.nl (Marcel Hendrix) writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: Particle Swarm Optimization
>> mhx@iae.nl (Marcel Hendrix) writes:
>>> Triggered by a (German) C't article, last week I experimented a bit
>>> with Particle Swarm Optimization.
>> ...
>>> Unfortunately, I found the results quite unconvincing.
>[..]
>> Yes. Maybe I missed something, but the particle swarm stuff seems to
>> be similar to ant algorithms to me; and that fails to convince me, too
>> (but maybe I miss the point of that, too): We know the best path yet
>> after the first ant walks it, no need to simulate multiple ants
>> walking the same path. Such algorithms may have a place if you have
>> massive parallelism, and very limited communication bandwidth compared
>> to computation, but not in settings that most of us use.
>
>Well, ant algorithms can solve 'discrete' problems (without
>derivatives) which is useful. AFAIK, particle swarms can't
>handle such discrete problems, and are very bad at accurately
>finding derivatives. ...
Show full article (3.61Kb)
1 Comment
Re: Particle Swarm Optimization         


Author: Marcel Hendrix
Date: Feb 11, 2008 09:19

Albert van der Horst writes Re: Particle Swarm Optimization
[..]
> Was your ampliphier a discrete problem?

No. But it has multiple solutions at (sub)multiples of the
switching frequency, and near a solution the phase relation
between current and voltage is extremely important (ns resolution
required). Furthermore, I needed to minimize a vector function,
so it was necessary to 'play' with the weights of the
vector-to-scalar conversion.

[..]
> Given there are about thousand products a week, so the search space
> was 1000! to start with, and given that computer assisted planning
> already was very near optimal, I gave the customer little hope that a
> s.a. solution could better this, so the project was cancelled.

How did you know it was already optimal? (I assume you not really
meant to say that was a given). Even if your client would not
implement the final program, they should've been interested to
know by how much their current software was off the optimum.
Show full article (1.67Kb)
no comments
Re: Particle Swarm Optimization         


Author: Marcel Hendrix
Date: Feb 11, 2008 09:42

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: Particle Swarm Optimization
[..]
> mhx@iae.nl (Marcel Hendrix) writes:
>>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: Particle Swarm Optimization
[..]
>>Well, ant algorithms can solve 'discrete' problems (without
>>derivatives) which is useful. AFAIK, particle swarms can't
>>handle such discrete problems, and are very bad at accurately
>>finding derivatives.
> Ok. I was not looking at the algorithms in such detail. It just
> seems to me that, as soon as the first ant or particle hits a (local)
> optimum,

How would they know it was an optimum?
> the others are unnecessary for finding that optimum, and
> these algorithms also don't seem to provide a useful way to get out of
> the local optimum and find another one.
Show full article (2.05Kb)
no comments
Re: Particle Swarm Optimization         


Author: Albert van der Horst
Date: Feb 12, 2008 03:39

In article <88363612213559@frunobulax.edu>, Marcel Hendrix wrote:
>Albert van der Horst writes Re: Particle Swarm Optimization
>[..]
>
>> Was your ampliphier a discrete problem?
>
>No. But it has multiple solutions at (sub)multiples of the
>switching frequency, and near a solution the phase relation
>between current and voltage is extremely important (ns resolution
>required). Furthermore, I needed to minimize a vector function,
>so it was necessary to 'play' with the weights of the
>vector-to-scalar conversion.
>
>[..]
>
>> Given there are about thousand products a week, so the search space
>> was 1000! to start with, and given that computer assisted planning
>> already was very near optimal, I gave the customer little hope that a
>> s.a. solution could better this, so the project was cancelled.
> ...
Show full article (2.70Kb)
no comments
Re: Particle Swarm Optimization         


Author: John Doty
Date: Feb 12, 2008 10:00

Marcel Hendrix wrote:
> For the amplifier problem, a single algorithmic step costs a full
> eight HF-cycle simulation of the entire circuit. I didn't do the
> simulation in SPICE, but wrote the circuit equations in Matlab
> so that the amplifier became a function of its component values.

Cool. I've done similar but rather less sophisticated things in
Mathematica using a gnetlist back end I wrote to translate gEDA
schematics into Mathematica equations. Take a look at:

http://www.noqsi.com/images/gEDAmath.nb.pdf

I don't suppose it would be hard to modify the code (Guile) to feed a
different math package. My code is now part of the regular gEDA
distribution, all GPL. It's nice to be able to draw the circuit rather
than code the equations!
Show full article (1.00Kb)
13 Comments
1 2 3 4