CS Fall 2016 (Shavlik©), Lecture 12, Week 6

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.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
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.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Local Search and Stochastic Algorithms
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithm.
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
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.
Today’s Topics Read –For exam: Chapter 13 of textbook –Not on exam: Sections & Genetic Algorithms (GAs) –Mutation –Crossover –Fitness-proportional.
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.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
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.
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.
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Overview Last two weeks we looked at evolutionary algorithms.
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:
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic Programming.
Introduction to Genetic Algorithms
Using GA’s to Solve Problems
Genetic Algorithms.
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
Introduction to Genetic Algorithm (GA)
CS Fall 2016 (Shavlik©), Lecture 11, Week 6
cs540 - Fall 2015 (Shavlik©), Lecture 25, Week 14
CSC 380: Design and Analysis of Algorithms
An evolutionary approach to solving complex problems
Artificial Intelligence (CS 370D)
Chapter 4 Beyond Classical Search
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 9, Week 5
CS Fall 2016 (Shavlik©), Lecture 10, Week 6
Genetic Algorithms Chapter 3.
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
CS Fall 2016 (Shavlik©), Lecture 12, Week 6
EE368 Soft Computing Genetic Algorithms.
Boltzmann Machine (BM) (§6.4)
Searching for solutions: Genetic Algorithms
Genetic Programming Chapter 6.
Genetic Programming Chapter 6.
Genetic Algorithms & Simulated Evolution
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Genetic Programming Chapter 6.
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
GA.
Presentation transcript:

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 9/17/2018 Today’s Topics Exam Review Thursday 10/20/16 (see note in Moodle) Genetic Algorithms Mutation Crossover Fitness-proportional Reproduction Premature Convergence Building-block Hypothesis 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

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 225,000 possible combo’s to explore! 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

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

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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 Crossover Example Entity A 1 Randomly chosen ‘cross over’ point Entity B 1 Child C 1 Child D 1 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

Aside: My Family Phones My cell phone (#’s changed for anonymity) 406-0917 My wife’s cell phone 328-3729 Our daughter’s cell phone 328-0917 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

Fitness-Proportional Reproduction Let Fi be the fitness of entity i Assume Fi are non-negative (if not, use eFi as the fitness for the GA) Let Ftotal = ∑ Fi // Sum the fitness of all the entities Prob (entity i chosen) = Fi / Ftotal 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 Roulette-Wheel View - spin arrow and see where it stops (pie-wedge size proportional to fitness) 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

A GA Approach to Supervised ML Assume we want to learn a model of the form below (and all of our N features are numeric) if [ ∑ weighti ₓ featurei ] > 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 based on tuneset accuracy 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

Possible Representation of Entities . . . … … … … … 16 bits for weight1 16 bits for weightN 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”) 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

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

Building-Block Hypothesis GAs work well when overall task has subtasks And 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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

Which Fitness Function Better for GAs? State Space Fitness State Space 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 In-Class HW Design Genetic Programming Approach for Creating Good Decision Trees Think for 1-2 Mins before Raising Hand 10/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6

CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6 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/13/16 CS 540 - Fall 2016 (Shavlik©), Lecture 12, Week 6