Reinventing the Wheel: an Experiment in Evolutionary Geometry
Total Page:16
File Type:pdf, Size:1020Kb
Reinventing the Wheel: An Experiment in Evolutionary Geometry Josh C. Bongard Hod Lipson Computational Synthesis Laboratory Computational Synthesis Laboratory Sibley School of Mechanical and Aerospace Sibley School of Mechanical and Aerospace Engineering Engineering Cornell University Cornell University Ithaca, NY 14850 USA Ithaca, NY 14850 USA [email protected] [email protected] ABSTRACT 1 1 0.8 In the domain of design, there are two ways of viewing the competi- 0.8 0.6 0.6 tiveness of evolved structures: they either improve in some manner 0.4 0.4 on previous solutions; they produce alternative designs that were 0.2 0.2 not previously considered; or they achieve both. In this paper we 0 0 show that the way in which designs are genetically encoded influ- −0.2 −0.2 ences which alternative structures are discovered, for problems in −0.4 −0.4 which a set of more than one optimal solution exists. The prob- −0.6 −0.6 lem considered is one of the most ancient known to humanity: de- −0.8 −0.8 sign a two-dimensional shape that, when rolled across flat ground, −1 −1 a −1 −0.5 0 0.5 1 b −1 −0.5 0 0.5 1 maintains a constant height. It was not until the late 19th century— 1 1 roughly 7000 years after the discovery of the wheel—that Franz 0.8 0.8 Reuleaux showed that a circle is not the only optimal solution. Here 0.6 0.6 we demonstrate that artificial evolution repeats this discovery in un- 0.4 0.4 der one hour. 0.2 0.2 0 0 Categories and Subject Descriptors −0.2 −0.2 −0.4 −0.4 J.2 [Computer Applications]: Physical Sciences and Engineering −0.6 −0.6 −0.8 −0.8 −1 −1 1. INTRODUCTION c −1 −0.5 0 0.5 1 d −1 −0.5 0 0.5 1 It is widely believed that the wheel—a circular object that allows much less friction during transport than dragging—was discovered Figure 1: a: The Reuleaux triangle. b-d: Reuleaux 5-, 7- and in ancient Mesopotamia in the 5th millennium BC. It is possible 9-polygons, respectively. that there was an independent discovery of the wheel in China in 2800 BC, but there is less historical evidence supporting this dis- covery. Despite the overwhelming utility of this structure, many through the wheel’s geometric center. However objects can also be major civilizations throughout history failed to discover it, includ- rolled over wheels or cylinders because circles also maintain a con- 1 ing those in Sub-saharan Africa, Australia and the Americas [11]. stant height: the height of a circle remains constant as it rolls. The The circle is an optimal shape for a wheel because a circle’s ge- circle is only one of an infinite set of optimal shapes that maintain ometric center maintains a constant height when it is rolled over a constant height during rolling. These shapes are known as curves flat ground. This is desirable for vehicles, in which the axle passes of constant width [5]. 1 The time at which it was realized that the circle is not the only Children’s toys from the Incan civilization suggest that that soci- ety was at least aware of wheel-like shapes, even if they were not known curve of constant width is not well known. However the used for utilitarian purposes. Reuleaux triangle, named after Franz Reuleaux (1829-1905), a Ger- man professor of engineering and machine design, is a non-circular curve of constant width. The Reuleaux triangle was first men- tioned in 1876 [9] (and reprinted in 1963 [10]), so taking this as Permission to make digital or hard copies of all or part of this work for an approximate date of the discovery of non-circular curves of con- personal or classroom use is granted without fee provided that copies are stant width, and the discovery of the first curve of constant width— not made or distributed for profit or commercial advantage and that copies the wheel—in the 5th millennium BC, it took humanity roughly bear this notice and the full citation on the first page. To copy otherwise, to 7000 years to discover that there is more than one curve of constant republish, to post on servers or to redistribute to lists, requires prior specific width. The Reuleaux triangle, along with three other non-circular permission and/or a fee. GECCO’05, June 25–29, 2005, Washington, DC, USA. curves of constant width, are shown in Figure 1. Pairs of Reuleaux Copyright 2005 ACM 1-59593-010-8/05/0006 ...$5.00. triangles connected together to serve as smooth rollers are shown in 1 28 55 81 108 134 161 188 214 241 267 294 a 321 347 374 400 a 4 3.5 3 2.5 0 2 b Figure 2: a: A pair of rollers constructed from Reuleaux tri- angles. b: Cart with Reuleaux triangles as wheels. Source: UNESCO exhibit “Experiencing Mathematics”. Photo: David W. Henderson. Figure 2a. Reuleaux polygons can also serve as wheels if their axle is also made to have the same profile with opposite, compensating motion. Figure 2b shows a cart with Reuleaux triangles as wheels and as axles [1]. In this paper we present three genetic algorithms that differ only in their genetic representation: all of them consistently design curves of constant width. We will show that several different curves are discovered, including the circle, but that the method of genetic en- b coding biases which solution is discovered, a well-documented pro- cess in evolutionary computation (eg. [2], [4]). In the next section Figure 3: a: A sample of solutions from an initial random pop- we describe the set of curves of constant width; in section 3 we de- ulation (thick line), with no bias toward symmetric or asym- scribe a methodology for, and results from the evolution of curves metric shapes. The rays indicate the 60 evolved radii; the poly- of constant width. In section 4 we provide some concluding re- gons indicate the resulting convex hulls. The circles indicate the marks. bounding circle, which is for visual comparison only; it does not influence fitness. Figures indicate the index of the solution within the population. b: The tracks left by the height of these 2. CURVES OF CONSTANT WIDTH shapes, when they are rolled along a flat surface from 0 to π. For closed convex planar bodies whose boundary is a smooth curve, there are exactly two parallel tangent lines to the boundary that direction. For physical shapes, this definition is simpler: at curve in any given direction. In a physical setting, these lines can any point of rotation, when the shape touches the ground, its width be considered to be flat ground, and a line parallel to the ground is taken as the distance from the ground to the shape’s maximum that the body intersects at some point when it rolls through 2π ra- height. dians. The width of the curve in a given direction is taken to be According to this definition, the circle qualifies as a curve of con- the perpendicular distance between the tangents perpendicular to stant height. However there are also an infinite set of other shapes 1 15 28 41 55 68 81 94 108 121 134 147 Figure 4: The errors of each shape from a single evolutionary 161 174 187 200 run. which satisfy these conditions. Rather than giving a formal def- inition here, we instead provide a constructive definition. Given some n selected from the infinite set of odd integers {3, 5, 7,...}, a construct an n-polygon with equal length sides. For each point of 4 A B the polygon , draw an arc connecting the two opposing points 3.5 and C on the far side of the polygon, where the radius of the arc is |A − C| = |A − B|. Once all n arcs have been drawn, the shape 3 composed of these connecting arcs is a curve of constant width. 2.5 The curve of constant width with n =3is the Reuleaux triangle 0 2 (Figure 1a); the curve with n = ∞ is the circle. The British 20p and 50p coins are curves of constant width with n =7, which—for a vending machine—makes them indistinguishable from a round coin. The members of the set of curves of constant width have several distinguishing features. For example the circle has maximum area, while the Blaschke-Lebesgue theorem proves that the Reuleaux tri- angle has the least area [6]. Also, the Reuleaux triangle can be used to dig a square hole [5]; as n increases, the shape of the hole pro- duced by rotating the corresponding curve of constant width has increasingly rounded corners until when n = ∞, the hole dug by rotating a circle is a circle. 3. EVOLVING CURVES Evolving shapes is a popular application of evolutionary com- putation. Rechenberg, in one of the first evolutionary computation b experiments ever carried out, evolved the shape of a curved pipe in order to maximize fluid flow from a vertical input nozzle to a hori- Figure 5: a: The best solutions from a sampling of generations zontal output nozzle: surprisingly, he found that a pipe describing a in a single run. Figures indicate the generation. The best solu- perfect quarter-circle arc is not the optimal solution to this problem tion from the first initial population is shown top-left; the best [8]. Other methods for evolving shapes can be found in [3].