兰顿蚂蚁

图:Krwawobrody · Public domain · Wikimedia Commons

发现与发明 › 20 世纪

兰顿蚂蚁1986

Langton's ant

two-dimensional Turing machine with emergent behavior

兰顿蚂蚁 是细胞自动机的例子。它由克里斯托弗·兰顿在1986年提出,它由黑白格子和一只“蚂蚁”构成,是一个二维图灵机。兰顿蚂蚁拥有非常简单的逻辑和复杂的表现。在2000年兰顿蚂蚁的图灵完备性被证明。兰顿蚂蚁的想法后来被推广,比如使用多种颜色。

摘自维基百科「兰顿蚂蚁」,CC BY-SA 4.0

类型
细胞自动机
发现 / 发明时间
1986 年
发现者 / 提出者
克里斯托弗·兰顿
命名来源
克里斯托弗·兰顿、ant
学科
计算机科学

相关科学家

百科正文

规则

在平面上的正方形格被填上黑色或白色。在其中一格正方形有一只“蚂蚁”。它的头部朝向上下左右其中一方。

若蚂蚁在白格,右转90度,将该格改为黑格,向前移一步;

若蚂蚁在黑格,左转90度,将该格改为白格,向前移一步。

行为模式

若从全白的背景开始,在一开始的数百步,蚂蚁留下的路线会出现许多对称或重复的形状,然后会出现类似混沌的假随机,至约一万步后会出现以104步为周期无限重复的“高速公路”朝固定方向移动。在目前试过的所有起始状态,蚂蚁的路线最终都会变成高速公路,但尚无法证明这是无论任何起始状态都会导致的必然结果。

推广

除了两种颜色分别让蚂蚁左转或右转,也可以定义更多种颜色进行循环。通用的表示方法是用L和R依序表示各颜色是左转还是右转,兰顿蚂蚁的规则即可表示为RL。有些规则会产生对称或重复的形状。另外除了用方格,也可以用其他如六角形的格子。

以上内容摘自维基百科「兰顿蚂蚁」,按 CC BY-SA 4.0 使用,去掉了参考文献、外部链接等尾部小节,公式改写成了纯文本。全文、配图和出处见原文。

英文维基百科补充中文条目比较短,下面是英文条目「Langton's ant」的原文

Langton's ant is a two-dimensional 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 idea has been generalized in several different ways, such as turmites which add more colors and more states.

Rules

Squares on a plane are colored variously either black or white. One square is arbitrarily identified as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The "ant" moves according to the rules below:

At a white square, turn 90° clockwise, flip the color of the square, move forward one unit

At a black square, turn 90° counter-clockwise, flip the color of the square, move forward one unit

Langton's ant can also be described as a cellular automaton, where the grid is colored black or white and the "ant" square has one of eight different colors assigned to encode the combination of black/white state and the current direction of motion of the ant.

Modes of behavior

These simple rules lead to complex behavior. Three distinct modes of behavior are apparent, when starting on a completely white grid.

Simplicity. During the first few hundred moves it creates very simple patterns which are often symmetric.

Chaos. After a few hundred moves, a large, irregular pattern of black and white squares appears. The ant traces a pseudo-random path until 9,977 steps.

Emergent order. Finally the ant starts building a recurrent "highway" pattern of 104 steps that repeats indefinitely.

All finite initial configurations tested eventually converge to the same repetitive pattern, suggesting that the "highway" is an attractor of Langton's ant, but no one has been able to prove that this is true for all such initial configurations. It is only known that the ant's trajectory is always unbounded regardless of the initial configuration – this result was incorrectly attributed and is known as the Cohen-Kong theorem.

Computational properties

In 2000, Gajardo et al. showed a construction that calculates any boolean circuit using the trajectory of a single instance of Langton's ant.

Extension to multiple colors

Greg Turk and Jim Propp considered a simple extension to Langton's ant where instead of just two colors, more colors are used. The colors are modified in a cyclic fashion. A simple naming scheme is used: for each of the successive colors, a letter "L" or "R" is used to indicate whether a left or right turn should be taken. Langton's ant has the name "RL" in this naming scheme.

Some of these extended Langton's ants produce patterns that become symmetric over and over again. One of the simplest examples is the ant "RLLR". One sufficient condition for this to happen is that the ant's name, seen as a cyclic list, consists of consecutive pairs of identical letters "LL" or "RR". The proof involves Truchet tiles.

The hexagonal grid permits up to six different rotations, which are notated here as N (no change), R1 (60° clockwise), R2 (120° clockwise), U (180°), L2 (120° counter-clockwise), L1 (60° counter-clockwise).

Extension to multiple states

A further extension of Langton's ants is to consider multiple states of the Turing machine – as if the ant itself has a color that can change. These ants are called turmites, a contraction of "Turing machine termites". Common behaviours include the production of highways, chaotic growth and spiral growth.

Extension to multiple ants

Multiple Langton's ants can co-exist on the 2D plane, and their interactions give rise to complex, higher-order automata that collectively build a wide variety of organized structures.

There are different ways of modelling their interaction and the results of the simulation may strongly depend on the choices made.

Multiple turmites can co-exist on the 2D plane as long as there is a rule that defines what happens when they meet. Ed Pegg, Jr. considered ants that can turn for example both left and right, splitting in two and annihilating each other when they meet.

以上内容摘自英文维基百科「Langton's ant」,按 CC BY-SA 4.0 使用,去掉了参考文献、外部链接等尾部小节,公式改写成了纯文本。全文、配图和出处见原文。

同一学科、时间相近的发现与发明