Today’s Topics Read –For exam: Chapter 13 of textbook –Not on exam: Sections 14.1 - 14.3 & 14.4.1 Genetic Algorithms (GAs) –Mutation –Crossover –Fitness-proportional.

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

Biologically Inspired Computing: Operators for Evolutionary Algorithms
Tetris and Genetic Algorithms Math Club 5/30/2011.
Case Study: Genetic Algorithms GAs are an area of AI research –used to solve search problems with potentially better performance than traditional search.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
21-May-15 Genetic Algorithms. 2 Evolution Here’s a very oversimplified description of how evolution works in biology Organisms (animals or plants) produce.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 IOE/MFG 543 Chapter 14: General purpose procedures for scheduling in practice Section 14.5: Local search – Genetic Algorithms.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Machine Learning Genetic Programming.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Local Search and Stochastic Algorithms
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithm.
Introduction to Genetic Algorithms and Evolutionary Computation
Soft Computing Lecture 18 Foundations of genetic algorithms (GA). Using of GA.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic Algorithms Michael J. Watts
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
Chapter 4.1 Beyond “Classic” Search. What were the pieces necessary for “classic” search.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 16 February 2007 William.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Today’s Topics Learning Decision Trees (Chapter 18) –We’ll use d-trees to introduce/motivate many general issues in ML (eg, overfitting reduction) “Forests”
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Today’s Topics HW1 Due 11:55pm Today (no later than next Tuesday) HW2 Out, Due in Two Weeks Next Week We’ll Discuss the Make-Up Midterm Be Sure to Check.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Today’s Topics Read: Chapters 7, 8, and 9 on Logical Representation and Reasoning HW3 due at 11:55pm THURS (ditto for your Nannon Tourney Entry) Recipe.
CS 8625 High Performance Computing Dr. Hoganson Copyright © 2003, Dr. Ken Hoganson CS8625 Class Will Start Momentarily… CS8625 High Performance.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithms Chapter Description of Presentations
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Genetic Algorithms. Overview “A genetic algorithm (or GA) is a variant of stochastic beam search in which successor states are generated by combining.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Today’s Topics 11/10/15CS Fall 2015 (Shavlik©), Lecture 21, Week 101 More on DEEP ANNs –Convolution –Max Pooling –Drop Out Final ANN Wrapup FYI:
CS Fall 2016 (Shavlik©), Lecture 11, Week 6
CSC 380: Design and Analysis of Algorithms
CS Fall 2016 (Shavlik©), Lecture 12, Week 6
Artificial Intelligence (CS 370D)
CS621: Artificial Intelligence
cs638/838 - Spring 2017 (Shavlik©), Week 7
Case Study: Genetic Algorithms
cs540 - Fall 2016 (Shavlik©), Lecture 20, Week 11
cs540 - Fall 2016 (Shavlik©), Lecture 18, Week 10
CS Fall 2016 (Shavlik©), Lecture 2
CS Fall 2016 (Shavlik©), Lecture 10, Week 6
Genetic Algorithms Chapter 3.
CS Fall 2016 (Shavlik©), Lecture 12, Week 6
Searching for solutions: Genetic Algorithms
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
CSC 380: Design and Analysis of Algorithms
Presentation transcript:

Today’s Topics Read –For exam: Chapter 13 of textbook –Not on exam: Sections & Genetic Algorithms (GAs) –Mutation –Crossover –Fitness-proportional Reproduction –Premature Convergence –Building-block Hypothesis End of Coverage of SEARCH 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 51

Genetic Algorithms (GAs) Use ideas of –Survival of fittest (death) –Combination of ‘genetic material’ (sex) –(‘Taxes’ play a role in some algo’s) –Mutation (randomness) Mixing of genes from parents more important than mutation (contrary to popular press) –About 25,000 human genes –For simplicity, assume two variants of each –So 2 25,000 possible combo’s to explore! 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 2

Basic FRAMEWORK for GAs (many possible ALGORITHMS) 1.Create initial population of entities 2.Evaluate each entity using a fitness function 3.Discard worst N% of entities 4.K times, stochastically grab ‘best’ parents (fitness proportional reproduction) i.Combine them (crossover) to create new entities ii.Make some random changes (mutation) 5.Goto 2 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 3

Representing Entities as Bit Strings Assume we represent our problem as a bit string (but any data structure ok for GAs) Cross Over (example on next slide) –Pick two entities, A and B –Choose a cross-over location –Copy first part of A and last part of B –Copy first part of B and last part of A Mutation –Randomly flip 1 or more bits 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 4

Crossover Example /6/15CS Fall 2015 (Shavlik©), Lecture 13, Week Entity A Entity B Randomly chosen ‘cross over’ point Child C Child D

Aside: My Family Phones My cell phone (#’s changed for anonymity) My wife’s cell phone Our daughter’s cell phone /6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 6

Typical Design Discard Worst HALF of Population Generate Children to Refill Population Keep Parents and Generated Children ‘Flip’ a Small Faction of Bits (eg, 0.1%) –Flip bits in all member of population 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 7

Fitness-Proportional Reproduction Let F i be the fitness of entity i Assume F i are non-negative (if not, use e Fi as the fitness for the GA) Let F total = ∑ F i // Sum the fitness of all the entities Prob (entity i chosen) = F i / F total 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 8

Roulette-Wheel View - spin arrow and see where it stops (pie-wedge size proportional to fitness) 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 9

A GA Approach to Supervised ML Assume we want to learn a model of the form (and all of our N features are numeric) if [ ∑ weight i feature i ] > threshold then return POS else return NEG Representation of Entities? –See next slide Fitness? –Accuracy on TRAIN set plus maybe some points for being different from rest of population Role of Tuning Set? –Could chose best member of population when done –If we use ALL of population (an ‘ensemble’), could weight each’s predictions 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 10

Possible Representation of Entities 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 11 … … … … … bits for weight 1 16 bits for weight N 16 bits for threshold Notes 1) we might only use 16 bits so weights are small (Occam’s Razor) 2) first bit could be SIGN (or use “2’s complement”)

Design Tip Design your space of entities so that most are viable (ie, get a non-zero fitness) Otherwise will waste a lot of cpu cycles generating useless entities 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 12

Premature Convergence (‘Inbreeding’) If not careful, entire population can become minor variations of a small number of ‘bit vectors’ Eg, consider crossing over A and child_of_A –Result will be  ¾ a copy of A Solutions –Don’t crossover with ‘recent’ descendent –Mutate more (but might destroy good traits) 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 13

GAs as Searching a Space Consider the space defined by single-bit mutations 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week …01 101…00001…01 101…10001…00 011…10 etc What is a CROSSOVER? - Grab any two nodes (might not be adjacent) - ‘hyper jump’ to a possibly distant 3 rd node

Building-Block Hypothesis GAs work well when overall task has subtasks Fitness function gives credit for being able to solve subtasks Crossover ‘mixes and matches’ solutions to subtasks Eg, consider building cars –Need to engine, wheels, windows, brakes, etc 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 15

Which Fitness Function Better for GAs? 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 16 Fitness State Space Fitness State Space

Genetic Programming Entities need not be bit strings Often ‘genetic programming’ used for richer rep’s of entities –Decision trees –Neural networks –Code snippets –Etc 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 17

In-Class HW Design Genetic Programming Approach for Creating Good Decision Trees Think for 2-3 Mins before Raising Hand 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 18

GA Wrapup Can come up with quite creative solutions since many possibilities considered Might be too undirected? Designing good fitness functions can be a challenge Make more sense as computing power  10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 19

End of Search We’re done with search in discrete spaces SEARCH is a powerful, general-purpose way to look at problem solving Next: probabilistic reasoning (but we’ll return to viewing AI tasks from the perspective of search periodically) 10/6/15CS Fall 2015 (Shavlik©), Lecture 13, Week 5 20