loukas georgiou and william j. teahan artificial intelligence and intelligent agents research group...

23
LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K. [email protected], [email protected] Constituent Grammatical Evolution (CGE) An improvement of GE implemented with jGE & NetLogo

Upload: milo-mitchell

Post on 25-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

LOUKAS GEORGIOU and WILLIAM J. TEAHANArtificial Intelligence and Intelligent Agents Research GroupSchool of Computer Science, Bangor University, [email protected], [email protected]

Constituent Grammatical Evolution (CGE)

An improvement of GE implemented with jGE & NetLogo

Page 2: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Overview

• Introduction

• Grammatical Evolution (GE)

• Constituent Grammatical Evolution (CGE)

• CGE Implementation

• Benchmarking Problems

• Experimental Results

• Conclusions & Future Work

Page 3: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Introduction

Goals• Tackling the destructive crossover and genotype bloating issues of GE• Improving GE performance in terms of both effectiveness and efficiency

CGE at a glanceConstituent Grammatical Evolution takes inspiration from two very elementary

concepts: genes and conditional behaviour switching. It augments the standard Grammatical Evolution algorithm by incorporating and utilising these concepts in order to improve the performance of the later in agent problems.

CGE Unique Features• Constituent Genes• Conditional Behaviour-Switching • Restriction of the genotype size

Page 4: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Grammatical Evolution

The Grammatical Evolution system

Grammatical Evolution is an evolutionary algorithm that can evolve complete programs in an arbitrary language using a variable-length binary string. The binary string (genome) determines which production rules in a Backus Naur Form (BNF) grammar definition are used in a genotype-to-phenotype mapping process to a program.

Page 5: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Grammatical EvolutionThe GE Mapping Process

1. The genotype is used to map the start symbol of the BNF Grammar into terminals

2. It reads “codons” of 8 bits and generates the corresponding integer (RNA) each time a non-terminal to be translated has more than one production rules

3. The selected production rule is calculated with the formula: rule = [codon integer value] MOD [number of rules for the current non-terminal]

Page 6: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Grammatical Evolution

GE Issues

• Destructive Crossovers

• Low locality of genotype-to-phenotype mapping

• Genotype bloating

• Very poor performance on the SFT when the original

search space is used (as it were defined by Koza)

Page 7: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Constituent Grammatical Evolution

CGE constitutes a conditional behaviour switching evolutionary algorithm, based on the Grammatical Evolution algorithm, and which incorporates the notion of genes in the individual’s genotype.

Main Characteristics• The conditional behaviour switching approach, which biases the search space toward useful areas.

• Incorporation of the notion of genes, which tackles the issue of destructive crossovers and provides useful reusable building blocks.

• Restriction of the genotype size, which tackles the genotype

bloat phenomenon.

Page 8: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Constituent Grammatical Evolution

CGE Inputs• Problem Specification• Language Specification• Behaviour-Switching Specification• Grammatical Evolution algorithm

CGE Parameters• GE Standard Parameters• Genes Pool Size, Genes Generations, • Gene Code Iterations, Gene Evaluations• Genes Codons Min, Genes Codons Max, Genes Max Wraps

Page 9: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Sample BNF Grammar Definitions

<expr> ::= <line> | <expr> <line><line> ::= ifelse food-ahead [ <expr> ][ <expr> ] | <op><op> ::= turn-left | turn-right | move

<code> ::= <line> | <code> <line><line> ::= <condition> | <op><condition> ::= ifelse food-ahead [ <line> ][ <line> ]<op> ::= turn-left | turn-right | move

<behaviour> ::= ifelse food-ahead [ <op> ] [ <op> <behaviour> ] | ifelse food-ahead [ <op> ][ <op> ] | <op>

<op> ::= turn-left | turn-right | move | ... {Constituent Genes Phenotypes}(*)

GE BNF-Koza Grammar Definition for the SFT problem

GE BNF-O’Neill Grammar Definition for the SFT problem

CGE BNF-BS Grammar Definition for the SFT problem

Constituent Grammatical Evolution

Page 10: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

CGE Implementation

• Java & NetLogo

• jGE - Java Grammatical Evolution

• jGE NetLogo Extension

• CGE NetLogo models

Page 11: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

jGE - Official Web Site

Page 12: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

jGE NetLogo Extension

• Extension of jGE for NetLogo

• NetLogo users can use now GE

• GE researchers have now a modeling environment for experiments

• Available from jGE and NetLogo web sites

Page 13: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

CGE NetLogo Models

Page 14: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Benchmarking Problems

• Santa Fe Trail

• Los Altos Hills

• Hampton Court Maze

Page 15: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

The Santa Fe Trail Problem

• A standard benchmark problem• Full of local optima and with many plateaus• Deceptive at all levels• Find all 89 pieces of food• Limited number of steps• Square 32x32 toroidal grid • Three Operations

– move, turn left, turn right• One Sensor

– food ahead

Page 16: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

The Los Altos Hills Problem

• A more challenging version of the SFT

• Introduces two new kinds of irregularity

• 157 pieces of food

• 100x100 toroidal grid

• Trail

– 221 squares

– 29 turns

• Three Operations

– move, turn left, turn right

• One Sensor

– food ahead

Page 17: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

The Hampton Court Maze Problem

• Simple connected maze searching problem

• Find a route to the exit of the maze

• Grid size 39x23

• Three Operations

– move

– turn left

– turn right

• Three Sensors

– wall ahead

– wall left

– wall right

Page 18: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Experimental Results (1)Santa Fe Trail Problem

Page 19: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Experimental Results (2)Santa Fe Trail Problem

Exp #1 Exp #2 Exp #3 Exp #4 Exp #5 Best

Runs 100 100 100 100 100 100

Steps 393 375 393 377 337 337

Success 85% 93% 89% 94% 87% 94%

Avg. Success 90%

Exp #1 Exp #2 Exp #3 Exp #4 Exp #5 Best

Runs 100 100 100 100 100 100

Steps 419 507 415 541 479 415

Success 8% 11% 10% 6% 13% 13%

Avg. Success 10%

Exp #1 Exp #2 Exp #3 Exp #4 Exp #5 Best

Runs 100 100 100 100 100 100

Steps 609 609 607 609 607 607

Success 80% 76% 75% 81% 74% 81%

Avg. Success 78%

CGE

GE using BNF-O’Neill

GE using BNF-Koza

Page 20: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Experimental Results (3)Los Altos Hills Problem

CGE GE using BNF-Koza GE using BNF-O’Neill

Runs 100 100 100

Best Solution’s Steps 1093 No solution No solution

Success Rate 9% 0% 0%

Page 21: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Experimental Results (4)Hampton Court Maze Problem

CGE GE using BNF-Koza GE using BNF-O’Neill

Runs 100 100 100

Best Solution’s Steps 384 439 494

Success Rate 82% 1% 1%

Page 22: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Conclusions & Future Work• CGE builds from elementary and more complex building blocks a control program

which dictates the behaviour of an agent.

• Due to the constituent genes and genotype size limit features, the Grammatical Evolution issues of destructive crossover events and genotype bloating are tackled respectively.

• Experimental results show that CGE outperforms GE in terms of both efficiency (percent of solutions found) and effectiveness (number of required steps of solutions found) in all three benchmarking problems (SFT, LAH, HCM).

• Further work includes the benchmarking of CGE in “real-world” problems and the evaluation of alternative, and probably more efficient, mechanisms for the creation of constituent genes.

• Indeed, the application of the CGE main concepts in other Evolutionary Algorithms will be investigated.

Page 23: LOUKAS GEORGIOU and WILLIAM J. TEAHAN Artificial Intelligence and Intelligent Agents Research Group School of Computer Science, Bangor University, U.K

Thank You!

Any questions?(Also come along to see our poster from

10:30 to 12:10 tomorrow)

Constituent Grammatical Evolution

Artificial Intelligence and Intelligent Agents Research Group