Particle swarm optimization: Difference between revisions
→{{header|J}}: simplify defn of michalewicz
(updated task description) |
(→{{header|J}}: simplify defn of michalewicz) |
||
Line 81:
GlobalBestValue: _1.91322</lang>
Apply to Michalewicz Function:
▲ michalewicz =: 3 : '-(+/ (i. #y) m0 y)'
state =: pso_init 0 0 ; (pi,pi) ; 0.3 0.3 0.3; 1000
Line 90 ⟶ 89:
omega, phip, phig: 0.3 0.3 0.3
nParticles: 1000
state =: (michalewicz pso)^:30 state
|