For Monday Nothing due Chris and Rons project talks Program 4 - - PowerPoint PPT Presentation

for monday
SMART_READER_LITE
LIVE PREVIEW

For Monday Nothing due Chris and Rons project talks Program 4 - - PowerPoint PPT Presentation

For Monday Nothing due Chris and Rons project talks Program 4 Discussion Demo http://math.hws.edu/xJava/GA/ http://www.dieslunae.net/tsp/ http://www.sambee.co.th/MazeSolver/mazeg a.htm


slide-1
SLIDE 1

For Monday

  • Nothing due
  • Chris and Ron’s project talks
slide-2
SLIDE 2

Program 4 Discussion

slide-3
SLIDE 3

Demo

  • http://math.hws.edu/xJava/GA/
  • http://www.dieslunae.net/tsp/
  • http://www.sambee.co.th/MazeSolver/mazeg

a.htm

  • http://www.ads.tuwien.ac.at/raidl/tspga/TSP

GA.html

slide-4
SLIDE 4

Representation

slide-5
SLIDE 5

ANTENNA DESIGN

slide-6
SLIDE 6

ANTENNA DESIGN

  • The problem (Altshuler and Linden 1998) is to

determine the x-y-z coordinates of the 3- dimensional position of the ends (X1, Y1, Z1, X2, Y2, Z2,… , X7, Y7, Z7) of 7 straight wires so that the resulting 7-wire antenna satisfies certain performance requirements

  • The first wire starts at feed point (0, 0, 0) in the

middle of the ground plane

  • The antenna must fit inside the 0.5 cube
slide-7
SLIDE 7

ANTENNA GENOME

  • 105-bit chromosome (genome)
  • Each x-y-z coordinate is represented by 5 bits (4-

bit granularity for data plus a sign bit)

  • Total chromosome is 3  7  5 = 105 bits

X1 Y1 Z1 X2 Y2 Z2 … +0010 -1110 +0001 +0011

  • 1011

+0011 …

slide-8
SLIDE 8

ANTENNA FITNESS

  • Antenna is for ground-to-satellite

communications for cars and handsets

  • We desire near-uniform gain pattern 10

above the horizon

  • Fitness is measured based on the antenna's

radiation pattern. The radiation pattern is simulated by National Electromagnetics Code (NEC)

slide-9
SLIDE 9

ANTENNA FITNESS

  • Fitness is sum of the squares of the

difference between the average gain and the antenna's gain

  • Sum is taken for angles  between -90 and

+90 and all azimuth angles  from 0 to 180

  • The smaller the value of fitness, the better
slide-10
SLIDE 10

Alternatives

  • Neural Networks (SANE)
  • Structured Representations
slide-11
SLIDE 11

Genetic Programming

  • Applying genetic algorithms to automatic

programming

slide-12
SLIDE 12

A COMPUTER PROGRAM

slide-13
SLIDE 13

A COMPUTER PROGRAM IN C

int foo (int time) { int temp1, temp2; if (time > 10) temp1 = 3; else temp1 = 4; temp2 = temp1 + 1 + 2; return (temp2); }

slide-14
SLIDE 14

OUTPUT OF C PROGRAM

Time Output 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 6 10 6 11 7 12 7

slide-15
SLIDE 15

PROGRAM TREE

(+ 1 2 (IF (> TIME 10) 3 4))

slide-16
SLIDE 16

CREATING RANDOM PROGRAMS

slide-17
SLIDE 17

CREATING RANDOM PROGRAMS

  • Available functions

F = {+, -, *, %, IFLTE}

  • Available terminals

T = {X, Y, Random-Constants}

  • The random programs are:

– Of different sizes and shapes – Syntactically valid – Executable

slide-18
SLIDE 18

GP GENETIC OPERATIONS

  • Reproduction
  • Mutation
  • Crossover (sexual recombination)
  • Architecture-altering operations
slide-19
SLIDE 19

MUTATION OPERATION

slide-20
SLIDE 20

MUTATION OPERATION

  • Select 1 parent probabilistically based on fitness
  • Pick point from 1 to NUMBER-OF-POINTS
  • Delete subtree at the picked point
  • Grow new subtree at the mutation point in same

way as generated trees for initial random population (generation 0)

  • The result is a syntactically valid executable

program

  • Put the offspring into the next generation of the

population

slide-21
SLIDE 21

CROSSOVER OPERATION

slide-22
SLIDE 22

CROSSOVER OPERATION

  • Select 2 parents probabilistically based on fitness
  • Randomly pick a number from 1 to NUMBER-OF-POINTS

for 1st parent

  • Independently randomly pick a number for 2nd parent
  • Identify the subtrees rooted at the two picked points
  • Exchange the subtrees
  • The result is a syntactically valid executable program
  • Put the offspring into the next generation of the population
slide-23
SLIDE 23

REPRODUCTION OPERATION

  • Select parent probabilistically based on

fitness

  • Copy it (unchanged) into the next

generation of the population

slide-24
SLIDE 24

FIVE MAJOR PREPARATORY STEPS FOR GP

  • Determining the set of terminals
  • Determining the set of functions
  • Determining the fitness measure
  • Determining the parameters for the run
  • Determining the method for designating a result and the

criterion for terminating a run

slide-25
SLIDE 25

ILLUSTRATIVE GP RUN

slide-26
SLIDE 26

SYMBOLIC REGRESSION

Independent variable X Dependent variable Y

  • 1.00

1.00

  • 0.80

0.84

  • 0.60

0.76

  • 0.40

0.76

  • 0.20

0.84 0.00 1.00 0.20 1.24 0.40 1.56 0.60 1.96 0.80 2.44 1.00 3.00

slide-27
SLIDE 27

PREPARATORY STEPS

Objective: Find a computer program with one input (independent variable X) whose output equals the given data 1 Terminal set: T = {X, Random-Constants} 2 Function set: F = {+, -, *, %} 3 Fitness: The sum of the absolute value of the differences between the candidate program’s

  • utput

and the given data (computed over numerous values of the independent variable x from –1.0 to +1.0) 4 Parameters: Population size M = 4 5 Termination: An individual emerges whose sum of absolute errors is less than 0.1

slide-28
SLIDE 28

SYMBOLIC REGRESSION POPULATION OF 4 RANDOMLY CREATED INDIVIDUALS FOR GENERATION 0

slide-29
SLIDE 29

SYMBOLIC REGRESSION x2 + x + 1 FITNESS OF THE 4 INDIVIDUALS IN GEN 0

x + 1 x2 + 1 2 x 0.67 1.00 1.70 2.67

slide-30
SLIDE 30

SYMBOLIC REGRESSION x2 + x + 1 GENERATION 1

Copy of (a) Mutant of (c) picking “2” as mutation point First offspring of crossover of (a) and (b) picking “+” of parent (a) and left-most “x” of parent (b) as crossover points Second offspring

  • f crossover of

(a) and (b) picking “+” of parent (a) and left-most “x” of parent (b) as crossover points

slide-31
SLIDE 31

CLASSIFICATION

slide-32
SLIDE 32

GP TABLEAU – INTERTWINED SPIRALS

Objective: Create a program to classify a given point in the x-y plane to the red or blue spiral 1 Terminal set: T = {X,Y,Random-Constants} 2 Function set: F = {+,-,*,%,IFLTE,SIN,COS} 3 Fitness: The number of correctly classified points (0 – 194) 4 Parameters: M = 10,000. G = 51 5 Termination: An individual program scores 194

slide-33
SLIDE 33

Demos

  • http://www.cs.northwestern.edu/~fjs750/netl
  • go/final/gpdemo.html
  • http://www.3dprintingtechnologies.com/ndst

uff/Research/WutheringHeights/Page1.htm