Paterson's worms

Last updated

Paterson's worms are a family of cellular automata devised in 1971 by Mike Paterson and John Horton Conway to model the behaviour and feeding patterns of certain prehistoric worms. In the model, a worm moves between points on a triangular grid along line segments, representing food. Its turnings are determined by the configuration of eaten and uneaten line segments adjacent to the point at which the worm currently is. Despite being governed by simple rules the behaviour of the worms can be extremely complex, and the ultimate fate of one variant is still unknown.

Contents

The worms were studied in the early 1970s by Paterson, Conway and Michael Beeler, described by Beeler in June 1973, [1] and presented in November 1973 in Martin Gardner's "Mathematical Games" column in Scientific American . [2]

Electronic Arts' 1983 game Worms? is an interactive implementation of Paterson's worms, where each time a worm has to turn in a way that it lacks a rule for, it stops and lets the user choose a direction, which sets that rule for that worm.

History

Fossilized worm tracks. Helminthopsis01.JPG
Fossilized worm tracks.

Paterson's worms are an attempt to simulate the behaviour of prehistoric worms. These creatures fed upon sediment at the bottom of ponds and avoided retracing paths they had already travelled because food would be scarce there but, because food occurred in patches, it was in the worm's interest to stay near previous trails. Different species of worm had different innate rules regarding how close to travelled paths to stay, when to turn, and how sharp a turn to make. [1] In 1969 Raup and Seilacher created computer simulations of the fossilized worm trails, and these simulations inspired Paterson and Conway to develop a simple set of rules to study idealized worms on regular grids. [3]

Conway's original model was a worm on an orthogonal grid but this produced only three different species of worm, all with rather uninteresting behaviour. Paterson considered worms on a triangular grid. [1] Paterson's worms were described by Beeler in a Massachusetts Institute of Technology AI Memo (#) and were presented in November 1973 in Martin Gardner's "Mathematical Games" column in Scientific American , [2] and later reprinted in Gardner 1986. [4] These simulations differed in approach from other cellular automata developed around the same time, which focused on cells and the relationships between them. [5] Simple computer models such as these are too abstract to accurately describe the behaviour of the real creatures, but they do demonstrate that even very simple rules can give rise to patterns resembling their tracks. [6]

Rules

The worm starts at some point of an infinite triangular grid. It starts moving along one of the six gridlines that meet at each point [6] and, once it has travelled one unit of distance, it arrives at a new point. The worm then decides, based on the distribution of traversed and untraversed gridlines, what direction it will take. The directions are relative to the worm's point of view. If the worm has not encountered this exact distribution before it may leave along any untraversed gridline. From then on, if it encounters that distribution again, it must move in the same way. If there are no untraversed gridlines available, the worm dies and the simulation ends. [1]

Discussion

There are many different types of worm depending on which direction they turn when encountering a new type of intersection. The different varieties of worm can be classified systematically by assigning every direction a number and listing the choice made every time a new type of intersection is encountered. [7]

The six directions are numbered as follows:

PatersonWormDirections.png

So direction 0 indicates the worm continues to travel straight ahead, direction 1 indicates the worm will make a right turn of 60° and similarly for the other directions. The worm cannot travel in direction 3 because that is the gridline it has just traversed. Thus a worm with rule {1,0,5,1} decides to travel in direction 1 the first time it has to make a choice, in direction 0 the next time it has to make a choice and so on. If there is only one available gridline, the worm has no choice but to take it and this is usually not explicitly listed.

Paterson's worm with rule { 2, 0, 0 } PatersonWorm200.gif
Paterson's worm with rule { 2, 0, 0 }

A worm whose ruleset begins with 0 continues in a straight line forever. This is a trivial case, so it is usually stipulated that the worm must turn when it encounters a point with only uneaten gridlines. Furthermore, to avoid mirror-image symmetrical duplicates, the worm's first turn must be a right hand turn. [1] A worm dies if it returns to its origin a third time, because there are then no untraversed edges available. Only the origin can be lethal to the worm. [8]

There are 1,296 possible combinations of worm rules. [4] This can be seen by the following argument:

  1. If the worm encounters a node with no eaten segments, other than the one it has just eaten, it can either make a sharp turn or a gentle one. This is the situation shown in the figure above. Since the initial choice of left or right produce combinations that simply mirrors of each other, they are not effectively different.
  2. If it encounters a node with one eaten segment, it can leave along any of the remaining four. Only the worm's first return to the origin has this character.
  3. For two eaten segments, the location of the eaten segments is important. The only type of two-segment intersections that can exist is that produced by the first rule, for which there are four distinct approach directions, each of which offers a choice of three departure directions. This allows for 81 different alternatives in choosing rules.
  4. If the worm returns to the origin, it will encounter three eaten segments and must choose between the two remaining uneaten ones regardless of their distribution.
  5. For four eaten segments, there is only one uneaten segment left and the worm must take it.

There are therefore 2×4×81×2x1=1,296 different combinations of rules. Many of these are mirror-image duplicates of others, and others die before having to make all the choices in their ruleset, leaving 411 distinct species (412 if the infinite straight-line worm is included). [8] 336 of these species eventually die. 73 patterns exhibit infinite behaviour, that is, they settle into a repeating pattern that does not return to the origin. A further two are strongly believed to be infinite and one remains unsolved. Eleven of the rules exhibit complicated behaviour. They do not die even after many billions of iterations, nor do they adopt an obviously infinite pattern. Their ultimate fate was unknown until 2003 when Benjamin Chaffin developed new methods of solving them. After many hours of computer time, nine of the eleven rules were solved, leaving the worms with rules {1,0,4,2,0,2,0} and {1,0,4,2,0,1,5}. [7] The first of these was solved by Tomas Rokicki, who determined that it halts after 57 trillion (5.7×1013) timesteps, leaving only {1,0,4,2,0,1,5} unsolved. According to Rokicki, the worm is still active after 5.2×1019 timesteps. He used an algorithm based on Bill Gosper's Hashlife to simulate the worms at extraordinary speeds. [8] This behaviour is considerably more complex than the related rectangular grid worm, which has a longest path of only 16 segments. [6]

It is possible for two different species of worm to produce the same path, though they do not necessarily traverse it in the same order. [1] The most common path is also the shortest: the seven point MOT test/fallout shelter symbol. [4] One example of this path is shown in the animated figure above. In total there are 299 different paths, and 209 of these are produced by just one species. [1]

See also

Related Research Articles

<span class="mw-page-title-main">Flood fill</span> Algorithm in computer graphics to add color or texture

Flood fill, also called seed fill, is a flooding algorithm that determines and alters the area connected to a given node in a multi-dimensional array with some matching attribute. It is used in the "bucket" fill tool of paint programs to fill connected, similarly-colored areas with a different color, and in games such as Go and Minesweeper for determining which pieces are cleared. A variant called boundary fill uses the same algorithms but is defined as the area connected to a given node that does not have a particular attribute.

<span class="mw-page-title-main">Pentomino</span> Geometric shape formed from five squares

Derived from the Greek word for '5', and "domino", a pentomino is a polyomino of order 5, that is, a polygon in the plane made of 5 equal-sized squares connected edge-to-edge. When rotations and reflections are not considered to be distinct shapes, there are 12 different free pentominoes. When reflections are considered distinct, there are 18 one-sided pentominoes. When rotations are also considered distinct, there are 63 fixed pentominoes.

<span class="mw-page-title-main">Conway's Game of Life</span> Two-dimensional cellular automaton devised by J. H. Conway in 1970

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.

<span class="mw-page-title-main">Cellular automaton</span> Discrete model studied in computer science

A cellular automaton is a discrete model of computation studied in automata theory. Cellular automata are also called cellular spaces, tessellation automata, homogeneous structures, cellular structures, tessellation structures, and iterative arrays. Cellular automata have found application in various areas, including physics, theoretical biology and microstructure modeling.

Langton's ant is a two-dimensional universal Turing machine with a very simple set of rules but complex emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells. The universality of Langton's ant was proven in 2000. The idea has been generalized in several different ways, such as turmites which add more colors and more states.

<span class="mw-page-title-main">Racetrack (game)</span> Paper-and-pencil game

Racetrack is a paper and pencil game that simulates a car race, played by two or more players. The game is played on a squared sheet of paper, with a pencil line tracking each car's movement. The rules for moving represent a car with a certain inertia and physical limits on traction, and the resulting line is reminiscent of how real racing cars move. The game requires players to slow down before bends in the track, and requires some foresight and planning for successful play. The game is popular as an educational tool teaching vectors.

<span class="mw-page-title-main">Tessellation</span> Tiling of a plane in mathematics

A tessellation or tiling is the covering of a surface, often a plane, using one or more geometric shapes, called tiles, with no overlaps and no gaps. In mathematics, tessellation can be generalized to higher dimensions and a variety of geometries.

<span class="mw-page-title-main">Frieze group</span> Type of symmetry group

In mathematics, a frieze or frieze pattern is a two-dimensional design that repeats in one direction. Such patterns occur frequently in architecture and decorative art. Frieze patterns can be classified into seven types according to their symmetries. The set of symmetries of a frieze pattern is called a frieze group.

<span class="mw-page-title-main">Translational symmetry</span> Invariance of operations under geometric translation

In geometry, to translate a geometric figure is to move it from one place to another without rotating it. A translation "slides" a thing by a: Ta(p) = p + a.

<span class="mw-page-title-main">Generative science</span> Study of how complex behaviour can be generated by deterministic and finite rules and parameters

Generative science is an area of research that explores the natural world and its complex behaviours. It explores ways "to generate apparently unanticipated and infinite behaviour based on deterministic and finite rules and parameters reproducing or resembling the behavior of natural and social phenomena". By modelling such interactions, it can suggest that properties exist in the system that had not been noticed in the real world situation. An example field of study is how unintended consequences arise in social processes.

<span class="mw-page-title-main">Garden of Eden (cellular automaton)</span> Pattern that has no predecessors

In a cellular automaton, a Garden of Eden is a configuration that has no predecessor. It can be the initial configuration of the automaton but cannot arise in any other way. John Tukey named these configurations after the Garden of Eden in Abrahamic religions, which was created out of nowhere.

In computer science, a turmite is a Turing machine which has an orientation in addition to a current state and a "tape" that consists of an infinite two-dimensional grid of cells. The terms ant and vant are also used. Langton's ant is a well-known type of turmite defined on the cells of a square grid. Paterson's worms are a type of turmite defined on the edges of an isometric grid.

<span class="mw-page-title-main">Slitherlink</span>

Slitherlink is a logic puzzle developed by publisher Nikoli.

<span class="mw-page-title-main">Grid cell</span>

A grid cell is a type of neuron within the entorhinal cortex that fires at regular intervals as an animal navigates an open area, allowing it to understand its position in space by storing and integrating information about location, distance, and direction. Grid cells have been found in many animals, including rats, mice, bats, monkeys, and humans.

<span class="mw-page-title-main">Motion camouflage</span> Camouflage by choosing path to avoid seeming to move against background

Motion camouflage is camouflage which provides a degree of concealment for a moving object, given that motion makes objects easy to detect however well their coloration matches their background or breaks up their outlines. The principal form of motion camouflage, and the type generally meant by the term, involves an attacker's mimicking the optic flow of the background as seen by its target. This enables the attacker to approach the target while appearing to remain stationary from the target's perspective, unlike in classical pursuit. The attacker chooses its flight path so as to remain on the line between the target and some landmark point. The target therefore does not see the attacker move from the landmark point. The only visible evidence that the attacker is moving is its looming, the change in size as the attacker approaches. Motion is also used in a variety of other camouflage strategies, including swaying to mimic plant movements in the wind or ocean currents.

<i>Worms?</i> 1983 video game

Worms? is a software toy written by David Maynard for the Atari 8-bit family and ported to the Commodore 64. Published by Electronic Arts in 1983, it was one of initial batch of releases from the company. Worms? is an interactive version of Paterson's Worms.

<span class="mw-page-title-main">Rule 184</span> Elementary cellular automaton

Rule 184 is a one-dimensional binary cellular automaton rule, notable for solving the majority problem as well as for its ability to simultaneously describe several, seemingly quite different, particle systems:

Dablo is a family of two-player strategy board games of the Sámi people. Different variants of the game have been played in different parts of Sápmi.

<span class="mw-page-title-main">Penrose tiling</span> Non-periodic tiling of the plane

A Penrose tiling is an example of an aperiodic tiling. Here, a tiling is a covering of the plane by non-overlapping polygons or other shapes, and a tiling is aperiodic if it does not contain arbitrarily large periodic regions or patches. However, despite their lack of translational symmetry, Penrose tilings may have both reflection symmetry and fivefold rotational symmetry. Penrose tilings are named after mathematician and physicist Roger Penrose, who investigated them in the 1970s.

<span class="mw-page-title-main">Critters (cellular automaton)</span>

Critters is a reversible block cellular automaton with similar dynamics to Conway's Game of Life, first described by Tommaso Toffoli and Norman Margolus in 1987.

References

  1. 1 2 3 4 5 6 7 Beeler, Michael (June 1973). "Paterson's Worm". Artificial Intelligence Memo. No. 290. Massachusetts Institute of Technology. hdl: 1721.1/6210 .
  2. 1 2 Gardner, Martin (November 1973). "Mathematical Games: Fantastic patterns traced by programmed 'worms'". Scientific American . 229 (5): 116–123. doi:10.1038/scientificamerican1173-116. Closed Access logo transparent.svg
  3. "Paterson's Worms". WolframMathworld. Retrieved 2008-08-15.
  4. 1 2 3 Gardner, Martin (1986), Knotted doughnuts and other mathematical entertainments , W. H. Freeman, Bibcode:1986kdom.book.....G, ISBN   978-0-7167-1799-7, MR   0857289
  5. Parikka, Jussi (2007). Digital Contagions: a Media Archaeology of Computer Viruses. New York: Peter Lang Publishing. p. 234. ISBN   978-1-4331-0093-2.
  6. 1 2 3 Hayes, Brian (September–October 2003). "In Search of the Optimal Scumsucking Bottomfeeder". American Scientist . 95 (5): 392–396. doi:10.1511/2003.5.392. Open Access logo PLoS transparent.svg
  7. 1 2 Pegg Jr., Ed (October 27, 2003). "Math Games: Paterson's Worms Revisited". MAA Online. Archived from the original on 2004-03-23. Retrieved 2008-08-15.
  8. 1 2 3 Chaffin, Benjamin. "Paterson's Worms". Archived from the original on June 7, 2011.