Particle Swarm Optimization with 5, 50, 500, 5000 particles
This is a variation on the Particle swarm optimization algorithm and visualized with OpenGL. this PSO (and true PSO) is a fairly straightforward algorithm step 1: initialize all particles to random velocities and accelerations step 2: determine which particle is closest to the goal step 3: adjust all accelerations toward that closest particle step 4: update particles positions based on velocity, update velocity based on acceleration step 5: go to step 2. Traditional PSO adds a bit more complexities such as keep track of your global best position and move to a location that is somewhere between your global best and the swarms' current best. There are a lot of interesting variations that could be performed for this algorithm. This version of the algorithm also has a random factor into it, during step 3 there is a 70% chance that the particle will not adjust his acceleration towards the current leader. This gives a nice fan out effect as the particles are allowed to carry on with their current trajectory accept for the 30% where they are trying to get to their leader. This was programmed in haskell.