A single ant can carry 10 to 50 times its own body weight and run 700 times its body length per minute. These are impressive qualities; however, when acting in a group, that single ant can accomplish much more.

In groups, ants build colonies, retrieve food, and even use peer pressure to influence others. They achieve this with pheromones — essentially, perfumes that ants drop wherever they go. Other ants can sense these perfumes and change their behavior based on them.

An experiment based on real-life harvesting ants showed that they always converged to the shortest path between the nest…


Genetic algorithms are a fascinating technique for solving optimisation problems. If you can create a set of rules that can measure a solution’s performance, you can probably use a GA to help solve the problem. Here are some ways to encode solutions.

If you missed my article on the intuition of genetic algorithms, check this out before continuing: https://rhurbans.com/genetic-algorithms-for-beginners/.

Real-value encoding represents a gene with numeric values, strings, or symbols. The solution is expressed in its natural state. This encoding is used when potential solutions contain continuous values that cannot be encoded easily with binary encoding.


Genetic algorithms are part of the family of optimization algorithms. They operate on the theory of evolution, more particularly, genetic evolution. Each solution is a chromosome that’s made up of genes, and is evaluated to determine how well it performs. This repeats until a good solution is found.

Evolution suggests that the living organisms that we see today did not suddenly exist that way, but evolved through millions of years of subtle changes, with each generation adapting to its environment. See this article for more: https://rhurbans.com/intelligence-through-evolution/.

Genetic algorithms are optimization algorithms. They are used to evaluate massive search spaces for…


Imagine how a swarm of bees find food sources. While visiting areas, different bees will find plants of different quality and quantity. Some might be better than others but they gravitate towards the best. Optimisation algorithms in AI work this way too.

Optimisation algorithms are used to evaluate massive search spaces for good solutions. Many of these algorithms are not guaranteed to find the absolute best solution; they attempt to find the global best while avoiding local best solutions.


When we look at the world around us, we sometimes wonder how everything we see and interact with came to be. One way to explain this is the theory of evolution. And it’s useful in solving computational problems in AI.

The theory of evolution suggests that the living organisms that we see today did not suddenly exist that way, but evolved through millions of years of subtle changes, with each generation adapting to its environment.

This implies that the physical and cognitive characteristics of each living organism are a result of best fitting to its environment for survival. …


Do you know how IBM’s Deep Blue chess computer controversially beat champion, Gary Kasparov in 1997? It’s a search algorithm called min-max. This article describes how it works at a high-level.

Adversarial search is characterized by opposition or conflict. These problems require us to anticipate, understand, and counteract the actions of an opponent in pursuit of a goal. In chess, we must react to the moves made by an opponent while carrying out your own strategy.


When you’re deciding if you’d try a specific pizza, you may have some criteria that it passes. The pizza might be made by someone different with a different technique, but as long as it passes your set of rules, you’ll try it. This is a heuristic.

Often described as a rule of thumb, a heuristic is a rule or set of rules used to evaluate a state. It can be used to define criteria that a state must satisfy or measure the performance of a specific state.

A heuristic is used when a clear method of finding an optimal solution…


Remember our search algorithm trip to the beach? If not check out this article: https://rhurbans.com/plan-search-repeat. Our trip can be represented as a graph. What’s a graph? It’s a data structure used by algorithms to do smart things.


Suppose we’re going on a trip to the beach. It’s 500 km away, with two stops: one at a petting zoo and one at a pizza restaurant. We will sleep at a lodge close to the beach on arrival and partake in three activities. The trip to the destination will take approximately 8 hours…

We drive on and start getting hungry; it’s time for the stop at the restaurant. But to our surprise, the restaurant recently went out of business. We need to adjust our plan and find another place to eat, which involves searching.

After driving around for a…


The Turing test was created by Alan Turing in the 1950s to examine a machine’s ability to exhibit human-level intelligent behaviour. He called it the imitation game. Here’s what it’s all about.

The test involves a human evaluator exchanging conversations with two entities. One would be another human, and the other would be a machine. If the human evaluator cannot distinguish the human from the machine, then the machine would have passed the Turing test.

The original Turing test proposed that the conversation happens through text channels to avoid the machine having to generate spoken words or look like a…

Rishal Hurbans

Author of Grokking AI Algorithms • Building at Prolific Idea and Viszen • Business solutions at Entelect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store