I get asked a lot of questions about Artificial Intelligence. Artificial intelligence is processor and memory intensive, so despite advances in mobile battery capacity and processor speed, if a mobile app requires access to an artificial intelligence it is better to do the heavy lifting on a background server. Occasionally the AI task is lightweight enough so a mobile can perform the AI feat on its own, without help from a backend system.
The following is a simple AI demonstration – a solution for the Travelling Salesman Problem. The task is to find the shortest route which allows a travelling salesman to visit all of the cities on their itinerary.
(Click here for a full screen version of the demonstration)
A mobile device or computer could simply look at every possible path, but as you add more cities, the number of possible paths grows impossibly large – years, maybe millennia would be required to examine absolutely every possibility, when considering more than a handful of cities.
Thankfully artificial intelligence can help. Through use of an Evolutionary Algorithm it is possible to build on past knowledge, while combining the best traits of winning solutions.
As the name implies, an evolutionary algorithm seeks to mimic nature, by taking the fittest solutions, slicing them up, and splicing them together – very much what happens during sexual reproduction. Most of the time the spliced version will not be as good as the original parents, but sometimes it is better. The occasional win is enough to keep this particular algorithm wriggling towards a solution.
I like the Travelling Salesman Problem because it is one of the most visual of possible AI demonstrations – by watching you can get a real feel for how artificial intelligences solve problems.
If you have any questions about artificial intelligence and how AI could help your mobile app, please contact me at Desirable Apps.