Top Banner
What is Genetic Programming Genetic programming is a systematic method for getting computers to automatically solve a problem starting from a high-level statement of what needs to be done. Genetic programming iteratively transforms a population of computer programs into a new generation of programs by applying analogs of naturally occurring genetic operations. The genetic operations include crossover (sexual recombination), mutation, reproduction.
12

Introduction to genetic programming

Jan 09, 2017

Download

Engineering

Abhishek Singh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to genetic programming

What is Genetic Programming

Genetic programming is a systematic method for getting computers to automatically solve a problem starting from a high-level statement of what needs to be done.

Genetic programming iteratively transforms a population of computer programs into a new generation of programs by applying analogs of naturally occurring genetic operations.

The genetic operations include crossover (sexual recombination), mutation, reproduction.

Page 2: Introduction to genetic programming

What is Genetic Programming

Programs are expressed in genetic programming as syntax trees rather than as lines of code. For example, the simple expression

max(x∗x,x + 3∗y)

Page 3: Introduction to genetic programming

What is Genetic Programming

Tree include nodes and links. Node represent the instruction to execute and link represent arguments for each instruction.

In the following the internal nodes in a tree will be called functions, while the tree’s leaves will be called terminals.

Page 4: Introduction to genetic programming

Why Genetic Programming ?

It saves time by freeing the human from having to design complex algorithms. Not only designing the algorithms but creating ones that give optimal solutions.

It combines genetic algorithms with the basic thrust of AI, which was to get computers to do things automatically – to evolve a population of programs.

It is difficult, unnatural, and overly restrictive to attempt to represent hierarchies of dynamically varying size and shape with fixed length character strings.

For many problems in machine learning and artificial intelligence, the most natural representation for a solution is a computer program.

Page 5: Introduction to genetic programming

PREPARATORY STEPS OF GENETICPROGRAMMING the set of terminals for each branch of the to-be-evolved program, the set of primitive functions for each branch of the to-be-evolved

program, the fitness measure (for explicitly or implicitly measuring the

fitness of individuals in the population), certain parameters for controlling the run, and the termination criterion and method for designating the result of

the run.

Page 6: Introduction to genetic programming

STEPS To Perform Genetic Programming

1) Randomly create an initial population of individual computer programs composed of the available functions and terminals.

2) Iteratively perform the following sub-steps (called a generation) on the population -

A:- Execute each program in the population and ascertain its fitness (explicitly or implicitly) using the problem’s fitness measure.

B:- Select one or two individual program(s) from the population with a probability based on fitness to participate in the genetic operations.

Page 7: Introduction to genetic programming

STEPS To Perform Genetic Programming

C:- Create new individual program(s) for the population by applying the following genetic operations-

(I) Reproduction: Copy the selected individual program to the new population.

(II) Crossover: Create new offspring program(s) for the new population by recombining randomly chosen parts from two selected programs.

(III) Mutation: Create one new offspring program for the new population by randomly mutating a randomly chosen part of one selected program.

Page 8: Introduction to genetic programming

STEPS To Perform Genetic Programming

After the termination criterion is satisfied, the single best program in the population produced during the run (the best-so-far individual) is harvested and designated as the result of the run.

Page 9: Introduction to genetic programming

Genetic Operations example-

Page 10: Introduction to genetic programming

Differences Between GP and Genetic Algorithm

The main difference between genetic programming and genetic algorithms is the representation of the solution. Genetic programming creates computer programs in the lisp or scheme computer languages as the solution.

Genetic algorithms create a string of numbers that represent the solution. Genetic programming, uses four steps to solve problems.

Genetic programming is much more powerful than genetic algorithms. The output of the genetic algorithm is a quantity, while the output of the genetic programming is a another computer program.

Page 11: Introduction to genetic programming

Differences Between GP and Genetic Algorithm

Genetic programming works best for several types of problems. The first type is where there is no ideal solution, (for example, a

program that drives a car). There is no one solution to driving a car. Some solutions drive safely at

the expense of time, while others drive fast at a high safety risk. Therefore, driving a car consists of making compromises of speed versus safety, as well as many other variables.

In this case genetic programming will find a solution that attempts to compromise and be the most efficient solution from a large list of variables.

Page 12: Introduction to genetic programming

Real world Applications

Neural Network Optimization [Zhang, Mühlenbein, 1993] Image Analysis [Poli, 1996a] Generation of a knowledge base for expert systems [Bojarczuk, Lopes,

Freitas, 2000] Fuzzy Logic Control [Akbarzadeh, Kumbla, Tunstel, Jamshidi, 2000] Hardware Evolution (Field-Programmable Gate Array) [Thompson,

1997]. Symbolic Regression Problem: Given a set of data points, find a mathematical model