Multiparticle genetic algorithm
- From: scopnot@xxxxxxxxx
- Date: Mon, 21 Apr 2008 20:14:54 -0700 (PDT)
Suppose I have to find equilibrium configurations of particles placed
in a 2 dimensional circle. I am trying to do this with a genetic
The fitness function (energy) for the particles is as simple as F =
0.5*(double sum over all particles of 1/(distance between two
F needs to have minimum value.
For example, in a case with 2 particles, they'd place at opposite ends
of circle (so the distance between them was maximal).
The problem I am having is that the more particles I add, the worse
the algorithm behaves.
For example with 10 particles it would hardly converge to the solution
(which is 9 particles on the edge of circle, and one in the middle).
Could it be that genetic algorithm does not work well for
As much as I have read, it always describes finding a value x such
that f(x) is maximum (or minimum).
I have a case where I have f(x1, x2, ..., xN), a multi-valued
function, where each x_i is a particle.
My algorithm works as following:
As the problem is 2 dimensional, it is calculated in polar coordinate
system. A particle is represented by tuple (radius, angle), where both
radius and angle is a binary string.
1) Create some random systems with N particles.
2) From these systems, randomly select fittest proportional to their
3) Cross-over the systems to get more children.
The cross over of systems happens like this:
For particle1 in system1:
Take particle2 from system2:
Cross-over radius part between particle1 and particle2
Cross-over angle part between particle1 and particle2
I tried both one-point crossover and two-point crossover.
4) Mutate all the systems (flip bits in both radius and angle
proportional to the length of binary string)
I was thinking that cross-over is not accurate, as I take some
particle from first system and some from the second system, and they
might be like on opposite sides. As I cross over them, I end up with a
particle neither near the first, nor the second.
I made the crossover part so that as I take particle from the first
system, I search for the nearest particle in system2 and perform
crossover with only that particle. But this did not improve the
PS. It was very difficult to explain all the details. If you did not
understand some part, I'll be happy to explain it in more details.
- Prev by Date: Multiparticle genetic algorithm
- Next by Date: comp.ai.genetic charter
- Previous by thread: Multiparticle genetic algorithm
- Next by thread: Re: Multiparticle genetic algorithm