function [dist] = tour_dist(coords)

num_cities = size(coords, 1);
dist = 0;
for i = 1:num_cities
   start = coords(i,:);
   
   if i == num_cities
       dest = coords(1,:);
   else
       dest = coords(i+1,:);
   end
   
   dist = dist + sqrt(sum((start - dest).^2));
end