Optimized walking tours of New York City and Philadelphia


Published on March 25, 2015 by Dr. Randal S. Olson

genetic algorithm machine learning optimization traveling salesman problem walking tour

6 min READ


In the past couple weeks, I've shown you how to use machine learning to improve the efficiency of road trips all over the world, including the U.S., Europe, and South America. In this post, I'd like to show you how we can use the exact same algorithm to optimize walking tours in large cities.

If you're anything like me whenever you stop in a big city, you have a few main attractions that you'd like to visit and end up haphazardly spending half your day staring at maps and trying to figure out the public transit system.

However, by focusing on a limited few attractions, we're missing out on dozens of interesting places that we could've visited along the way. This is where the route optimization algorithm can come into play again: If we hand the algorithm the list of popular attractions in a city, it can provide us an efficient walking tour around the city that hits all of those attractions.

Below, I've mapped out optimized walking tours for New York City and Philadelphia that hit the most popular attractions in each city according to TripAdvisor. These walking tours by no means represent the "definitive" walking tours for the cities, but both tours are guaranteed to give you a great taste of the cities while you're there.

Optimized walking tour of New York City

If skyscrapers, museums, and large crowds are your gig, then this walking tour is for you. In 4.5 hours of walking, you'll hit major sights like Central Park, Times Square, the Empire State Building, the Statue of Liberty, and more. This walking tour covers 14 miles of Manhattan, so come prepared with your walking shoes for what will add up to a half marathon.

Of course, if you want to stop and actually enjoy the sights along the way (which I strongly advise!), this tour could easily end up taking several days. Between long lines, hour-long museum tours, and frequent stops for Cronuts, you'll likely only be able to hit a handful of stops per day before everything closes down. Keep that in mind when dividing this trip up over several days.

nyc-optimized-walking-tour

Click here for an interactive version

If 14 miles of walking sounds like too much, you can easily cut down on walking by taking the subway or bus for some of the longer legs of the trek. Or better yet, the same tour can be followed on a bike instead.

Here's the Google Maps walking directions: [1] [2] [3]

Here's the full list of attractions in order:

  1. American Museum of Natural History, Central Park West, New York, NY
  2. The Metropolitan Museum of Art, 1000 5th Avenue, New York, NY 10028
  3. The Frick Collection, East 70th Street, New York, NY
  4. Central Park, New York, NY
  5. The Museum of Modern Art (MOMA), West 53rd Street, New York, NY
  6. St. Patrick's Cathedral, 5th Avenue, New York, NY
  7. Rockefeller Center, 45 Rockefeller Plaza, New York, NY 10111
  8. Radio City Music Hall, Avenue of the Americas, New York, NY
  9. Theater District, New York, NY
  10. Times Square, New York, NY
  11. Bryant Park, New York, NY
  12. New York Public Library, New York, NY
  13. Chrysler Building, Lexington Avenue, New York, NY
  14. Grand Central Terminal, New York, NY
  15. The Morgan Library & Museum, Madison Avenue, New York, NY
  16. Empire State Building Observation Deck, 5th Avenue, New York, NY
  17. Madison Square Garden, Pennsylvania Plaza, New York, NY
  18. The High Line, New York, NY 10011
  19. Chelsea Market, 9th Avenue, New York, NY
  20. Ground Zero Museum Workshop, West 14th Street, New York, NY
  21. Greenwich Village, New York, NY
  22. Washington Square Park, New York, NY
  23. SoHo, New York, NY
  24. Tenement Museum, Orchard Street, New York, NY
  25. St. Paul's Chapel, Broadway, New York, NY
  26. The National September 11 Memorial & Museum, New York, NY 10006
  27. Statue of Liberty

Optimized walking tour of Philadelphia

The Liberty Bell, cheese steaks, and obnoxious sports fans: These are some of the things that Philadelphia is widely known for. But did you know that Philadelphia is home to one of the largest urban park systems in the U.S.? Or that it's home to America's first zoo?

This 12-mile, 4-hour walking tour will take you through some of the best that Philadelphia has to offer, from beautiful parks to historic landmarks to breathtaking outdoor art collections. Again, don't take this tour lightly, and plan to spend at least a few days in total enjoying the sights.

philly-optimized-walking-tour

Click here for an interactive version

The same disclaimers from the NYC walking tour apply here: If 12 miles of walking sounds like too much, you can easily cut down on walking by taking public transit for some of the longer legs of the trek. Or better yet, the same tour can be followed on a bike instead.

Here's the Google Maps walking directions: [1] [2] [3]

Here's the full list of attractions in order:

  1. Fairmount Park, Philadelphia, PA
  2. Please Touch Museum, 4231 Avenue of the Republic, Philadelphia, PA
  3. Philadelphia Zoo, West Girard Avenue, Philadelphia, PA
  4. Philadelphia Museum of Art, Benjamin Franklin Parkway, Philadelphia, PA
  5. Rocky Steps, Benjamin Franklin Parkway, Philadelphia, PA
  6. Eastern State Penitentiary, Fairmount Avenue, Philadelphia, PA
  7. Rodin Museum, Benjamin Franklin Parkway, Philadelphia, PA
  8. Barnes Foundation, 2025 Benjamin Franklin Parkway, Philadelphia, PA 19130
  9. The Franklin Institute, North 20th Street, Philadelphia, PA
  10. Mutter Museum, South 22nd Street, Philadelphia, PA
  11. Penn Museum, 3260 South Street, Philadelphia, PA
  12. University of Pennsylvania, Philadelphia, PA
  13. Rittenhouse Square, Philadelphia, PA
  14. Cathedral Basilica of Saints Peter & Paul, Race Street, Philadelphia, PA
  15. Pennsylvania Academy Of The Fine Arts, North Broad Street, Philadelphia, PA
  16. Masonic Temple, North Broad Street, Philadelphia, PA
  17. Philadelphia City Hall, John F Kennedy Boulevard, Philadelphia, PA
  18. Reading Terminal Market, 51 N 12th St, Philadelphia, PA
  19. National Constitution Center, 525 Arch Street, Philadelphia, PA
  20. Fireman's Hall Museum, North 2nd Street, Philadelphia, PA
  21. Elfreth's Alley, Philadelphia, PA
  22. Christ Church, 20 North American Street, Philadelphia, PA
  23. National Museum of American Jewish History, Philadelphia, PA
  24. Independence National Historical Park, Philadelphia, PA
  25. Philadelphia's Magic Gardens, South Street, Philadelphia, PA

Optimize your own walking tour

Undoubtedly, you'd like to pick your own stops in your own cities and optimize a walking tour around that. Well, you're in luck!

If you'd like to customize your own walking tour, I've released the Python code I used in this project with an open source license and instructions for how to optimize your custom walking tour. If Google Maps can route in the city you want to take walking tour in, then this code will work for you.

You can find the code here.

Happy exploring!