06 May, 2008

particle swarm optimization (pso) in c#

i was going to give a presentation at "code camp" on particle swarm optimization (pso), but unfortunately was not able to do so because of circumstances beyond my control.

so, i've decided to post my c# implementation here so you can take look at it and play with it. the code graphs the movement of the particle swarm, so it's cool to see how the different pso parameters affect the movement of the swarm.

the swarm is not divided into neighborhoods and each member only knows about their local best and the swarm's best value to date. if you want to change the code so that i does neighborhoods, be my guest.

the code is really rough, especially in the way the UI runs. also, there's no way to dynamically change anything; if you want to make any sort of change you have to find the pertinent code, recompile it and rerun it (ie. there are no config files, no input paramenters, nothing).

so, if you think my code sucks, please let me know!

4 comments:

Firestrand said...

You may want to take a look at some research on the weights of the constriction factors. I would also suggest using a Mersenne Twister implementation for randomness. Implementing the neighborhood concept would be good too. Enjoy.

Anonymous said...

Harder to run without having 1 csproj file for entire project since soln file will not work across computers

Esteban Araya said...

@Anonymous,

I don't see why multiples assemblies is a problem for you. Let me know how I can help.

Hossein Hasanpour said...

The link is dead , would you please re upload it?

Post a Comment