Whenever I was involved in discussions into Artificial Intelligent with non-IT experts, I am not surprised that people tend to think AI as in “ya man… you as a human instruct the stupid computer how to solve everything logically; you embed your intelligence artificially into a computer; That is AI (which essentially means if the programmer is stupid the computer is also stupid)” or “it is black magic, complicated, rocket science, requires PHD; that is AI”. So I decided to share in understandable words one of the most commonly used modern “AI” approaches in this blog, it is not actually that “human-manipulated” or “black magic”, and the concept behind is actually inspired by life form. Just a disclaimer beforehand, I am no biologist nor AI PHD; But simply a data enthusiast who enjoys working with data science and IT.
Today we take a look at one of the very common artificial intelligence approaches to solving complex problems: the Genetic Algorithm. It is inspired by the evolution property of life forms in optimizing problems. It is a set of procedures that try to find out the ‘optimal’ solution out from millions/billions of possible solutions. It is, in buzzwords, a heuristic problem-solving approach in computer science.
Natural Selection — The Blueprint of optimizing EVERYTHING naturally
Think about it, how our nature creates something like… insects that are resistant to pesticides or rat snakes with different skin colors according to the places they live in? The world does not come this far in one day but gone through generations and generations, making better and better form of lives. The creatures surviving until today are considered the ‘optimal’ state in today’s environment because their ancestors have survived all the challenges in the past. Thanks to the fact that lives are constantly ‘evolving’. We might have anti-biotics works on bird flu a few years ago but not today; we get viruses that evolve rapidly that are drug resistant. This is a result of natural selection; The ‘best’ few viruses will survive and the lame ones would be eliminated. Then the survived batches of viruses will be able to crossover and create the next generation, with their genes. Thus, their next generation will be able to survive the drug. Mutation is also possible in a smaller chance when a crossover is conducted; Thus, a lamer version of the virus or possibly a better virus can be created as a result (amazing life evolving mechanism eh? ).
By observing our nature, we noticed that there are 3 important characteristics of each generation — — TAKE AWAY!!
- Selection — the best performing batches tend to survive
- Crossover — inherited from better genes
- Mutation — just.. not like their parents.. maybe better or worse
Further Readings (Its ok, you don’t have to :o) Just in case you are a nerd):
Imitating Natural Selection Process… in Computer
Computer scientists make use of this natural selection process in finding the optimal solution out from billions of possible solutions. They randomly select and run multiple solutions on computers, assessing their performance in each run (generation) and ‘kill’ those poor performing solutions in this generation. Then they will combine the characteristics of those surviving ‘champion’ solution in each run (crossover), and make random small mutations to it. After that, they will use these modified solutions for next run. Computer scientist tends to run these evaluations many times (days and weeks of runs) in order to get a decent performing solution from all the generations after terminating the algorithm.
By conducting natural selection, we will eventually get a decent (NOT the BEST of all but very DECENT) solution automatically. It does not require any human selection in the process; Thus, we classify this approach as artificial intelligence. There are a lot of applications out there recently, thanks to our rapidly improved computing speed and efficiency; Genetic evolution algorithm becomes much more accessible nowadays.
Sounds Fancy… But how can it solve real-life problems?
It is a universal problem solver. All of the problems can be optimized in this way as long as sufficient computing power is provided. There are tons of applications out there these days. It is just getting more and more popular among the industry. Here are some examples of the application of GA.
1. Design Simulation Application:
This antenna been used by spacecraft is designed automatically by genetic algorithm. They ran simulations over and over to seek out the best performing shape of the radio antenna.
Or… a wind turbine that is even more efficient than the one designed by a human. Although… it looks like jelly fish. Even the creator himself doesn’t understand why the blade looks like a jelly fish (but who cares, the computer says it works). Be noted that its just conducted for experimental purpose, it was done under computer simulation condition only.
2. Graph / Network Application:
This problem is a famous graph mining problem called Travelling Salesman Problem (TSP). A salesperson has to travel to all the cities (red dots). But there are billions of possible combinations that he can choose to travel to all points; some are super long some are shorter. Genetic algorithm can be used to discovering a reasonably short path for the salesperson.
3. Or even Gaming AI !:
I like this example, its just applying GA into training the best Flappy bird AI player (who is playing way better than YOU!). Look at how stupid birds evolved to master birds, the AI ran through multiple of generations to master the game! Recommended to watch it, just 2 mins what.
There are just too many amazing blueprints out of this nature yet to be discovered by us. All these mechanisms are so amazing that they actually work and their performances can blow our mind. Genetic algorithm is just one of the many life science inspired methods in solving modern complex problems; There are a lot of other AI solutions out there imitating life forms to solving rocket science problems. We as a human are just copycats in modeling how life is built — the ‘engineering’ aspect of life. So, be respectful of nature and humble to life; There are tons of unknowns and we still have a lot to learn from it