max v2; #N vpatcher 179 117 654 711; #P button 147 287 29 0; #P user hslider 105 540 18 128 128 1 0 0; #P user hslider 105 523 18 128 128 1 0 0; #P user hslider 105 506 18 128 128 1 0 0; #P user hslider 105 489 18 128 128 1 0 0; #P user hslider 105 472 18 128 128 1 0 0; #P user hslider 95 162 18 128 128 1 0 0; #P flonum 38 422 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 18 378 50 9 pso 5 1 2; #P comment 72 379 254 196618 5 particles \, 1 dimention \, and neightborhood size 2; #P message 121 226 53 9 target \$1; #P message 134 206 83 9 rand_pop 0 127; #P comment 261 206 146 196618 $1 initialize the population; #P newex 18 443 89 9 route 0 1 2 3 4; #P message 108 246 50 9 reset; #P comment 260 228 95 196618 $2 Set the Target; #P comment 260 249 114 196618 $3 Initialize the PSO; #P message 34 167 50 9 help; #N vpatcher 10 59 400 186; #P message 22 52 80 9 optim_thresh 0; #P outlet 16 77 15 0; #P comment 108 52 214 196618 Smaller systems like smaller thresholds.; #P newex 22 30 50 9 loadbang; #P connect 3 0 2 0; #P connect 0 0 3 0; #P pop; #P newobj 18 138 61 9 patcher init; #P newex 58 402 86 9 print Minimized; #P message 94 321 50 9 1; #P message 147 321 50 9 0; #P newex 95 185 50 9 t b b f b; #P comment 260 321 98 196618 $4 Start iterating; #P comment 259 407 96 196618 $5 Stop iterating; #P comment 243 163 86 196618 <- Start Here; #P comment 14 48 398 196618 A PSO generates a random (or preset) polulation of solutions. These particles accellerate towards the neighbors' and global best solution. As the PSO iterates the population becomes more and more similar to the target. You can specify the number of particles \, dimentions and the size of the neighborhoods. Please note that if you change the target before the PSO has minimized it may not minimize.; #P newex 109 347 50 9 metro 20; #P comment 14 27 291 196617 PSO - Particle Swarm Optimizer - Copyright Ben Bogart 2003; #P connect 1 0 20 0; #P connect 10 0 20 0; #P connect 11 0 20 0; #P connect 14 0 20 0; #P connect 17 0 20 0; #P connect 18 0 20 0; #P connect 20 0 15 0; #P connect 20 1 21 0; #P connect 20 2 9 0; #P connect 6 0 8 0; #P connect 22 0 6 0; #P connect 15 0 23 0; #P connect 15 1 24 0; #P connect 15 2 25 0; #P connect 15 3 26 0; #P connect 15 4 27 0; #P connect 6 1 14 0; #P connect 7 0 1 0; #P connect 8 0 1 0; #P connect 6 2 18 0; #P connect 6 3 17 0; #P connect 20 2 28 0; #P connect 28 0 7 0; #P pop;