State-Based Swarm Algorithm