SlideShare a Scribd company logo
Genetic programming
What is Genetic Programming?
• Genetic Programming (GP) is an Evolutionary Computation (EC)
technique that automatically solves problems without requiring the
user to know or specify the form or structure of the solution in
advance,
• At the most abstract level, GP is a systematic, domain-independent
method for getting computers to solve problems automatically
starting from a high-level statement of what needs to be done
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
How Genetic Programming?
The basic control flow for genetic programming, where survival of the fittest is used to find
solutions, is shown below:
The basic steps in a GP system Algorithm
The basic steps in a GP system
• GP finds out how well a program works by running it, and then comparing its
behavior to some ideal (line 3),
• We might be interested, for example, in how well a program predicts a time
series or controls an industrial process,
• This comparison is quantified to give a numeric value called fitness,
• Those programs that do well are chosen to breed (line 4) and produce new
programs for the next generation (line 5)
The basic steps in a GP system
• The primary genetic operations that are used to create new programs
from existing ones are:
 Crossover: The creation of a child program by combining randomly
chosen parts from two selected parent programs,
 Mutation: The creation of a new child program by randomly altering
a randomly chosen part of a selected parent program
Representation GP
Representation of Solutions in a GP System
The tree
representation
of the program:
max(x+x,x+3*y)
In more advanced forms of GP
Genetic programming
Genetic programming
Genetic programming
Representation of Solutions in a GP System
• In GP, programs are usually expressed as syntax trees rather than as lines of code,
• The variables and constants in the program (x, y and 3) are leaves of the tree and in GP they are called terminals, whilst the
arithmetic operations (+, * and max) are internal nodes called functions,
• The sets of allowed functions and terminals together form the primitive set of a GP System
• In more advanced forms of GP, programs can be composed of multiple components (e.g., subroutines),
• In this case, the representation used in GP is a set of trees grouped together under a special root node that acts as glue.
• The (sub)trees are called branches and the number and type of the branches in a program, together with certain other features
of their structure, form the architecture of the program.
• It is common in the GP literature to represent expressions in a prefix notation,
• For example, max(x+x,x+3*y) becomes (max (+ x x) (+ x (* 3 y))),
• This notation often makes it easier to see the relationship between (sub)expressions and their corresponding (sub)trees,
• The trees and their corresponding prefixnotation expressions are used interchangeably
Initializing the Population
Initializing the Population
• In GP, the individuals in the initial population are typically
randomly generated,
• There are a number of different approaches for generating this
random initial population,
• Next, two of the simplest (and earliest) methods (the full and
grow methods), and a widely used combination of the two known
as Ramped half-and-half
The Full Method
• The next slide shows a series of snapshots of the construction of a full tree of
depth 2,
• The children of the * and / nodes must be leaves or otherwise the tree would
be too deep,
• Thus, at both steps t = 3, t = 4, t = 6 and t = 7 a terminal must be chosen (x, y, 1
and 0, respectively).
• Creation of a full tree having maximum depth 2 using the full initialization
method (t = time)
The Full Method Initialization Example
The Full Method Initialization Example
Initializing the Population: Grow Method
• The grow method, on the contrary, allows for the creation of trees of more varied sizes
and shapes,
• Nodes are selected from the whole primitive set (i.e., functions and terminals) until
the depth limit is reached,
• Once the depth limit is reached only terminals may be chosen (just as in the full
method),
• The next slide illustrates this process for the construction of a tree with depth limit 2
• Creation of a five node tree using the grow initialisation method with a maximum
depth of 2 (t = time)
• A terminal is chosen at t = 2, causing the left branch of the root to be closed at that
point even though the maximum depth had not been reached
The Grow Method Initialization Example
Genetic programming
Initializing the Population: half-and-half Method
Because neither the grow or full method provide a very wide array of
sizes or shapes on their own, a combination called ramped half-and-
half proposed,
• Half the initial population is constructed using full and half is
constructed using grow,
• This is done using a range of depth limits (hence the term
“ramped”) to help ensure that we generate trees having a variety of
sizes and shapes
Recombination and Crossover
• The most commonly used form of crossover is subtree crossover,
• Given two parents, subtree crossover randomly selects a crossover
point (a node) in each parent tree,
• It creates the offspring by replacing the subtree rooted at the
crossover point in a copy of the first parent with a copy of the subtree
rooted at the crossover point in the second parent, for example
Genetic programming
Recombination and Mutation
• The most commonly used form of mutation in GP (called
subtree mutation) randomly selects a mutation point in a tree
and substitutes the subtree rooted there with a randomly
generated subtree,
• This is illustrated by the example of the next slide
Genetic programming
Genetic programming
Applying GP System to a Problem
Examples of
primitives in GP
function and
terminal sets
The
development of
the topology and
the sizing of an
electrical circuit
Function development for appraising brittleness of intact rocks using
genetic programming and non-linear multiple regression models
Proposed
model
Training Testing
R
2
RMSE VAF R
2
RMSE VAF
NLMR 0.817 4.382 80.231 0.882 3.602 86.701
GP 0.909 2.862 90.648 0.904 3.509 88.943
R2 :Coefficient of determination
RMSE: Root Mean Square Error
VRF: Variance account for
Genetic programming
GP is much more power full than GA.
The output of the GA is a quantity, while output of GP
is a another computer program.
Where there is no ideal solution, GP works best (ex. A
program that drives a car).
Genetic programming

More Related Content

What's hot (20)

PPTX
Naive Bayes Classifier using R.
Triloki Gupta
 
PPTX
Genetic Algorithm
SHIMI S L
 
PPT
Genetic algorithms
zamakhan
 
PDF
Genetic Algorithms
Alaa Khamis, PhD, SMIEEE
 
PPT
Genetic Algorithms - Artificial Intelligence
Sahil Kumar
 
PPTX
Genetic Algorithm by Example
Nobal Niraula
 
PPTX
Metaheuristics
ossein jain
 
PPTX
Genetic programming
Dr. C.V. Suresh Babu
 
PPT
Evolutionary-Algorithms.ppt
lakshmi.ec
 
PPTX
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
PPTX
Reasoning in AI
Gunjan Chhabra
 
PDF
Machine learning Lecture 2
Srinivasan R
 
PPTX
Introduction to Machine Learning
Lior Rokach
 
ODP
Genetic algorithm ppt
Mayank Jain
 
PDF
Introduction to soft computing
Siksha 'O' Anusandhan (Deemed to be University )
 
PPTX
Practical Swarm Optimization (PSO)
khashayar Danesh Narooei
 
PDF
Metaheuristic Algorithms: A Critical Analysis
Xin-She Yang
 
PPT
Natural Language Processing
Yasir Khan
 
PPTX
Fuzzy Logic ppt
Ritu Bafna
 
PPTX
Generative models
Birger Moell
 
Naive Bayes Classifier using R.
Triloki Gupta
 
Genetic Algorithm
SHIMI S L
 
Genetic algorithms
zamakhan
 
Genetic Algorithms
Alaa Khamis, PhD, SMIEEE
 
Genetic Algorithms - Artificial Intelligence
Sahil Kumar
 
Genetic Algorithm by Example
Nobal Niraula
 
Metaheuristics
ossein jain
 
Genetic programming
Dr. C.V. Suresh Babu
 
Evolutionary-Algorithms.ppt
lakshmi.ec
 
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Reasoning in AI
Gunjan Chhabra
 
Machine learning Lecture 2
Srinivasan R
 
Introduction to Machine Learning
Lior Rokach
 
Genetic algorithm ppt
Mayank Jain
 
Introduction to soft computing
Siksha 'O' Anusandhan (Deemed to be University )
 
Practical Swarm Optimization (PSO)
khashayar Danesh Narooei
 
Metaheuristic Algorithms: A Critical Analysis
Xin-She Yang
 
Natural Language Processing
Yasir Khan
 
Fuzzy Logic ppt
Ritu Bafna
 
Generative models
Birger Moell
 

Similar to Genetic programming (20)

PDF
CSA 3702 machine learning module 4
Nandhini S
 
PPTX
Genetic Programming historia objetivos lisp
tonycarracedo1
 
PDF
04 1 evolution
Tianlu Wang
 
PPTX
Introduction to Genetic Algorithm
ramyaravindran12
 
PDF
Genetic Algorithms in Artificial Intelligence
ritwijkp2
 
PPTX
Introduction to Genetic algorithm
HEENA GUPTA
 
PPT
Genetic algorithms full lecture
sadiacs
 
PPT
Genetic algorithms
Amna Saeed
 
PPTX
genetic programming
Bassant Hassan
 
PPTX
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Harshal Jain
 
PPT
4.Genetic-Algorithms.ppt
RamjiChaurasiya
 
PPT
AI_PPT_Genetic-Algorithms.ppt
HotTea
 
PPT
Genetic-Algorithms.ppt
ssuser2e437f
 
PPT
Genetic-Algorithms.ppt
Nipun85
 
PPT
Genetic-Algorithms-computersciencepptnew.ppt
Fitnessfreaksfam
 
PPT
Genetic-Algorithms forv artificial .ppt
neelamsanjeevkumar
 
PPT
Genetic-Algorithms for machine learning and ai.ppt
neelamsanjeevkumar
 
PDF
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Aritra Sarkar
 
PPTX
Genetic Algorithm
Fatemeh Karimi
 
PDF
RM 701 Genetic Algorithm and Fuzzy Logic lecture
VIT University (Chennai Campus)
 
CSA 3702 machine learning module 4
Nandhini S
 
Genetic Programming historia objetivos lisp
tonycarracedo1
 
04 1 evolution
Tianlu Wang
 
Introduction to Genetic Algorithm
ramyaravindran12
 
Genetic Algorithms in Artificial Intelligence
ritwijkp2
 
Introduction to Genetic algorithm
HEENA GUPTA
 
Genetic algorithms full lecture
sadiacs
 
Genetic algorithms
Amna Saeed
 
genetic programming
Bassant Hassan
 
Analysis of Parameter using Fuzzy Genetic Algorithm in E-learning System
Harshal Jain
 
4.Genetic-Algorithms.ppt
RamjiChaurasiya
 
AI_PPT_Genetic-Algorithms.ppt
HotTea
 
Genetic-Algorithms.ppt
ssuser2e437f
 
Genetic-Algorithms.ppt
Nipun85
 
Genetic-Algorithms-computersciencepptnew.ppt
Fitnessfreaksfam
 
Genetic-Algorithms forv artificial .ppt
neelamsanjeevkumar
 
Genetic-Algorithms for machine learning and ai.ppt
neelamsanjeevkumar
 
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Aritra Sarkar
 
Genetic Algorithm
Fatemeh Karimi
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
VIT University (Chennai Campus)
 
Ad

More from Omar Ghazi (7)

PPT
Discovery methods for HCI
Omar Ghazi
 
PPTX
Virtual Reality
Omar Ghazi
 
PPT
Secure electronic transactions (SET)
Omar Ghazi
 
PDF
Volumetric Medical Images Lossy Compression using Stationary Wavelet Transfor...
Omar Ghazi
 
PDF
Hybrid compression based stationary wavelet transforms
Omar Ghazi
 
PDF
Lossy Compression Using Stationary Wavelet Transform and Vector Quantization
Omar Ghazi
 
POTX
Presentation of Lossy compression
Omar Ghazi
 
Discovery methods for HCI
Omar Ghazi
 
Virtual Reality
Omar Ghazi
 
Secure electronic transactions (SET)
Omar Ghazi
 
Volumetric Medical Images Lossy Compression using Stationary Wavelet Transfor...
Omar Ghazi
 
Hybrid compression based stationary wavelet transforms
Omar Ghazi
 
Lossy Compression Using Stationary Wavelet Transform and Vector Quantization
Omar Ghazi
 
Presentation of Lossy compression
Omar Ghazi
 
Ad

Recently uploaded (20)

PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PPTX
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
PPTX
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
DOCX
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
PPTX
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Basics and rules of probability with real-life uses
ravatkaran694
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 

Genetic programming

  • 2. What is Genetic Programming? • Genetic Programming (GP) is an Evolutionary Computation (EC) technique that automatically solves problems without requiring the user to know or specify the form or structure of the solution in advance, • At the most abstract level, GP is a systematic, domain-independent method for getting computers to solve problems automatically starting from a high-level statement of what needs to be done
  • 3. 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
  • 4. How Genetic Programming? The basic control flow for genetic programming, where survival of the fittest is used to find solutions, is shown below:
  • 5. The basic steps in a GP system Algorithm
  • 6. The basic steps in a GP system • GP finds out how well a program works by running it, and then comparing its behavior to some ideal (line 3), • We might be interested, for example, in how well a program predicts a time series or controls an industrial process, • This comparison is quantified to give a numeric value called fitness, • Those programs that do well are chosen to breed (line 4) and produce new programs for the next generation (line 5)
  • 7. The basic steps in a GP system • The primary genetic operations that are used to create new programs from existing ones are:  Crossover: The creation of a child program by combining randomly chosen parts from two selected parent programs,  Mutation: The creation of a new child program by randomly altering a randomly chosen part of a selected parent program
  • 9. Representation of Solutions in a GP System The tree representation of the program: max(x+x,x+3*y)
  • 10. In more advanced forms of GP
  • 14. Representation of Solutions in a GP System • In GP, programs are usually expressed as syntax trees rather than as lines of code, • The variables and constants in the program (x, y and 3) are leaves of the tree and in GP they are called terminals, whilst the arithmetic operations (+, * and max) are internal nodes called functions, • The sets of allowed functions and terminals together form the primitive set of a GP System • In more advanced forms of GP, programs can be composed of multiple components (e.g., subroutines), • In this case, the representation used in GP is a set of trees grouped together under a special root node that acts as glue. • The (sub)trees are called branches and the number and type of the branches in a program, together with certain other features of their structure, form the architecture of the program. • It is common in the GP literature to represent expressions in a prefix notation, • For example, max(x+x,x+3*y) becomes (max (+ x x) (+ x (* 3 y))), • This notation often makes it easier to see the relationship between (sub)expressions and their corresponding (sub)trees, • The trees and their corresponding prefixnotation expressions are used interchangeably
  • 16. Initializing the Population • In GP, the individuals in the initial population are typically randomly generated, • There are a number of different approaches for generating this random initial population, • Next, two of the simplest (and earliest) methods (the full and grow methods), and a widely used combination of the two known as Ramped half-and-half
  • 17. The Full Method • The next slide shows a series of snapshots of the construction of a full tree of depth 2, • The children of the * and / nodes must be leaves or otherwise the tree would be too deep, • Thus, at both steps t = 3, t = 4, t = 6 and t = 7 a terminal must be chosen (x, y, 1 and 0, respectively). • Creation of a full tree having maximum depth 2 using the full initialization method (t = time)
  • 18. The Full Method Initialization Example
  • 19. The Full Method Initialization Example
  • 20. Initializing the Population: Grow Method • The grow method, on the contrary, allows for the creation of trees of more varied sizes and shapes, • Nodes are selected from the whole primitive set (i.e., functions and terminals) until the depth limit is reached, • Once the depth limit is reached only terminals may be chosen (just as in the full method), • The next slide illustrates this process for the construction of a tree with depth limit 2 • Creation of a five node tree using the grow initialisation method with a maximum depth of 2 (t = time) • A terminal is chosen at t = 2, causing the left branch of the root to be closed at that point even though the maximum depth had not been reached
  • 21. The Grow Method Initialization Example
  • 23. Initializing the Population: half-and-half Method Because neither the grow or full method provide a very wide array of sizes or shapes on their own, a combination called ramped half-and- half proposed, • Half the initial population is constructed using full and half is constructed using grow, • This is done using a range of depth limits (hence the term “ramped”) to help ensure that we generate trees having a variety of sizes and shapes
  • 24. Recombination and Crossover • The most commonly used form of crossover is subtree crossover, • Given two parents, subtree crossover randomly selects a crossover point (a node) in each parent tree, • It creates the offspring by replacing the subtree rooted at the crossover point in a copy of the first parent with a copy of the subtree rooted at the crossover point in the second parent, for example
  • 26. Recombination and Mutation • The most commonly used form of mutation in GP (called subtree mutation) randomly selects a mutation point in a tree and substitutes the subtree rooted there with a randomly generated subtree, • This is illustrated by the example of the next slide
  • 29. Applying GP System to a Problem
  • 30. Examples of primitives in GP function and terminal sets
  • 31. The development of the topology and the sizing of an electrical circuit
  • 32. Function development for appraising brittleness of intact rocks using genetic programming and non-linear multiple regression models
  • 33. Proposed model Training Testing R 2 RMSE VAF R 2 RMSE VAF NLMR 0.817 4.382 80.231 0.882 3.602 86.701 GP 0.909 2.862 90.648 0.904 3.509 88.943 R2 :Coefficient of determination RMSE: Root Mean Square Error VRF: Variance account for
  • 35. GP is much more power full than GA. The output of the GA is a quantity, while output of GP is a another computer program. Where there is no ideal solution, GP works best (ex. A program that drives a car).