Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to Draw a Straight Line Using a GP

Similar presentations


Presentation on theme: "How to Draw a Straight Line Using a GP"— Presentation transcript:

1 How to Draw a Straight Line Using a GP
Benchmarking Evolutionary Design Against 19th Century Kinematic Synthesis Hod Lipson Computational Synthesis Lab Mechanical & Aerospace Engineering and Computing & Information Science, Cornell University This presentations discusses the application of genetic programming to the synthesis of compound 2D kinematic mechanisms. The objective of this work is twofold: 1. To investigate hierarchical representations suitable for evolving kinematic mechanisms, and 2. To benchmarks the results against one of the classical kinematic challenges of 19th century mechanical design. I will present considerations for selecting a representation for mechanism design, and a number of human-competitive inventions.

2 Kinematic Synthesis is a Challenge
Kinematics: Science of pure motion Concerned with geometric displacement of connected rigid links without regard to forces or physical embodiment Kinematic analysis: Predict motions of given mechanism Well understood Kinematic Synthesis: Assemble of a mechanism that achieves a prespecified motion Poorly understood Analytical methods: exist for some special cases (Chebychev) Evolutionary Methods: Primarily in robotics Only tree-structures (Sims 1994, Komosinski 2000, Hornby & Lipson, 2002) Compound mechanisms (kinematic loops) (Lipson & Pollack, 2000) Kinematics – the science of pure motion – is concerned with the analysis and synthesis of mechanisms composed of connected rigid elements. It deals with the relative geometric displacements of points and links of a mechanism, without regards to forces that generate those displacements or the physical embodiment that realizes them. The interest in kinematics has its origins in machines as old as civilization, and is one of the very first “technology” domains – from war machines to wheat mills. However, it was mostly invigorated in the 18th and 19th century with the invention of the steam engine. Today – two centuries later – we understand very well how to analyze mechanisms, analytically and computationally, but we still hardly know how to synthesize a mechanism to achieve a given function. While evolution of computational mechanisms (e.g. neural networks) has received a lot of attention, there is hardly any work on evolution of kinematic mechanisms. A few of works have explored this – mostly in the context of evolutionary robotics – but usually focus on tree-like structures. Here we want to investigate how to systematically generate general kinematics, including compound mechanisms with many entangled kinematic chains.

3 Background: Long standing problem
One of the first synthesis challenges to be posed: “[A rational approach to synthesis is needed] to obtain, by direct and certain methods, all the forms and arrangements that are applicable to the desired purpose. At present, questions of this kind can only be solved by that species of intuition that which long familiarity with the subject usually confers upon experienced persons, but which they are totally unable to communicate to others. When the mind of a mechanician is occupied with the contrivance of a machine, he must wait until, in the midst of his meditations, some happy combination presents itself to his mind which may answer his purpose.” Robert Willis, The Principles of Mechanism, 1841 [Optional slide] The systematic synthesis of a mechanism for a given purpose is a long-standing problem, and perhaps one of the earliest general synthesis problems to be posed. Robert Willis, a professor of natural and experimental philosophy at Cambridge, wrote in his 1841 book The Principles of Mechanisms: [Read Text]

4 Background: Degrees of Freedom
Degrees of freedom (DoF) Number of independent parameters needed to describe the state of a mechanism For 2D Structure, DoF = 2n-m-3 n=nodes m=links 3=rigid body DoF removed by ground Not applicable under singularities and degeneracies [optional – but important slide] Before we delve into representations I want to discuss an important concept in the description of a mechanism: degrees of freedom (DoF). Some of the mechanisms’ vertices may be grounded, and therefore immobile, while other vertices are free to move while being constrained by links attaching them to other nodes. The overall number of independent parameters needed to fully specify the state of the entire mechanism is its number of DoF. A grounded four-bar linkage (Figure a) for example, has exactly one degree of freedom, and its nodes will therefore trace curves. A five-bar mechanism (Figure b) has two degrees of freedom, and some of its nodes will trace (fill) areas. There may, however, be mechanisms that are over-constrained in some part and under-constrained in another, leading to misleading total DoF count (Figure c). The number of degrees of freedom of a mechanism can be calculated directly by considering the fact that each node of the mechanism has two DoF of motion in the plane, and each link eliminates one of these DoF by providing one constraint on the distance between two nodes. The entire mechanism also has three rigid-body DoF that can be eliminated by grounding any one of the links. The total DoF of a grounded mechanism with n nodes and m links is thus 2n–m–3. 1=curve 2=area N/A (overconstrained)

5 Mechanism Representation
A mechanism could be represented as a graph Many graph encodings (Luke & Spector, 1996) Cellular encoding (Gruau, 1994) Parse trees L-Systems Suitable for computational networks, not mechanical networks Highly connected graphs Vanishingly small number of them have one DoF Need a representation suitable mechanisms Retains DoF across variation Tree-based (hierarchical, for GP) Evolvable (less coupled, effective crossover) Evolutionary algorithms progress by modifying the mechanism’s graph directly, or may use an indirect encoding (genotype) from which the graph (phenotype) is constructed. How can we represent a mechanism. If its simply a graph, can we use any graph encoding? There are a number of different representations used to describe or ‘grow’ computational graphs, such as neural networks. Some methods use context free grammars, L-systems, and parse trees operating on nodes and edges Most of the existing representations for encoding networks generate highly connected architectures that are suitable for computational networks, but which are less suitable for kinematic networks because they over-constrain the motion and create deadlocked mechanisms. Using these representations, the likelihood of generating a mechanism with exactly one degree of freedom is vanishingly small. A second consideration in the choice of representation is that of evolvability. Many of the representations cited above result in context-sensitive and order-sensitive description of a network. This hampers the effectiveness of crossover operators.

6 Background: Top-down and Bottom-up Tree Encodings
[Optional] There are two approaches to designing tree representations: A top-down tree with an embryo, and a bottom-up tree. Both have been used extensively in the evolutionary computation literature. A top-down representation starts with an initial structure (an embryo) and specifies a sequence of operations that progressively modify it into its final form. Example: Koza’s top-down tree that specifies the construction of an electric circuit, starting with an initial circuit and recursively replacing circuit segments with serial and parallel arrangements of electrical components. The figure on the right shows a bottom-up construction of a symbolic expression. Here terminal nodes represent constants or variables, and parent nodes represent mathematical operators. Because of the nature of mathematical expressions, parsing order is important, and swapping order of some child nodes would result in a mathematically different expression. The terms are unchanged, however, by the content of their siblings. This tree is thus order dependent but context independent. We would like to come up with a bottom-up or bottom-down representation of for mechanisms. Bottom up: Composition of terminals, e.g. Symbolic expression Top down: Embryo + variation operators. E.g. Circuit

7 Top down encoding of a mechanism
Start with Embryo with desired # of DoF, e.g. a four-bar mechanism (1 DoF) Two variation operators maintain DoF Here is a top-down encoding of a mechanism: Top-down construction of a mechanism starts with an embryonic machine with the desired number of DoF, such as the four-bar (which has one DoF). A tree of operators then recursively modifies that mechanism by replacing single links with assemblies of links with an equivalent DoF, so that the total number of DoF remains unchanged. Two such transformations are shown The D and T operators. The D operator creates a new node and connects it to both the endpoints of a given link, essentially creating a rigid triangular component. The T operator replaces a given link with two links that pass through a newly created node. The new node is also connected to some other existing node. In both operators, the position of the new nodes is specified in coordinates local to link being modified. Operators provably DoF invariant On the right, we see how application of a tree of operators to the embryonic mechanism, will transform it into an arbitrary compound mechanism with exactly one DoF. Terminals of the tree are the actual links of the mechanism. Example: A tree that constructs this 1-DoF compound mechanism E.g. Transform dyad into tryad Operators provably DoF invariant

8 Bottom-up encoding of a 1-DoF mechanism
1-DoF terminals Alternatively, bottom-up construction of a one-DoF mechanism begins at the leaves of the tree with atomic building blocks and hierarchically assembles them into components. The atomic building block is a dyad as shown in Figure 4a, and has the desired # of DoF when grounded: For example, a four-bar or a dyad. The composition operator joins merges two nodes from each machine, thu s ensuring that the total number of DoF is not changed when two subcomponents are combined. The total product of the tree will also be a mechanism with unchanged # of DoF. An example of this construction process is shown in the figure on the right, for exactly the same mechanism we saw in the previous slide. These operators too are provably DoF invariant Join substructures hierarchically at exactly two nodes (maintains DoF) Example: A tree that constructs this 1-DoF compound mechanism Operators provably DoF invariant

9 Intermediate Conclusions
Proposed two new DoF-invariant representations for kinematic mechanisms top-down and bottom-up tree encodings So lets see what we have so far…. But wait, there’s more… But wait, there’s more…

10 A hard test problem The straight line problem
Devise a mechanism that traces a straight line without a reference to an existing straight line Human-competitive problem Of great practical importance in the 18th and 19th century. has baffled the world’s greatest kinematic inventors for a century, many solutions put forward. Now forgotten with advent of precision manufacturing In selecting a test problem to evaluate the performance of a GP using the above representations, we sought a kinematic synthesis challenge that is on par with human inventive capacity. There are numerous ingenious kinematic mechanisms in many everyday products around us, from cars to DVD players and electric toothbrushes [14]. But nowhere was a single design challenge so clearly states and persistent as the straight-line problem. The straight-line problem seeks a kinematic mechanism that traces a straight line without reference to an existing straight line. The straight-line problem was of great practical importance in the 18th and 19th centuries, an occupied great inventors for nearly a century. It is a great chapter in invention, which is now forgotten with the advent of precision manufacturing.

11 The Straight Line Problem
It is easy to think of a mechanism that traces an exact circle without having a circle built in: A compass. It is easy to imagine a kinematic mechanism that traces an exact circle, for example, without having a circle pre-built in to it: A simple link, constrained at one endpoint and tracing at the other endpoint would create an exact circle. Here’s such a device: A compass. Tracing an exact straight line without reference to an existing straight line is, however, much more difficult. Can anyone think of a solution? ? Can you think of a linkage mechanism that will trace a straight line without reference to an existing straight line?

12 The Straight Line Problem
It is easy to think of a mechanism that traces an exact circle without having a circle built in: A compass. Here’s one solution, known as “The Peaucellier” (1873) One solution: The Peaucellier (1873) The straightness of the links themselves does not matter

13 The Straight-Line problem
Needed to guide the piston of the steam engine. The breakthrough that made steam engines a success (b) “Though I am not over anxious after fame, yet I am more proud of the parallel motion than of any other mechanical invention I have ever made” James Watt, cf [15] Watt’s first straight line mechanism (1784) The straight line mechanism was very important in the steam engine age. Today, you think of a piston as a shiny, precision-manufactured nickel-coated head, but its early development was plagued with problems of reliability and machining accuracy, leading to both steam leakage around the piston heads and overwhelming friction. Everyone was looking for ways to guide the piston in a straight line. James Watt initially used racks and sectors, and many other ideas, which all failed in one way or another. The breakthrough came with the invention of a straight-line linkage mechanism: To appreciate how important this was, read this note James Watt wrote to his son in his final years. James Watt’s original patents used racks and sectors, and many other cumbersome solutions

14 More established solutions
Silverster-Kempe’s (1877) Peaucelier (1873) Chebyshev (1867) Robert (1841) Source: Kempe A. B., (1877), How To Draw A Straight Line, London [Optional] Since the initial inception of the straight-line mechanism, many inventors engaged in improving and creating alternative designs. These figures show a number of additional practical designs. The obsession with the straight-line mechanism continued well beyond what its practical usefulness merited, to become a mathematical puzzle in its own right. See Chebyshev (1867) Chebyshev-Evans (1907)

15 Considered fundamental technology
Cornell University acquired in 1882 about 40 straight-line mechanism models and used them in the early engineering curriculum. See videos at Cornell University Digital Library of Kinematic Models The challenge continued even after the invention of the perfect mechanism by Peaucellier in 1873 – a century after Watt’s initial invention. Numerous straight-line mechanisms were proposed, as evident from the 39 different straight-line mechanisms shown in this Voigt catalog of educational models. Cornell University acquired in 1882 about 40 straight-line mechanism models and used them in the early engineering curriculum. We still have them in the halls today.

16 Background: Kinematic simulation
Propagate motion using relaxation of elastic linkages Linkages stiffened to approximate rigid motion Good: Simple, accurate and robust, handles singularities well Bad: No dynamics (no accelerations, masses); slow [optional] The performance of a given mechanism was evaluated using an in-house kinematic simulator

17 Background: Comparing Mechanisms
Comparison of mechanisms can be difficult Equivalent mechanisms may appear very different Masked by excess and redundant topology Two transformations allow moving in “neutral pathways” of mechanisms Rigid diagonal swap Redundant dyad removal/addition [optional] Comparison of mechanism can be difficult, as apparently different machines may be functionally equivalent. Complex mechanisms can be reduced to simpler mechanisms with equivalent curve traces by through iterative transformations. These are essentially neutral operators that can be used in the search as well.

18 Evolving Straight line mechanisms
Used GP with Top-down tree encoding and 2-bar or 4-bar embryo Population size: 100 Crossover 90% Mutation 10% (Node positions, Operator types) Selection: SUS Fitness: Straightness Aspect ratio of tight bounding box of node traces We used a GP with a population of 100 individuals and fitness proportional selection using stochastic-universal-sampling. The fitness was the linearity of the most linear curve traced by any of the mechanisms’ vertices, when the crank node was turned 45 degrees. Linearity is the aspect ratio of the tightest bounding box around node traces.

19 Evolving Straight line mechanisms
The search progressed in steps of discovery, as shown in this typical run. A variety of mechanisms were produced, most with linearity exceeding 1000 (i.e., deviation of one millimeter over a meter) and some as high as (35m over a meter).

20 Some results This machine has a linearity of 4979 Linearity 1:4979

21 Some results Linearity 1:5300 Infringes on Robert’s Linkage (1841)
This machine has a linearity of 5300 It clearly infringes on earlier principles of Robert’s Linkage (1841) Linearity 1:5300 Infringes on Robert’s Linkage (1841) Published: Kempe A. B., (1877), How To Draw A Straight Line, London

22 Some results This machine has a linearity of 12000 Linearity 1:12819

23 Some results Linearity 1:28340 Many more solutions were produced
This machine has a linearity of 28000 Many more solutions were evolved Linearity 1:28340 Many more solutions were produced

24 Conclusions Open-ended Kinematics synthesis
Long standing problem Many applications, e.g. Robotics Synthesis for computational networks inadequate Proposed two new representations for kinematic mechanisms Top-down and bottom-up tree encodings DoF-invariant operators Neutral-pathway operators Benchmarked against human-competitive problem Extensive documentation for a century of attempts Results infringe and outperform known solutions Next Step Improve search process, and Apply to contemporary challenges (multi DoF robotics) So, in conclusion…


Download ppt "How to Draw a Straight Line Using a GP"

Similar presentations


Ads by Google