Genetic programming (GP) is a problem-solving technique inspired by the biological evolution process that revolves around the evolution of computer programs as possible solutions. Genetic programming is generally applied to the problems of optimization and search or to find solutions to complex problems.
Genetic programming comprises the following steps: initialization, evaluation, selection, crossover, mutation, replacement, and termination.
Let’s see what each of these phases does:
Initialization: This involves a set of randomly generated programs for the given problem in the form of syntax trees.
Evaluation: Every program is evaluated over predefined criteria, i.e.,
Selection: Based on the evaluation results, top-performing programs are selected for further phases.
Crossover: In GP, a crossover is done by swapping subtrees or substructures of the parent programs.
Mutation: Random changes to program structures are made in this phase, which may include adding, modifying, and deleting nodes or terminals, etc.
Replacement: This phase decides which programs from the parents and children will move to the proceeding phases.
Termination: Phases 2–6 are repeated until a stopping criterion is met, producing the best-performing program as the optimal solution to the given problem.
GP is generally used for, but not limited to, function approximations, classification, and optimization problems, as well as in Bioinformatics, Robotics, NLP, etc. However, GP’s performance and scalability are limited by space complexity, time complexity, premature convergence, and overfitting.
Free Resources