110 likes | 124 Views
Evolutionary Robotics. Using A Formal Grammar To Evolve Robot Bodies and Brains. Turtle Graphics (from computer graphics). Turtle moves over a 2D surface. Possesses: Position Orientation Pen, which can be up or down. “ Code ” for drawing: Move forward 10 paces Turn left 95 degrees
E N D
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains Turtle Graphics (from computer graphics) • Turtle moves over a 2D surface. • Possesses: • Position • Orientation • Pen, which can be up or down. • “Code” for drawing: • Move forward 10 paces • Turn left 95 degrees • Drop pen • Move forward • Lift pen… Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains • Drop pen • For i = 1 to 1000 • forward 1 + i/1000 • turn 85 degrees left • Lift pen Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains • Formal grammar: • Define an alphabet V that contains • elements that can be replaced (variables) • 2. Define a starting ‘sentence’ composed of • elements from V • (eg. ‘AB’) • 3. Define a set of production rules: • rule is composed of two strings: • the predecessor and • the successor • (eg. A AB • B A) • 4. If a symbol C in V does not match any • predecessor, then C is a constant. • 5. Apply the productions rules to the start sentence. • 6. Continue to apply the rules until the sentence • only contains constants. Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains A = algae B = bud (cannot reproduce) A AB is a model of growth: algae ‘spawns’ a bud. B A models maturation: bud becomes adult algae capable of reproduction. Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains • Lindenmayer system = • A system in which ‘turtle graphics’ commands • serve as the elements in a formal grammar. • Example: “Drawing” Cantor dust. • variables : A B • constants : none • start : A {starting character string} • rules : (A → ABA), (B → BBB) • Let A mean "draw forward" and B mean "move forward".
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains • Lindenmayer system = • Given the right L-system, one can produce • structures that look like biological plants: • Example: Fractal plant • variables : X F • constants : + − • start : X • rules : (X → F-[[X]+X]+F[+FX]-X), • (F → FF) • F means "draw forward", • means "turn left 25°", and • + means "turn right 25°". • X does not correspond to any drawing action. • [ = ‘push’ position and angle • ] = ‘pop’ position and angle
Evolutionary Robotics Building bodies with L-systems [ = push state ] = pop state {block}(n) = repeat enclosed block n times. forward: create bar forward backward: move backward Revolute-1: move forward, add joint around Z Revolute-2: move forward, add joint around Y up(n): rotate heading +n*90o about turtle’s X axis down(n): rotate –n*90o around X left/right(n): … around Y counter/clockwise(n): … around Z Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Turtle ‘lives’ on synapses. If turtle’s ‘home’ link connects neuron A to neuron B… [ = push ‘home’ link ] = pop new ‘home’ link decrease-weight(n): subtract n from weight of current link. duplicate(n): Create new link from A to B with weight n. loop(n): Create new link from B to itself with weight n. merge(n): Merge neurons A and B into single neuron, C. new ‘home’ link is nth input link to C. parent(n): move to nth input link to A. next(n): move to nth output link from B. reverse: link changed to point from B to A. output(n): neuron A sends commands to the closest joint. split(n): create new neuron C; attach edge from A to C; and create a new edge from C to B with weight n. Building brains with L-systems
Connecting Body and Brain In the formal grammar, throw ‘body’ and ‘brain’ elements together. Turtle ‘points’ to both a body part and a synapse. If a ‘joint’ element is called, output(1) is also called: connects part of the neural network to the joint.
Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.
Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative representation for body-brain evolution. GECCO 2001.