2015年3月14日 星期六

The ultimate American road trip, according to science


The man behind the 'Where's Waldo' algorithm has created a road trip route revealing the best way to visit 50 US states. The resulting 13,699-mile route would take 9.33 days of non-stop driving if you had the road to yourself

HOW WAS IT DONE? 

Rather than looking at every possible solution, Randy Olsen used something known as a 'genetic algorithms' which starts with just a few random solutions.
It then manipulates these solutions, while trying something slightly different each time, until it finds one that it can't improve on.
The resulting 13,699-mile route would take 9.33 days of non-stop driving if you had the road to yourself.
In his blog, Mr Olson explains how he used information from Google Maps API and wrote code to discover the optimum distance to drive to all 50 landmarks.
This was the same code he had previously created to discover Waldo – or Wally in the UK.
'With 50 landmarks to put in order, we would have to exhaustively evaluate 3 x 1064 possible routes to find the shortest one,' he wrote.
'If you started computing this problem on your home computer right now, you'd find the optimal route in about 9.64 x 1052 years — long after the sun has entered its red giant phase and devoured the Earth.
'This complication is why Google Map's route optimisation service only optimises routes of up 10 waypoints.'
Rather than looking at every possible solution, he used something known as a 'genetic algorithms' which starts with just a few random solutions. 
It then manipulates these solutions, while trying something slightly different each time, until it finds one that it can't improve on.


Read more: http://www.dailymail.co.uk/sciencetech/article-2993651/The-ultimate-American-road-trip-revealed-Data-scientist-uses-algorithms-plot-best-route-United-States.html#ixzz3ULsHDtt8
Follow us: @MailOnline on Twitter | DailyMail on Facebook

The ultimate American road trip, according to science

Michigan data scientist, Randy Olsen, came up with the map using an...
DAILYM.AI

沒有留言:

張貼留言