Show Me the Way to Go Home
Ned Gulley on 24 Oct 2021
% This is a traveling salesman problem
% Use the cities defined by x
% Circuit length calculation function
% I realized I could just throw out the distance matrix altogether.
% The result is economical in code space, but obviously expensive in
% computation, since it constantly recomputes the same distances over and
% over, but oh well.
% Improve my algorithm to find a shorter route r
% Pick two cities, and see if it's faster to flip the route between
% them. Here I'm trying to preserve the starting and finishing cities.
axis square off
set(gcf,Color=[0 0.1 0.3])