Changing lowest_cost to min fixed while loop for AI!