How to use Instagram like a PRO in 10 steps

I was not such an early adopter with Instagram as I was with Linkedin on Facebook. The reason is probably that I do everything I can to avoid staring all day long hooked with my eyes on my mobile…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Genetic Algorithms in AI

A very powerful non traditional optimization technique which mimics the process of evolution. Evolutionary algorithms address optimization problems in the field of machine learning and yields outstanding results in many applications and one of them is Genetic Algorithm. Genetic Algorithm is also defined as an adaptive heuristic search algorithm because it adapts with respect to the change in environment in terms of number of parameters or type of parameters passed to the algorithm. It is a search algorithm based on mechanics of natural selection and natural genetics.

It follows Darwinian Theory and specifically the ‘survival of the fittest’ concept. As the concept name says that only the fittest will survive, reproduce and the successive generations will become better and better. Darwin’s Theory of Nature Selection has 3 main principle for evolution to occur:

A very nature oriented example is that of mosquitoes where although solutions to all the disease caused by them have been found out still they are able to create a new one out of no where by reproducing better generation of mosquitoes. Now considering a more technical example lets say Y is a function of X1, X2, X3, X4, X5 so first we start with some combination of X1, X2, X3, X4, X5 to get the value of Y and then as we apply the genetic algorithm, in successive iterations the value of Y will keep on increasing and hence it is an optimization algorithm.

Lets consider a one variable problem, a function is taken which has 2 local minima and one global minima. Two local minima are 1 and 3 and global minima is 2. An optimization algorithm is such where independent of the starting point it will converge to a global minima.

Now, lets consider starting positions in all the 3 regions and compare the behavior of traditional optimization to the genetic algorithm.

Some other specific advantages of Genetic Algorithms over Traditional Optimization algorithms are:

Let us consider a city consisting of aliens present and every alien in that city possess a certain value of strength ranging between 0 to 100. Of course, an alien is considered to be the most powerful if it has the highest value of strength and similarly an alien is considered to be least powerful if it has the lowest value of strength.

Goal: To create most powerful city in the whole world(powerful means the sum of strengths of all the aliens present is maximum).

This event might take a lot of time assuming if there are a lot of aliens in the city but still it is guaranteed that the event will take place which means we will get the highest value possible.

Let’s consider the above example while understanding the process simultaneously.

A population is a set of individuals representing the characteristics or traits of a particular society. The number of individuals within the population are finite. The individuals in the population are already a solution but with less optimized value to the problem and need to be optimized in every iteration.

The initial population in our case are aliens with varied range of strength values: 22, 13, 19, 34, 87, 49, 93, etc.

Every individual’s fitness in the population is dependent on a fitness function and it shows how likely the individual will be able to take part in the next iteration or rather survive in the current step.

The fitness function in our case can be a linear function as we have integer values denoting the strength of the aliens which is good enough to portray the difference between aliens.

Parents are selected in this step and they are selected on the basis of their fitness score assigned in the previous step in comparison to the threshold value. There are different criteria's in order to select the parents which again depends upon the case study taken. After this step, a subset of individuals are created.

In our case, we select aliens with high fitness score(high strength value) which will be able to pass their genes to the next generation.

The offspring or resultant of the previous iteration or generation parents carries genes from both the parents. The order in which genes are created is a complete random process. For example, 50% of the genes can be from 1 parent and 50% from another to reproduce a completely unique offspring. The process is such that a point is considered randomly in the chromosomes and parents exchange their genes before or after that point. This is called single-point crossover. Crossover is an important process otherwise the offspring will be identical to the the old generation parents.

In our case, 2 aliens apply crossover mechanism to reproduce an offspring with completely different traits and hence completely different strength value.

The process of specifically choosing and changing the value of the genes of the offspring produced is called mutation. Mutation is a very random process. If mutation is not carried out then the offspring contains the genes completely of its parent. In binary mutation which contains 0 and 1, some of the values of the genes can be flipped in order to get a different result.

In our case, the offspring can apply mutation process to add new features to it in order to increase its strength.

As the population has a finite size, the process has to stop after a finite set of iterations. As individuals with better fitness score arrive the ones with lower fitness score are discarded and hence the overall system becomes more efficient. The process stops when the population has converged and all the individuals have maximum possible fitness score.

Genetic Algorithms can be used in the field of Machine learning and Artificial Intelligence in order to learn the best hyper-parameters for a neural network. Hyperparameters are variables which determine the network structure and also determine how the network is trained. These are set before the model training begins. The steps followed are similar to above but the context is different.

Genetic Algorithms mainly focus on Optimization and not on only finding solution. Unlike other traditional algorithms, where an input is provided and an output is produced, here a set of solutions are already provided known as initial population and the genetic algorithm focuses on optimizing the solution to get the most optimized solution.

Add a comment

Related posts:

7 consejos para elegir palos de golf para principiantes

Llevas un tiempo pensándolo pero hoy es el día en que vas a empezar a jugar al golf. Ir a la tienda de artículos deportivos a recoger tu equipo está resultando más estresante de lo que pensabas…

happy weekend

1. The weekend is here, I wish you: sleep sweetly like a pig, no troubles and no worries; naughty like a monkey, enjoy the fun; quack like a duck, happy and perfect; finally I wish you no troubles on…

Bezant a new cryptocurrency platform

Bezant is a new cryptocurrency platform which offers to its clients a solid method to utilize electronic installments all around the world. The saying of the organization is that anybody can have the…