1 Evolving Grammars: A Structured Point of View Nuno Lourenço University of Coimbra, Portugal naml@dei.uc.pt
Evolving Grammars: A Structured Point of View 2 evolutionary algorithms ‣ Genetic Algorithm ‣ Evolutionary Strategies ‣ Genetic Programming
Evolving Grammars: A Structured Point of View 3 evolutionary algorithms Parents' Initial Population Selection Variation Population Operators Survivors' Best Population Selection Evolutionary Cycle
Evolving Grammars: A Structured Point of View 4 genetic programming ‣ Tree-Based ‣ Graph-Based ‣ Linear CFG-GP ‣ Grammar-Based Grammatical Evolution
Evolving Grammars: A Structured Point of View 5 grammatical evolution Genotype Phenotype
Evolving Grammars: A Structured Point of View 6 grammatical evolution Binary String Integer String Genotype Context Free Grammar Phenotype Program Mapping Process
Evolving Grammars: A Structured Point of View 7 grammatical evolution 00100110 00101110 00100111 00000110 <movement> := left(0) | back (1) | right (2) | front (3) 38 46 39 6 Mapping Rule: Codon Value % Number of Possible Derivations 38 % 4 = 2 Mapping Example
Evolving Grammars: A Structured Point of View 8 grammatical evolution ‣ On the Locality of Grammatical Evolution, Rothlauf et al. ‣ Examining the “Best of Both Worlds” of Grammatical Evolution, Whigham et al.
Evolving Grammars: A Structured Point of View 9 Can We Overcome the Grammatical Evolution Issues?
Evolving Grammars: A Structured Point of View 10 structured grammatical evolution ‣ structured genotypic representation that ensures an one-to-one mapping between genes and non- terminals another
Evolving Grammars: A Structured Point of View 11 structured grammatical evolution <start> <expr> <term> <op> Genotype [0] [0,1] [0,1,0,1] [0,2,1]
Evolving Grammars: A Structured Point of View 12 structured grammatical evolution <start> <expr> <term> <op> Genotype [0] [0,1] [0,1,0,1] [0,2,1] <start> <expr> <op> <expr> * <term> <op> <term> ( <term> <op> <term> ) x + 0.5 x - 0.5
Evolving Grammars: A Structured Point of View 13 structured grammatical evolution 2 Levels of Recursion Recursion
Evolving Grammars: A Structured Point of View 14 structured grammatical evolution Crossover Parent 1 Offspring 1 [0] [0,1] [0,1,0,1] [0,2,1] [0] [0,1] [0,0,0,1] [2,3,1] Mask 0 0 1 1 Parent 2 Offspring 2 [1] [1,0] [0,0,0,1] [2,3,1] [1] [1,0] [0,1,0,1] [0,2,1] Mutation Mutation [0] [0,1] [0,1,0,1] [1,3,1] [0] [1,1] [0,1,0,1] [1,3,1] Variation Operators
Evolving Grammars: A Structured Point of View 15 structured grammatical evolution <start> <start> <expr> <op> <expr> <expr> * ( <term> <op> <term> ) <term> <op> <term> ( <term> <op> <term> ) x * x x + 0.5 x - 0.5 Parent 1 Parent 2 <start> <start> <expr> <op> <expr> <expr> / ( <term> <op> <term> ) <term> <op> <term> ( <term> <op> <term> ) x + 0.5 x * x x - 0.5 Offspring 1 Offspring 2 Crossover
Evolving Grammars: A Structured Point of View 16 structured grammatical evolution <start> <start> <expr> <op> <expr> <op> <expr> <expr> / / ) ( <term> <term> ) <op> ( <term> <op> <term> ) <term> <op> <term> <term> <term> ( <op> x - 0.5 x - 0.5 x - 0.5 x - 0.5 Before Mutation After Mutation Mutation
Evolving Grammars: A Structured Point of View 17 Experimental Analysis
Evolving Grammars: A Structured Point of View 18 problems ‣ 11-Bit Boolean Multiplexer ‣ 5-Bit Parity ‣ Santa Fe Ant Trail ‣ Quartic Polynomial ‣ Boston Housing Problem
Evolving Grammars: A Structured Point of View 19 experimental results 1000 800 ← ERROR → 600 RND GE 200 SGE CFG-GP 200 0 5 10 15 20 25 30 35 40 45 50 ← EVALUATIONS (X1000) → 11-Bit Multiplexer
Evolving Grammars: A Structured Point of View 20 experimental results 16 14 ← ERROR → 12 RND GE 10 SGE CFG-GP 8 0 5 10 15 20 25 30 35 40 45 50 ← EVALUATIONS (X1000) → 5-Bit Parity
Evolving Grammars: A Structured Point of View 21 experimental results 80 RND GE 60 SGE CFG-GP ← ERROR → 40 20 0 0 5 10 15 20 25 30 35 40 45 50 ← EVALUATIONS (X1000) → Santa Fe Ant Trail
Evolving Grammars: A Structured Point of View 22 experimental results 0.6 RND 0.5 GE SGE 0.4 CFG-GP ← RRSE → 0.3 0.2 0.1 0 0 5 10 15 20 25 30 35 40 45 50 ← EVALUATIONS (X1000) → Quartic
Evolving Grammars: A Structured Point of View 23 experimental results 1.30 1.30 RND RND GE GE SGE SGE 1.15 1.15 CFG-GP CFG-GP ← RRSE → ← RRSE → 1.00 1.00 0.95 0.95 0.70 0.70 0 10 20 30 40 50 0 10 20 30 40 50 ← EVALUATIONS (X1000) → ← EVALUATIONS (X1000) → Training Test Boston Housing Problem
Evolving Grammars: A Structured Point of View 24 sge vs ge locality Training Test Distance between solutions after k mutations
Evolving Grammars: A Structured Point of View 25 SGE is good, but…
Evolving Grammars: A Structured Point of View 26 sge criticisms ‣ The input grammar has to be pre-processed ‣ To remove recursion ‣ Compute the maximum number of expansions
Evolving Grammars: A Structured Point of View 27 Dynamic Structured Grammatical Evolution (DSGE)
Evolving Grammars: A Structured Point of View 28 representation ‣ For each non-terminal symbol there is a list of variable size with the integers that encode the expansion possibilities; ‣ Maximum recursion is defined as the maximum sub-tree depth for each non-terminal symbol.
Evolving Grammars: A Structured Point of View 29 initialisation < sigexpr > < node > < sum > < features > < weight > < bias > < number > < digit > 1, 5, 9 1, 5, 9 1 0 0 1 1, 5, 9 < sigexpr > < node > | < node > + < sigexpr > + < node > < sigexpr > < weight > * sig( < sum > + < bias > ) < weight > * sig( < sum > + < bias > ) < number > < digit > . < digit >< digit > | < number > - < digit > . < digit >< digit > - < digit > . < digit > < digit > 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 1 5 9 initialisation
Evolving Grammars: A Structured Point of View 30 decoding procedure ‣ Similar to the initialisation procedure; ‣ Instead of selecting random expansion possibilities, the ones encoded in the genotype are used;
Evolving Grammars: A Structured Point of View 31 Experimental Analysis
Evolving Grammars: A Structured Point of View 32 problems ‣ 11-Bit Boolean Multiplexer ‣ 5-Bit Parity ‣ Santa Fe Ant Trail ‣ Quartic Polynomial ‣ Boston Housing Problem
Evolving Grammars: A Structured Point of View 33 experimental results 800 750 700 ← FITNESS → 650 600 550 500 450 0 10 20 30 40 50 ← GENERATION → SGE DSGE 11-Bit Multiplexer
Evolving Grammars: A Structured Point of View 34 experimental results 70 60 50 ← FITNESS → 40 30 20 10 0 0 10 20 30 40 50 ← GENERATION → SGE DSGE Santa Fe Ant Trail
Evolving Grammars: A Structured Point of View 35 experimental results 0.35 0.30 0.25 ← FITNESS → 0.20 0.15 0.10 0.05 0.00 0 10 20 30 40 50 ← GENERATION → SGE DSGE Quartic Problem
Evolving Grammars: A Structured Point of View 36 experimental results 1.15 1.15 1.10 1.10 1.05 1.05 ← FITNESS → ← FITNESS → 1.00 1.00 0.95 0.95 0.90 0.90 0.85 0.85 0.80 0.80 0.75 0.75 0 10 20 30 40 50 0 10 20 30 40 50 ← GENERATION → ← GENERATION → SGE DSGE Training Test Boston Housing Problem
Evolving Grammars: A Structured Point of View 37 Evolving Artificial Neural Networks
Evolving Grammars: A Structured Point of View 38 datasets ‣ Flame [2]; ‣ Wisconsin Breast Cancer Detection (WDBC) [30]; ‣ Ionosphere [34]; ‣ Sonar [60].
Evolving Grammars: A Structured Point of View 39 grammar < sigexpr > ::= < node > | < node > + < sigexpr > < node > ::= < weight > ∗ sig( < sum > + < bias > ) < sum > ::= < weight > ∗ < features > | < sum > + < sum > < features > ::= x 1 | . . . | x n < weight > ::= < number > < bias > ::= < number > < number > ::= < digit > . < digit >< digit > | – < digit > . < digit >< digit > < digit > ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Recommend
More recommend