Consider a game where the player needs to get past several hurdles to reach their goal, there are different levels of goals, each having its own reward value, and not being able to get past a hurdle could cause different levels of harm depending on the severity: the player could either lose points, or lose powers, or die. A typical computer game, right? How does this operate? Games are not biased in any way, and no matter who plays the game, the set of rules that the game is based on would be the same. The key phrase here is “set of rules”. And that’s what’s called an “algorithm”.
“Algorithms” are often associated with computers, machines, programming, and code, and that’s an idea I’d like to break.
In today’s world, we’re working with machine learning and exploring new possibilities in artificial intelligence. In simple English, what are “artificial intelligence” and “machine learning”?
Artificial Intelligence and Machine Learning:
Artificial intelligence (AI) is an umbrella term used to describe all the technology that mimics human cognitive skills. Machine learning (ML) is considered a subset of artificial intelligence; it refers to training machines that can learn from experience and continuously improve their functional capabilities to perform better.
Now, in either case, how are goals achieved? The difference between technology we’re pretty used to and these new-age technologies is that machines and software that were developed earlier are structured to do certain things and can do only that. But with modern technological developments such as ML and AI, machines can actually “learn” on their own. How is that possible? Of course, we’re able to achieve this only because of the availability of and accessibility to large volumes of data. We apply statistical knowledge to understand and infer from data and use machine learning models (starting from simple to highly complex) to achieve favorable results. There’s algorithms used in all this.
But doesn’t artificial intelligence mimic human intelligence? Yes. One common goal behind creating artificially intelligent machines is that humans can use these technologies to do most of the mundane stuff so that human intelligence can be put to better use. But no matter how mundane, we humans apply a wide range of cognitive skills to do most of these tasks. It might not seem like it, but even behind simple tasks, there’s a powerful human brain at work. I say powerful because it is not just one skill that we use at a time; we use a multitude of cognitive skills while solving problems in our daily lives.
Examples of Seemingly Simple Problem Solving Powered by the Human Brain:
Let’s say you go to the local grocery store that you visit regularly to purchase some stuff. The store keeper recognizes you and greets you; you acknowledge their greeting and greet them in return. In this simple process, both of you involve your memory, social intelligence, emotion recognition, communication skills, and maybe to an extent, even your motor skills. These many skills go into such simple gestures? Yes, the human brain is highly evolved and immensely capable.
Now, in the store, let’s say, you wanted some brands, but those seem to be missing. Instead, you find that there are a few new brands available, and you also remember your friend mentioning one of those brands to you. Now, you need to make a choice: do you want to try a new brand or not buy any of those because that product is not that important after all? This is another seemingly simple process. Here, your brain would involve quantitative and qualitative reasoning, memory, assessment (weighing the pros and cons), and decision making. Yep!
In our daily lives, we use a wide range of cognitive skills and combine it with our knowledge to get the best results we can, to get what we want. To drive to work or take the bus? To carry an umbrella or leave it at home? How to cook a new food item? Is it possible to attain Nirvana? To continue dating someone or to break up with them? Where to travel to? What is veganism? Is communism practical? In thinking through all this, we use several cognitive skills, and guess what? While our ways of thinking, attitude, reasoning, and decision-making can vary from person-to-person (which also depend on several factors such as environment, past experience, personal values, and such), these cognitive processes follow a set of rules and conditions that we always adhere to. Let me explain.
We all follow a certain set of personal rules we adhere by: a talkative person could easily do a lot of talking, but a reserved person would choose to listen more and talk less; someone frugal could be very careful about their expenditure, but someone who’s careless about money could spend a lot more freely; some people, when threatened, might choose to fight back, and some others might choose to hide or give in. These commands that our brains give us, telling us what to do, based on very quick assessments and judgments, are the results of processes that are based on certain rules that are mostly constant (but can be changed). These are algorithms that human brains follow.
Is this something unique or specific only to human brains? No, not really. Non-human animals also operate based on rules and conditions they live by. That’s how animals recognize their community, build healthy relationships among themselves, protect one another, and fight in the face of adversity; so even non-human animals live by algorithms.
I’d like to believe that behind every intentional action, there are one or more algorithms at work. Algorithms are often associated with programming and coding, but the point of an algorithm in code is for the machine to follow an order. Where there is order, there algorithms naturally exist. Within our known universe, wherever there is action in some form, all of that follows some order.
Are you saying that atoms and planets and stars also happen to exist and move around based algorithms? Yes, I’d like to think so. Consider the theory of relativity or the orbit of Earth around the Sun: these natural events also follow some order; things don’t just happen randomly.
For systems that we humans have designed, systems like the law, examinations in schools, stock market, and such, we have actions (acceptance, rejection, rewards, and punishments) set for every possibility that we can think of and have seen in history. When something unprecedented happens, while it can cause chaos for a brief period of time, it could either be repaired soon or there would be dire consequences or humanity would get used to it and adapt.
In a nutshell, aren’t all these something like an if-elif-else loop in Python with millions of iterations, with each behavior being governed by a function?
While we have not understood nature thoroughly, we might not have even studied enough of nature to understand and infer from it, I think that everything follows some kind of order from the moment it comes into existence. No, I don’t believe in a creator or in destiny, don’t get me wrong (at this point, a strong believer would be tempted to associate this with the concept of god, he he, so I had to make myself clear!). From what we have understood, though, we realize that we have so much to learn even from outside our communities. Not all algorithms are inspired by pure mathematics and/or human cognition alone.
Algorithms based on evolution and biology: Some of the most popular animal-inspired evolutionary algorithms are ant colony optimization algorithms (ACO), bat algorithm, flower pollination algorithm, and such.
There are also many algorithms inspired by physics and chemistry. Take for example, the gravity search algorithm. This is said to be based on “gravitational kinematics”, and in this one, different objects interact with one another following Newtonian gravity and laws of motion. (Source: https://www.worldscientific.com/doi/abs/10.1142/S0218001416390018)
Evolution of Nature-based Algorithms:
“Recent research in evolutionary computing has focused on exploiting the benefits of quantum computing. The interaction between quantum computing and evolutionary computation can be divided into three kinds of algorithms. The first type is evolutionary-designed quantum algorithms (EDQA), where the main idea is to use genetic programming to generate new quantum algorithms; the second type is quantum evolutionary algorithms (QEA), which focus on developing algorithms for quantum computers; and, the third type is quantum-inspired evolutionary algorithms (QIEA), which use concepts of quantum mechanics to develop evolutionary methods for a classical computer.” (Source: https://www.nature.com/articles/s41598-019-48409-5)
“The glow-worm algorithm is programmed to home in on faulty nodes in the network looking for change that indicates a fault, no change is recognized as no fault but uses no energy to determine, a fix can be sent when a fault is detected. The bowerbird algorithm is encoded in such a way into the sensor network that it then routes the required information packets with a minimal of energy demands. The hybrid approach to wireless sensor networks based on these two algorithms working together — with glow-worm detecting and fixing faults and bowerbird sustaining the network and keeping energy costs down — work well.” (Source: https://techxplore.com/news/2022-04-algorithms-nature-sustain-wireless-sensor.html)
“In CRO, decision variables are like atoms that form a molecule and a molecule is a representation of solution of a problem. A population of molecules is generated randomly within the search space. The molecules undergo chemical reaction-like transformation. Four types of chemical reaction operations are used: on-wall ineffective collision, decomposition, inter-molecular ineffective collision, and synthesis as discussed earlier. The parameter MoleColl decides on the fraction of all elementary reactions that involve more than one molecule, i.e. inter-molecular reactions in CRO. The process continues until a minimum of energy is reached as defined by the objective function.” (Source: https://link.springer.com/article/10.1007/s12559-017-9485-1#:~:text=Chemical%20reaction%20optimisation%20(CRO)%20algorithm,of%20matter%20and%20its%20structure.)
There is so much to learn, and there is no guarantee that every piece of information we gather would be useful, but that’s how science and technology have come this far, by continuously studying and upgrading existing systems based on proven results. ❤️