Uses Particle Swarm Optimization to efficiently solve for an approximately optimal solution to a complex function whose input and output relation is unclear. By simulating a swarm of particles semi-randomly wandering about the search space being pulled towards their the particle that has the most optimal solution currently as well as in random directions the particle swarm will search over the space before converging on an approximate optimal solution.
Alter the global variables to select a version of Particle Swarm Algorithm as well as how many iterations without improvement are allowed until the program terminates, etc. Then run the script to efficiently approximate the optimal solution.