Play with cellular automata元胞自动机互动集

Pick a world. Change something. See what happens.挑一个世界,动一下手,看看会发生什么。

选一方,在棋盘上点一下。给它一点地盘,看看它能守多久。

它们怎么决定下一步?

✊ 胜过 ✌️ · ✌️ 胜过 ✋ · ✋ 胜过 ✊

每一步,每格从上下左右随机挑一个邻居猜拳。输了就变成对方的手势;赢了或平局就不变。全部格子看同一张旧棋盘,再同时更新。边缘不相连。随机的是对手,不是输赢;同局重来会重复相同的选择。

暂停后,把鼠标移到一格上,或用方向键选一格,看看它为什么会变。

键盘:方向键移动光标,空格或回车点画。选不同画笔可以让已经消失的一方重新加入;系统不会自动补人。

模型类型:循环元胞自动机。这里采用二维四邻域版本,不是对论文中一维结果的复现。

No crash. No roadworks. Just one car braking, then the cars behind it stopping in turn. Tap a car and try it.

没有事故,也没有施工。只是前车刹了一下,后面的车就接连停下。你也可以点一辆试试。

This ring road is a row of cells. Each cell either has a car in it or it doesn't.这一圈路就是一排格子:每格要么有车,要么没车。

The rule & the reference看看规则与出处

A moving car advances if the next cell is empty. A stopped car waits for two clear cells before starting. The brief brake starts a chain of stops. This is a simplified illustration, not a reconstruction of the measured speeds. Real ring-road experiment: Sugiyama et al., 2008.行驶中的车,前方有空位就走;停下的车要等前方连续空出两格才起步。一脚刹车,会带出后面的接连停顿。这是简化演示,不复现真实车速。环路实测:Sugiyama等,2008。

Different worlds, one shared idea: cells change step by step according to what is nearby. These are cellular automata.不同的世界,有一个共同点:每格都根据附近的情况,一步一步改变自己。这就是元胞自动机。

A grain falls if there is space below. If blocked, it tries diagonally. Pour some sand, draw a wall, then pull the shelf out.

脚下空着,沙就往下落;挡住了,就找斜下方的空位。撒一点沙,画一道挡板,再抽掉横板试试。

Each cell holds sand, a wall, or empty space.每格放一粒沙、一块挡板,或者空着。

Look at the rule看看规则

Cells hold air, sand, or a fixed wall. Each beat reads the old board; a grain proposes a downward or diagonal move into empty space. If two grains want the same spot, alternating left/right priority selects one. Every move preserves the number of grains. The inlet and your brush add material; the eraser removes it. This is a discrete teaching model, not a calibrated model of real sand. Keyboard: arrow keys move the cursor; Space or Enter uses the selected brush.

格子可以是空位、沙粒或固定挡板。每拍先看旧格局,再向下或斜下方的空位提出移动;多粒争同一空位时,按交替的左右优先顺序只放行一粒。移动不增减沙粒,入口和画笔可以添加,橡皮可以移除。这是离散的教学模型,不是经过校准的真实沙粒物理。键盘可用方向键移动光标,空格或回车使用选中的画笔。

One more: patterns from a single row再玩一个:一行格子长出的花纹

Even a single row is enough. Each line below is its next generation. Keep the same starting cell and switch the rule.

甚至一行格子就够了。下面每一行,都是它的下一代。起点不变,换一条规则看看。

Look at the rule看看规则

Each cell reads itself and its left and right neighbours. Their eight possible combinations each specify a dark or lit next state. Rule 90 and rule 30 are two different tables. Both begin with one lit cell; there are no dice in either update. Rows are saved history, not extra spatial dimensions. Outside the displayed row is dark. The demonstration replays after 80 generations.

每格只看自己和左右两个邻居,八种组合各自对应下一代的亮或暗。规则90与规则30就是两张不同的对应表。两者都从一个亮格开始,更新时不掷骰子。上下各行保存的是过去,不是额外的空间维度;画面左右之外视为暗格。演示到80代后重播。

Privacy