optimization algorithms
hillclimb until either max_evaluations is reached or we are at a local optima
repeatedly hillclimb until max_evaluations is reached
class to wrap an objective function and keep track of the best solution evaluated
generator to return all possible variations where the section between two cities are swapped
generator to create all possible variations where two cities have been swapped
generator of point-to-point distances along a tour
Travelling Salesman Problem @see http://en.wikipedia.org/wiki/Travelling_salesman_problem @param points : iterable containing all points @param dist : function returning the distance between 2 points : def dist(a,b): @param max_iterations :max number of optimization steps @param start_temp, alpha : params for the simulated annealing algorithm. if None, hill climbing is used @param close : computes closed TSP. if False, open TSP starting at points[0] @return iterations,score,best : number of iterations used, minimal length found, best path as list of indexes of points