SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Department of Information Technology 1Soft Computing (ITC4256 )
Dr. C.V. Suresh Babu
Professor
Department of IT
Hindustan Institute of Science & Technology
Genetic Programming
Department of Information Technology 2Soft Computing (ITC4256 )
What is Genetic Programming?
• Genetic programming is a model of programming which uses the ideas (and some of
the terminology) of biological evolution to handle a complex problem. … Genetic
programming can be viewed as an extension of the genetic algorithm, a model for
testing and selecting the best choice among a set of results, each represented by a
string.
Department of Information Technology 3Soft Computing (ITC4256 )
Outline of the Genetic Algorithm
• Randomly generate a set of possible solutions to a problem, representing each as a
fixed length character string
• Test each possible solution against the problem using a fitness function to evaluate
each solution
• Keep the best solutions, and use them to generate new possible solutions
• Repeat the previous two steps until either an acceptable solution is found, or until
the algorithm has iterated through a given number of cycles (generations)
Department of Information Technology 4Soft Computing (ITC4256 )
Why Genetic Programming?
• “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.” [Koza, 1994]
• A parse tree is a good representation of a computer program for Genetic
Programming
Department of Information Technology 5Soft Computing (ITC4256 )
Using Trees To Represent Computer Programs
(+ 2 3 (* X 7) (/ Y 5))
+
2 3 * /
X 7 5Y
Functions
Terminals
Department of Information Technology 6Soft Computing (ITC4256 )
Genetic Operations
• Random Generation of the initial population of possible
solutions
• Mutation of promising solutions to create new possible
solutions
• Genetic Crossover of two promising solutions to create new
possible solutions
Department of Information Technology 7Soft Computing (ITC4256 )
Randomly Generating Programs
• Randomly generate a program that takes two arguments
and uses basic arithmetic to return an answer
– Function set = {+, -, *, /}
– Terminal set = {integers, X, Y}
• Randomly select either a function or a terminal to
represent our program
• If a function was selected, recursively generate random
programs to act as arguments
Department of Information Technology 8Soft Computing (ITC4256 )
Randomly Generating Programs
(+ …)
+
Department of Information Technology 9Soft Computing (ITC4256 )
Randomly Generating Programs
(+ 2 …)
+
2
Department of Information Technology 10Soft Computing (ITC4256 )
Randomly Generating Programs
(+ 2 3 …)
+
2 3
Department of Information Technology 11Soft Computing (ITC4256 )
Randomly Generating Programs
(+ 2 3 (* …) …)
+
2 3 *
Department of Information Technology 12Soft Computing (ITC4256 )
Randomly Generating Programs
(+ 2 3 (* X 7) (/ …))
+
2 3 * /
X 7
Department of Information Technology 13Soft Computing (ITC4256 )
Randomly Generating Programs
(+ 2 3 (* X 7) (/ Y 5))
+
2 3 * /
X 7 5Y
Department of Information Technology 14Soft Computing (ITC4256 )
Mutation
(+ 2 3 (* X 7) (/ Y 5))
+
2 3 * /
X 7 5Y
Department of Information Technology 15Soft Computing (ITC4256 )
Mutation
(+ 2 3 (* X 7) (/ Y 5))
+
2 3 /
5Y
*
X 7
First pick a random node
Department of Information Technology 16Soft Computing (ITC4256 )
Mutation
(+ 2 3 (+ (* 4 2) 3) (/ Y 5))
+
2 3 + /
* 3 5Y
Delete the node and its children,
and replace with a randomly
generated program
24
Department of Information Technology 17Soft Computing (ITC4256 )
Crossover
(+ X (* 3 Y))
+
X *
3 Y
(- (/ 25 X) 7)
-
/ 7
25 X
Department of Information Technology 18Soft Computing (ITC4256 )
Crossover
(+ X (* 3 Y))
+
X *
Pick a random node in each
program
3 Y
(- (/ 25 X) 7)
-
/ 7
25 X
Department of Information Technology 19Soft Computing (ITC4256 )
Crossover
(+ X (* (/ 25 X) Y))
+
X *
Swap the two nodes
3
Y
(- 3 7)
-
/
7
25 X
Department of Information Technology 20Soft Computing (ITC4256 )
What About Just Randomly
Generating Programs?
• Is Genetic Programming really better than just randomly creating new functions?
• Yes!
– Pete Angeline compared the result of evolving a tic-tac-toe algorithm for 200 generations, with a
population size of 1000 per generation, against 200,000 randomly generated algorithms
– The best evolved program was found to be significantly superior to the best randomly generated
program [Genetic Programming FAQ, 2002]
• The key lies in using a fitness measure to determine which functions survive to
reproduce in each generation
Department of Information Technology 21Soft Computing (ITC4256 )
Building a Better Mouse
• Apply Genetic Programming to the problem of navigating a maze
• What are our terminal and function sets?
– Function Set =
{If-Movement-Blocked, While-Not-At-Cheese*}
– Terminal Set =
{Move-Forward, Turn-Left, Turn-Right}
* While-Not-At-Cheese will be used exclusively as the root node of the parse tree
Department of Information Technology 22Soft Computing (ITC4256 )
Building a Better Mouse
How to get the starving mouse to the cheese?
Is there a better solution for this maze? How good is
this solution?
One possible solution:
While not at the cheese
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward
Turn right 90 degreesCheese?
Blocked?
Department of Information Technology 23Soft Computing (ITC4256 )
Building a Better Mouse
A fitness function:
Cheese?
Blocked?
• Each function and terminal other than the
root node shall cost one unit to execute
• If the mouse spends more than 100 units,
it dies of hunger
• The fitness measure for a program is
determined be executing the program,
then squaring the sum of the total units
spent and the final distance from the exit
• A lower fitness measure is preferable to a
higher fitness measure
Our mouse will die 10 moves from the exit
after spending 100 units, so the fitness
measure for our program is 12100
Department of Information Technology 24Soft Computing (ITC4256 )
Building a Better Mouse
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
Department of Information Technology 25Soft Computing (ITC4256 )
Building a Better Mouse
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Turn left 90 degrees
Mutation:
Department of Information Technology 26Soft Computing (ITC4256 )
Building a Better Mouse
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
While not at the cheese (11664)
If the way ahead is blocked
Move forward one space
Turn right 90 degrees
Otherwise
Move forward one space
Crossover:
While not at the cheese (12996)
Turn left 90 degrees
Turn left 90 degrees
Department of Information Technology 27Soft Computing (ITC4256 )
Building a Better Mouse
While not at the cheese
If the way ahead is blocked
Turn right 90 degrees
Move forward one space
Move forward one space
Move forward one space
Otherwise
Move forward one space
Turn right 90 degrees
Move forward one space
Move forward one space
Turn left 90 degrees
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
(after 4202 generations, with 1000 programs per generation)
Is this better?
Fitness measure: 2809
Department of Information Technology 28Soft Computing (ITC4256 )
Real World Applications
• Lockheed Martin Missiles and Space Co. - Near-Minimum-Time Spacecraft
Maneuvers [Howley, 96]
• GP applied to the problem of rest-to-rest reorientation maneuvers for satellites
• Optimal time solution is a vector of nonlinear differential equations, which are
difficult to solve
• An approximate solution is necessary for a real-time controller
• Results: Rest-to-Rest Maneuver Times (8 test cases)
– Optimal Solution: 287.93 seconds
– Expert Solution: 300.3 seconds
– GP Solution: 292.8 seconds
Department of Information Technology 29Soft Computing (ITC4256 )
Real World Applications
• Symbolic Regression
• Problem: Given a set of data points, find a mathematical model
Department of Information Technology 30Soft Computing (ITC4256 )
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]

Weitere ähnliche Inhalte

Was ist angesagt?

Model Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningModel Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningPramit Choudhary
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
Introduction to artificial neural network
Introduction to artificial neural networkIntroduction to artificial neural network
Introduction to artificial neural networkDr. C.V. Suresh Babu
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural NetworksDatabricks
 
Attention in Deep Learning
Attention in Deep LearningAttention in Deep Learning
Attention in Deep Learning健程 杨
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsDr. C.V. Suresh Babu
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine LearningPavithra Thippanaik
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networksAkash Goel
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts NeuronShajun Nisha
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisJaclyn Kokx
 
Extension principle
Extension principleExtension principle
Extension principleSavo Delić
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep LearningMyungjin Lee
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual IntroductionLukas Masuch
 
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Sergey Karayev
 
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...Simplilearn
 
Activation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural networkActivation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural networkGayatri Khanvilkar
 

Was ist angesagt? (20)

Model Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningModel Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep Learning
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
Introduction to artificial neural network
Introduction to artificial neural networkIntroduction to artificial neural network
Introduction to artificial neural network
 
Training Neural Networks
Training Neural NetworksTraining Neural Networks
Training Neural Networks
 
Attention in Deep Learning
Attention in Deep LearningAttention in Deep Learning
Attention in Deep Learning
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networks
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts Neuron
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant Analysis
 
Extension principle
Extension principleExtension principle
Extension principle
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep Learning
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 
Transfer Learning
Transfer LearningTransfer Learning
Transfer Learning
 
Activation function
Activation functionActivation function
Activation function
 
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
 
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...
What Is A Neural Network? | How Deep Neural Networks Work | Neural Network Tu...
 
Activation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural networkActivation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural network
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 

Ähnlich wie Genetic programming

04 2 machine evolution
04 2 machine evolution04 2 machine evolution
04 2 machine evolutionTianlu Wang
 
Useful Techniques in Artificial Intelligence
Useful Techniques in Artificial IntelligenceUseful Techniques in Artificial Intelligence
Useful Techniques in Artificial IntelligenceIla Group
 
Tech day ngobrol santai tensorflow
Tech day ngobrol santai tensorflowTech day ngobrol santai tensorflow
Tech day ngobrol santai tensorflowRamdhan Rizki
 
Optimization Techniques.pdf
Optimization Techniques.pdfOptimization Techniques.pdf
Optimization Techniques.pdfanandsimple
 
Fractional factorial design tutorial
Fractional factorial design tutorialFractional factorial design tutorial
Fractional factorial design tutorialGaurav Kr
 
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairIt Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairClaire Le Goues
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptxArthur240715
 
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...Aritra Sarkar
 
6 data envelopment_analysis
6 data envelopment_analysis6 data envelopment_analysis
6 data envelopment_analysisFEG
 
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERINGA GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERINGLubna_Alhenaki
 

Ähnlich wie Genetic programming (20)

04 2 machine evolution
04 2 machine evolution04 2 machine evolution
04 2 machine evolution
 
Defuzzification
DefuzzificationDefuzzification
Defuzzification
 
Unsupervised learning networks
Unsupervised learning networksUnsupervised learning networks
Unsupervised learning networks
 
ga-2.ppt
ga-2.pptga-2.ppt
ga-2.ppt
 
Useful Techniques in Artificial Intelligence
Useful Techniques in Artificial IntelligenceUseful Techniques in Artificial Intelligence
Useful Techniques in Artificial Intelligence
 
Neural network
Neural networkNeural network
Neural network
 
AI and Deep Learning
AI and Deep Learning AI and Deep Learning
AI and Deep Learning
 
04 1 evolution
04 1 evolution04 1 evolution
04 1 evolution
 
VST2022.pdf
VST2022.pdfVST2022.pdf
VST2022.pdf
 
Fuzzy expert systems
Fuzzy expert systemsFuzzy expert systems
Fuzzy expert systems
 
Tech day ngobrol santai tensorflow
Tech day ngobrol santai tensorflowTech day ngobrol santai tensorflow
Tech day ngobrol santai tensorflow
 
Optimization Techniques.pdf
Optimization Techniques.pdfOptimization Techniques.pdf
Optimization Techniques.pdf
 
Fractional factorial design tutorial
Fractional factorial design tutorialFractional factorial design tutorial
Fractional factorial design tutorial
 
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairIt Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx
 
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
 
A leap around AI
A leap around AIA leap around AI
A leap around AI
 
6 data envelopment_analysis
6 data envelopment_analysis6 data envelopment_analysis
6 data envelopment_analysis
 
microprocessor
microprocessormicroprocessor
microprocessor
 
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERINGA GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
A GENETIC-FROG LEAPING ALGORITHM FOR TEXT DOCUMENT CLUSTERING
 

Mehr von Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 

Kürzlich hochgeladen

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Kürzlich hochgeladen (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

Genetic programming

  • 1. Department of Information Technology 1Soft Computing (ITC4256 ) Dr. C.V. Suresh Babu Professor Department of IT Hindustan Institute of Science & Technology Genetic Programming
  • 2. Department of Information Technology 2Soft Computing (ITC4256 ) What is Genetic Programming? • Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to handle a complex problem. … Genetic programming can be viewed as an extension of the genetic algorithm, a model for testing and selecting the best choice among a set of results, each represented by a string.
  • 3. Department of Information Technology 3Soft Computing (ITC4256 ) Outline of the Genetic Algorithm • Randomly generate a set of possible solutions to a problem, representing each as a fixed length character string • Test each possible solution against the problem using a fitness function to evaluate each solution • Keep the best solutions, and use them to generate new possible solutions • Repeat the previous two steps until either an acceptable solution is found, or until the algorithm has iterated through a given number of cycles (generations)
  • 4. Department of Information Technology 4Soft Computing (ITC4256 ) Why Genetic Programming? • “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.” [Koza, 1994] • A parse tree is a good representation of a computer program for Genetic Programming
  • 5. Department of Information Technology 5Soft Computing (ITC4256 ) Using Trees To Represent Computer Programs (+ 2 3 (* X 7) (/ Y 5)) + 2 3 * / X 7 5Y Functions Terminals
  • 6. Department of Information Technology 6Soft Computing (ITC4256 ) Genetic Operations • Random Generation of the initial population of possible solutions • Mutation of promising solutions to create new possible solutions • Genetic Crossover of two promising solutions to create new possible solutions
  • 7. Department of Information Technology 7Soft Computing (ITC4256 ) Randomly Generating Programs • Randomly generate a program that takes two arguments and uses basic arithmetic to return an answer – Function set = {+, -, *, /} – Terminal set = {integers, X, Y} • Randomly select either a function or a terminal to represent our program • If a function was selected, recursively generate random programs to act as arguments
  • 8. Department of Information Technology 8Soft Computing (ITC4256 ) Randomly Generating Programs (+ …) +
  • 9. Department of Information Technology 9Soft Computing (ITC4256 ) Randomly Generating Programs (+ 2 …) + 2
  • 10. Department of Information Technology 10Soft Computing (ITC4256 ) Randomly Generating Programs (+ 2 3 …) + 2 3
  • 11. Department of Information Technology 11Soft Computing (ITC4256 ) Randomly Generating Programs (+ 2 3 (* …) …) + 2 3 *
  • 12. Department of Information Technology 12Soft Computing (ITC4256 ) Randomly Generating Programs (+ 2 3 (* X 7) (/ …)) + 2 3 * / X 7
  • 13. Department of Information Technology 13Soft Computing (ITC4256 ) Randomly Generating Programs (+ 2 3 (* X 7) (/ Y 5)) + 2 3 * / X 7 5Y
  • 14. Department of Information Technology 14Soft Computing (ITC4256 ) Mutation (+ 2 3 (* X 7) (/ Y 5)) + 2 3 * / X 7 5Y
  • 15. Department of Information Technology 15Soft Computing (ITC4256 ) Mutation (+ 2 3 (* X 7) (/ Y 5)) + 2 3 / 5Y * X 7 First pick a random node
  • 16. Department of Information Technology 16Soft Computing (ITC4256 ) Mutation (+ 2 3 (+ (* 4 2) 3) (/ Y 5)) + 2 3 + / * 3 5Y Delete the node and its children, and replace with a randomly generated program 24
  • 17. Department of Information Technology 17Soft Computing (ITC4256 ) Crossover (+ X (* 3 Y)) + X * 3 Y (- (/ 25 X) 7) - / 7 25 X
  • 18. Department of Information Technology 18Soft Computing (ITC4256 ) Crossover (+ X (* 3 Y)) + X * Pick a random node in each program 3 Y (- (/ 25 X) 7) - / 7 25 X
  • 19. Department of Information Technology 19Soft Computing (ITC4256 ) Crossover (+ X (* (/ 25 X) Y)) + X * Swap the two nodes 3 Y (- 3 7) - / 7 25 X
  • 20. Department of Information Technology 20Soft Computing (ITC4256 ) What About Just Randomly Generating Programs? • Is Genetic Programming really better than just randomly creating new functions? • Yes! – Pete Angeline compared the result of evolving a tic-tac-toe algorithm for 200 generations, with a population size of 1000 per generation, against 200,000 randomly generated algorithms – The best evolved program was found to be significantly superior to the best randomly generated program [Genetic Programming FAQ, 2002] • The key lies in using a fitness measure to determine which functions survive to reproduce in each generation
  • 21. Department of Information Technology 21Soft Computing (ITC4256 ) Building a Better Mouse • Apply Genetic Programming to the problem of navigating a maze • What are our terminal and function sets? – Function Set = {If-Movement-Blocked, While-Not-At-Cheese*} – Terminal Set = {Move-Forward, Turn-Left, Turn-Right} * While-Not-At-Cheese will be used exclusively as the root node of the parse tree
  • 22. Department of Information Technology 22Soft Computing (ITC4256 ) Building a Better Mouse How to get the starving mouse to the cheese? Is there a better solution for this maze? How good is this solution? One possible solution: While not at the cheese If the way ahead is blocked Turn left 90 degrees Otherwise Move forward Turn right 90 degreesCheese? Blocked?
  • 23. Department of Information Technology 23Soft Computing (ITC4256 ) Building a Better Mouse A fitness function: Cheese? Blocked? • Each function and terminal other than the root node shall cost one unit to execute • If the mouse spends more than 100 units, it dies of hunger • The fitness measure for a program is determined be executing the program, then squaring the sum of the total units spent and the final distance from the exit • A lower fitness measure is preferable to a higher fitness measure Our mouse will die 10 moves from the exit after spending 100 units, so the fitness measure for our program is 12100
  • 24. Department of Information Technology 24Soft Computing (ITC4256 ) Building a Better Mouse While not at the cheese (12996) If the way ahead is blocked Turn left 90 degrees Otherwise Move forward one space While not at the cheese (12996) Move forward one space Turn right 90 degrees Turn left 90 degrees
  • 25. Department of Information Technology 25Soft Computing (ITC4256 ) Building a Better Mouse While not at the cheese (12996) If the way ahead is blocked Turn left 90 degrees Otherwise Move forward one space While not at the cheese (12996) Move forward one space Turn right 90 degrees Turn left 90 degrees While not at the cheese (12996) If the way ahead is blocked Turn left 90 degrees Otherwise Turn left 90 degrees Mutation:
  • 26. Department of Information Technology 26Soft Computing (ITC4256 ) Building a Better Mouse While not at the cheese (12996) If the way ahead is blocked Turn left 90 degrees Otherwise Move forward one space While not at the cheese (12996) Move forward one space Turn right 90 degrees Turn left 90 degrees While not at the cheese (11664) If the way ahead is blocked Move forward one space Turn right 90 degrees Otherwise Move forward one space Crossover: While not at the cheese (12996) Turn left 90 degrees Turn left 90 degrees
  • 27. Department of Information Technology 27Soft Computing (ITC4256 ) Building a Better Mouse While not at the cheese If the way ahead is blocked Turn right 90 degrees Move forward one space Move forward one space Move forward one space Otherwise Move forward one space Turn right 90 degrees Move forward one space Move forward one space Turn left 90 degrees If the way ahead is blocked Turn left 90 degrees Otherwise Move forward one space (after 4202 generations, with 1000 programs per generation) Is this better? Fitness measure: 2809
  • 28. Department of Information Technology 28Soft Computing (ITC4256 ) Real World Applications • Lockheed Martin Missiles and Space Co. - Near-Minimum-Time Spacecraft Maneuvers [Howley, 96] • GP applied to the problem of rest-to-rest reorientation maneuvers for satellites • Optimal time solution is a vector of nonlinear differential equations, which are difficult to solve • An approximate solution is necessary for a real-time controller • Results: Rest-to-Rest Maneuver Times (8 test cases) – Optimal Solution: 287.93 seconds – Expert Solution: 300.3 seconds – GP Solution: 292.8 seconds
  • 29. Department of Information Technology 29Soft Computing (ITC4256 ) Real World Applications • Symbolic Regression • Problem: Given a set of data points, find a mathematical model
  • 30. Department of Information Technology 30Soft Computing (ITC4256 ) 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]