Genetic Programming

A Simple Explanation - By Varsha Saini

While solving any problem humans tend to use their preconceptions and get biased. Evolutionary Algorithm (EA), due to its adaptive nature can be used to solve such problems (which humans can’t solve directly).

What is Genetic Programming?

Genetic Programming (GP) is a type of Evolutionary Algorithm (EA). It is applied in software engineering through code synthesis, automatic bug-fixing, and while developing game-playing strategies, etc.

The concept of Genetic Programming is inspired by biological evolution. Therefore Genetic Programming in software engineering is implemented using an algorithm that uses random mutation, crossover, a fitness function, and multiple generations of evolution to resolve a user-defined task. This concept is explained in detail in the properties of the Genetic programming section.

Genetic algorithms are based on the process of Natural Selection, and they are used to generate solutions to optimize tasks such as search problems in computer science.

Genetic Programming in Machine Learning

For solving a problem using machine learning, you need the right data, computational power, and an ML model. Choosing the best ML algorithm is challenging as there are various algorithms available like Decision Trees, SVM, KNN, etc.

Genetic Programming can be used to find the best ML algorithm for the given problem statement using its properties.

Properties of Genetic Programming

1. Selection

Given,
1. You have n no of possible solution for a given problem.
2. You have a fitness function.

At every iteration, you evaluate how to fit each solution with your fitness function.

2. Crossover

You select the fittest solution and perform crossover to create a new population.

3. Mutation

You can pick a subset of data and perform some random modifications.

Repeat the above three processes until you get the fittest or best solution.