This Man Used An Algorithm to Create The Most Optimal US Road Trip Of All Time

How cool would it be to travel to 48 U.S. state capitols in just 8 ½ days? Thanks to a lot of complicated math, algorithms, and Google Maps, one man has found a way to make this a possibility.

Depending on the route you take, driving from the West Coast of the US to the East Coast is between 2,500 to 3,500 miles. If you are willing to get behind the wheel for 8 solid hours a day, the shortest route should take you around 4 to 6 days to complete.

Yet, that doesn’t mean you’ll be taking in the best the US has to offer- you’re simply driving straight through the least amount of terrain to get from one end of the US to the other, as quickly as possible.

And what’s a road trip without epic landmark destinations?

That’s why the best road trips come with a good deal of planning and preparation – where do you want to stop; what sites do you want to see?

Push aside the maps and Google searches because this guy created the most efficient and useful US road map of all time – and you can take his path!

You can thank Randy Olson, a postdoctoral researcher at the University of Pennsylvania, for this ambitious map that’ll let you see the best of the contiguous United States.

Randy Olson

He used a collection of algorithms along with Google Maps to create this epic cross-country road trip that includes stops to all 48 capitol buildings.

“For this road trip, there is one goal: to take a picture at as many U.S. state capitols as possible,” Olson wrote on his blog.

“We will travel only by car, so that rules out Alaska (too far away) and Hawaii (requires a plane flight) and leaves us with the 48 contiguous states (excluding D.C.).”

Olson found the “true” driving distance between each capitol, and from there he found the shortest possible route.

This totaled 2,256 directions, which could easily get confusing, but Olson sought help through the use of the Google Maps API, which makes this information readily available.

From there, he used a short Python script to determine the distance and driving time for all 2,256 routes leading to all 48 capitols.

Texas State capital Texas State Capital, Pixaby

His next goal was to find the best order to visit each capitol so that the total distance traveled is as short as possible.

“This means finding the route that backtracks as little as possible, which is especially difficult when visiting Florida and the Northeast.”

Olson explains that solving a “route optimization problem” such as this is far from simple.

If you ran the appropriate equation through your home computer, you’d end up with an answer that was “long after the sun has entered its red giant phase and devoured the Earth.”

Hence, why Google Map’s route optimization tool is only good for up to 10 waypoints. Other free route optimization tools only optimize up to 20 destinations at best, unless you’re willing to pay a good amount of money.

This is what led him to use genetic algorithms.

“Instead of exhaustively looking at every possible solution, genetic algorithms start with a handful of random solutions and continually tinkers with these solutions—always trying something slightly different from the current solutions and keeping the best ones—until they can’t find a better solution any more.”

Using genetic algorithms, he was able to configure “an optimized solution that makes a complete trip to all of the U.S. state capitols in only 13,310 miles (21,420 km) of driving.”

That means you can visit 48 U.S. capitols in 8.5 days.

You don’t have to start at the beginning, in fact, you can start anywhere along the journey because it makes a complete circle.

“As long as you follow the route from wherever you start, you’ll hit every state capitol in the 48 contiguous U.S. states,” he writes.

View this post on Instagram

Denver, CO

A post shared by C2C Cruisin’ (@c2ccruisin) on

“About a year ago, I wrote an article introducing the concept of optimizing road trips using a combination of genetic algorithms and Google Maps. During that time, I’ve given some thought to how I could make that algorithm more useful to folks looking to plan their summer road trips.”

Olson is no stranger to creating epic road trip maps. In the past, he has created some rather grand expeditions, including trips that spanned the majority of Europe, as well as detailed trips through individual states.

He explained how these trips didn’t accommodate people without endless time to travel for months on end. Olson saw the need to create a journey someone could complete without taking months off work, and while sticking to a budget.

“In reality, most of us have budgetary constraints on our road trips: we can only spend so much money, or we only have so much time off before we have to get back to work.”

Who’s ready to take Olson’s epic road trip around the US?! I know I am!

Visit Olson’s blog to learn more