中文English

One rule · three lines · your hands一条规则 · 三行字 · 你来动手

How a single cell
becomes a machine
一个格子,
怎样变成一台机器

There are no parts in Conway's Game of Life. Nobody put gliders, switches or memory into it — people found them, hidden in a three-line rule. On this page you find them too: first you collect, then you collide, then you build.

康威生命游戏里没有零件。没有人往里面放过滑翔机、开关或者内存——它们都是被人从这三行规则里找出来的。这一页,你也去找一次:先捡,再撞,最后造。

Begin开始
computed · B3/S23实算 · B3/S23

Cellular automata are a family: a row or a sheet of cells, each looking only at its neighbours, all changing together by one shared rule. Conway's Game of Life is the family's most famous member. Its answer is: a square grid, two states — alive and dead — eight neighbours, and the three lines below.

元胞自动机是一个家族:一排或一片格子,每个格子只看身边的邻居,所有格子按同一条规则一起变。康威生命游戏是这个家族里最有名的一员——它的答案是:方格,活和死两种状态,周围八个邻居,以及下面这三行字。

0序

Three lines三行字

The rule is printed beside the board. Don't memorise it — point at cells and watch them work it out.

规则就写在棋盘旁边。别背它——指着棋盘上的格子,看它自己怎么算。

computed · B3/S23实算 · B3/S23
gen 第0代
stays留下dies将死born将出生

Why 2 and 3?为什么偏偏是2和3?

Martin Gardner introduced the game in his Mathematical Games column in Scientific American in October 1970, and passed on what Conway wanted from a rule: no starting pattern should obviously grow without limit; some patterns should look as though they do; and simple patterns should churn for a long time before dying out, settling or oscillating. B3/S23 is the set of numbers he kept after trying many others.

1970年10月,马丁·加德纳在《科学美国人》的数学游戏专栏里第一次介绍了这个游戏。他转述了康威挑规则时的要求:不能有哪个开局一眼就能证明会无限长大;又得有开局看起来会无限长大;简单的开局应该折腾很久,最后才死光、停住或者来回振荡。B3/S23是他试过许多组数字之后留下来的那一组。

“B3/S23” is shorthand for the rule: Born with 3, Survives with 2 or 3.

「B3/S23」是这条规则的简写:出生(Born)要3,存活(Survive)要2或3。

1一

Fork分岔

Now you know the rule. Knowing the rule is not the same as knowing what happens next.

规则你已经会了。可是会了规则,不等于知道接下来会发生什么。

A acorn · seven cells橡果 · 七个格子 7 live活格
B 8 live活格
computed · same rule实算 · 同一规则
gen 第0代cells where B differs from A: B和A不一样的位置 1

Who is the acorn?这颗「橡果」是谁

Charles Corderman found this seven-cell pattern in 1971. Seven cells that take over five thousand generations to settle: small patterns with long lives like this are called methuselahs, after the longest-lived man in the Bible.

1971年,查尔斯·科德曼找到了这个七格的图案。七个格子,要折腾五千多代才停下来——这种「个头小、寿命长」的图案,爱好者叫它玛土撒拉,取自《圣经》里最长寿的人。

Dragging the timeline only leafs through history that has already been computed. Life cannot be run backwards uniquely: many different previous generations can lead to the same board.

拖动时间条只是在翻看已经算好的历史。生命游戏没法唯一地倒着算:同一个局面,可以由许多不同的上一代走到。

2二

Collect捡

However wild the soup, it always settles. And what it leaves behind is not grey ash but separate things, things with names.

再乱的一锅,最后都会停下来。停下来的时候剩下的不是一片灰,而是一个个叫得出名字的东西。

computed · B3/S23实算 · B3/S23
gen 第0代

How does it know what you caught?怎么知道它是什么

The clump you click is lifted out and run again on an empty board for up to 30 generations. If it comes back to its own shape in the same place, it's a still life (back after one generation) or an oscillator (back after several). If it comes back to its shape somewhere else, it's a spaceship. The name is looked up afterwards — anything missing from the list still gets its kind.

你点中的那一团,会被单独拎出来、在空棋盘上再跑最多30代。回到原样、位置没变:一代就回来的是静物,几代才回来的是振荡器;回到原样但挪了位置的,是飞船。名字是之后才查表加上的——表里没有的,照样能认出是哪一类。

The soup is the one enthusiasts use for their census: a 16 × 16 square, every cell alive with even odds. A project called Catagolue has had many computers burn an enormous number of these soups and record everything left behind. The most common objects are the ones you're likely to catch first.

这把汤的配方是爱好者普查用的标准:16×16的方块里,每格一半机会是活的。有一个叫Catagolue的项目,让许多台电脑烧了数量巨大的这种汤,把剩下的每一样东西都记下来。最常见的,正是你最先捡到的那几样。

3三

Collide碰撞

Things that travel sooner or later run into something. What's left afterwards depends on just two things: which lane each one is in, and what pose each is in when they arrive.

会走的东西,迟早会撞上别的东西。撞完剩下什么,只取决于两件事:它们走在哪条车道上,到达时各自是什么姿态。

computed · B3/S23实算 · B3/S23
gen 第0代
ABpath so far走过的路

Notebook实验记录

every lane × phase of a right-angle meeting · tried 直角相撞的全部车道×相位 · 试过 0 / 48
still life静物oscillator振荡器spaceship out有飞船nothing left什么都没剩missed没碰上still churning还没停
Open this collision in the lab ↗在实验台里打开这一次碰撞 ↗
This is called glider synthesis这叫「滑翔机合成」

Building something by crashing gliders together is called glider synthesis. Johnston and Greene's Conway's Game of Life: Mathematics and Construction gives it a whole chapter: first the collisions of two gliders laid out as a table, then step by step, with three, four and more, ever more complicated things.

用滑翔机撞出想要的东西,爱好者叫它滑翔机合成。Johnston和Greene的《Conway's Game of Life: Mathematics and Construction》用整整一章讲它:先把两架滑翔机的各种撞法列成表,再一步步用三架、四架……去造越来越复杂的东西。

The table assumes both gliders can fly in from far away without hitting anything on the way. With two gliders that's always true; with many, it becomes the real puzzle.

这张表有个前提:两架滑翔机必须能从很远的地方各自飞来,路上不撞到别的东西。两架的时候这总是成立的;架数一多,这就成了真正的难题。

4四

Signal信号

A glider going past can stand for “yes”; a glider that should have come and didn't is “no”. A string of yeses and nos is a string of 1s and 0s. To make them compute something, you already hold every part you need.

一架滑翔机路过,可以当作「有」;该来的时候没来,就是「无」。一串有和无,就是一串1和0。要让它们算点什么,你手里已经有全部零件了。

computed · B3/S23实算 · B3/S23
gen 第0代

What is the lamp, and why warm up?灯是什么,开机为什么要预热

The lamp isn't a pattern; it's a detector: it lights while a glider is passing through it. The circuit itself is nothing but guns, eaters and streams.

灯不是一个图案,是一块探测区:有滑翔机正从里面经过,它就亮。电路本身只有枪、吞噬者和流。

Right after switching on, the streams haven't filled the board yet. With A off and B on, the power stream doesn't reach the second crossing until generation 389; until then B's gliders slip through one after another and the lamp is lit for over a hundred generations. After that it is dark for good. So the lamp is read only after generation 450. Real Life circuits have to budget for this start-up time too.

刚开机时,各路流还没铺满。A断、B合的时候,电源流要到第389代才赶到第二个路口;在那之前,B的滑翔机一架接一架地漏过去,灯亮了一百多代。之后它就永远是暗的。所以灯只在450代之后读。真实的生命游戏电路,也都要算好这段开机时间。

Every position here was found by a search program and then checked one by one: where the second gun must sit for every pair of gliders to cancel cleanly, and which line an eater must sit on to eat cleanly. One cell off and the machine is a different thing.

这些位置都是用程序搜出来、再逐一验证过的:第二把枪放在哪儿两路才能每一对都对消干净;吞噬者压在哪条线上才吃得干净。偏一格,整台机器就是另一回事。

5五

Remember记住

So far everything has been moving: guns firing, streams flowing, lamps flicking on and off. A computer still needs one more thing — something that stays put after the collisions are over.

到现在为止,所有东西都在动:枪在射,流在走,灯一亮一灭。可一台计算机还缺一样东西——碰撞结束以后,还留在那儿的东西。

computed · B3/S23实算 · B3/S23
gen 第0代

This is a sliding block register这叫「滑动方块寄存器」

Chapter 9 of Conway's Game of Life: Mathematics and Construction builds on exactly this idea: the block slides along the gliders' own line of travel, so however far it goes, the same lanes still hit it. How far the block sits from the launcher is the number it stores.

《Conway's Game of Life: Mathematics and Construction》第9章用的就是这个思路:方块沿滑翔机的来路滑动,所以不管它走多远,同一组车道总打得中它。方块离发射台多远,就是存着的那个数。

The four-glider push and pull here are combinations we searched for ourselves, not the book's most economical recipes. We tried every pair of gliders over lanes −8 to 8, gaps of 0 to 40 cells and all four relative phases: two gliders can pull a block back along its diagonal, but none can push it out. So a push goes in two legs: two cells right, then two cells down.

这一版的推和拉各用四架,是我们自己搜出来的组合,不是书里最省的配方。我们把两架滑翔机的所有车道(−8到8)、间隔(0到40格)和四种相对相位都试了一遍:两架能把方块沿斜线拉回来,却没有一种能把它推出去。所以推要分两段走:先往右两格,再往下两格。

With a register that remembers a number, with AND and NOT, and with a way to choose the next step depending on a condition, you have enough for a computer. In 1982 Conway, Berlekamp and Guy argued as much in Winning Ways; in 2000 Paul Rendell actually built a Turing machine inside the Game of Life.

有了能记住数的寄存器,有了「与」和「非」,再加上「按条件选下一步」,就够搭一台计算机。1982年,康威和伯利坎普、盖伊在《Winning Ways》里论证了这件事;2000年,Paul Rendell真的在生命游戏里搭出了一台图灵机。

∞尾

Inside a cell格子里面

One last thing, and this one you only have to look at. Drag the scale below to step back from a single cell to a whole machine.

最后看一样不用你动手的东西。拖动下面的尺子,从一个格子退到一整台机器。

real pattern · paused cross-section真实图案 · 暂停的结构剖面
It's called the OTCA metapixel它叫OTCA超级像素

Brice Due made it in 2006. Tile a plane with copies of this machine and each one plays a single cell of an outer board: every 35,328 generations they exchange a message with their neighbours and decide whether to be lit or dark next. The outer board can run the Game of Life itself.

Brice Due在2006年做出了它。把许多台这样的机器铺满一片,每台扮演外层棋盘上的一个格子:每35,328代,它们和身边的机器交换一次消息,决定自己下一刻亮还是暗。外层棋盘跑的,也可以是生命游戏本身。

What you see is its starting pattern, not running: the camera moves, the cells don't. Only one machine is loaded, so its neighbours aren't drawn — drawing them would be faking it.

这里展示的是它的初始图案,没有在跑:镜头在动,格子没动。我们只载入了一台,所以也不画它的邻居——画出来就是假的。

What you took from three lines你从三行字里拿到了什么

Nothing on this page — gliders, eaters, guns, cancelling streams, the register — was put into the Game of Life by anyone. People found it all in three lines, by burning soups, crashing things together and writing down what happened. You have just walked that road.

这一页的每样东西——滑翔机、吞噬者、枪、对消、寄存器——都不是有人放进生命游戏的,是人一次次撒汤、相撞、记录,从三行字里找出来的。你刚才把这条路走了一遍。