DAY 35 · PHASE E 大问题与应用

演化计算与 AI

把筛子搬进计算机之后,才看清演化少了什么、又靠什么撑住

2026-09-28 · BigCat
有一根上过太空的天线,形状像一段被反复揉过又拉开的铁丝。没有人画过它,也没有人能完整说清它为什么好用。

你见过的天线大多是规整的:对称、直角、看一眼就知道哪段负责什么。

那一根不是。它每个拐角的位置都看不出道理,像是被谁拧坏了。它确实在轨道上工作过。

把演化这台机器搬进计算机之后会发生两件事:它开始交一些你看不懂的答卷,而它在自然界里藏着的那一面反而露出来了。

// 01

筛出来的东西不欠你一个解释

那根天线是美国航天局一次叫「空间技术 5 号」的任务带上去的,2006 年 3 月发射,工作到 6 月底。做法很朴素:让计算机随机改形状,每改一版就算一下性能,留下算得好的那些,在这些上面接着改。两套算法各自跑出一个最好的,做成实物实测,都比承包商手工设计的那版强。

这台机器要的东西只有三样:一个能随便改的东西、改动能传给下一版、一个决定谁留下的判据。变异、遗传、差异繁殖——自然选择的逻辑那期说的三个条件,一条没多一条没少。介质从碳换成比特,机器照样转。

转起来之后你会发现它有个脾气。1996 年英国萨塞克斯大学的 Adrian Thompson 用同一套办法,在一块可以现场重新改内部接线的芯片上演化电路,要求很简单:听到一千赫兹的音就输出高电平,一万赫兹就输出低。他划出一百个逻辑单元的一角给它用。跑出来的电路只用了三十七个,没有时钟,大部分接成互相绕回去的环。最怪的是有五个单元根本没有通路连到输出,按电路图不该起作用,可你关掉任何一个,整个电路就不灵了。它在利用那块硅片自身的物理性质,而这些性质不在任何人的电路模型里。把同一份配置装到同型号的另一块芯片上,它就不可靠了。

筛子只认分数,不认理由。所以它交上来的东西可能用了你压根没打算让它用的资源,而且不会告诉你用了什么。生物身上到处是这个签名:你眼睛里那个盲点,是因为视神经从感光细胞的前面穿出去,在视网膜上戳了个洞。这不是更好的接法,是那条谱系最早凑出来的接法碰巧如此,之后每一步只能在它上面接着改——适应与约束那期说的路径依赖。章鱼的眼睛独立凑了另一次,神经从后面走,就没这个洞。

EN The antenna flew on NASA's Space Technology 5 mission — three copies, launched March 2006, operating in orbit until late June. The method was plain: perturb the shape at random, score each version's performance, keep the good ones, perturb those. Two different algorithms each produced a best design; both were fabricated and both out-measured the contractor's hand-built version. The machine needs only three things — something that can vary, variation that carries to the next version, and a rule deciding who stays. Variation, heredity, differential reproduction: exactly the three conditions behind natural selection, with the medium switched from carbon to bits. It also has a temperament. In 1996 Adrian Thompson at Sussex evolved a circuit on a chip whose internal wiring can be rewritten on the spot, asked only to hold its output high for a 1 kHz tone and low for 10 kHz. Given a corner of 100 logic cells, the winning circuit used 37, had no clock, and wired most of them into tangled feedback loops. Five cells had no path at all to the output, yet disabling any one of them broke it: the circuit was exploiting physical properties of that particular piece of silicon, properties absent from anyone's circuit model. Loaded onto another chip of the same type, it no longer worked reliably. Selection scores outcomes, not reasons, so what it hands you may draw on resources you never meant to offer, and it will not say which. Biology carries the same signature: the blind spot in your eye exists because the optic nerve exits in front of the photoreceptors, punching a hole through the retina — not a better wiring, just the first one that happened to work in that lineage, with every later step obliged to build on it. Octopus eyes were assembled independently, run the nerve behind, and have no such hole.

// 02

分数是谁定的,决定了这台机器能走多远

1994 年 Karl Sims 在计算机里养了一批由方块和关节拼成的东西,按「往前游得多快」给分。有几种解法很扫兴:模拟器算运动时把时间切成一小步一小步,这个切法有缺陷,于是有些生物学会了让身上一个小零件高频抖动,凭空多出一点动量。分数是真高的。

另一个任务是跳得高。最省事的解不是学会跳,而是长得很高然后倒下去。

这些都不是算法出错。它极其准确地做了你让它做的事:在所有能让那个数上升的路里找最便宜的那条。你想要的是「会走路」,你写下来的是「重心离地多高」,它给你的是后者。

这里藏着人造演化和自然演化最深的一道差别:算法里的分数是人写的,自然界没有人写分数。生物学里的「适应度」不是外面发下来的成绩,它是事后的记录——谁留下了更多后代。没有考卷,所以也没有作弊这件事。而且这个分数还会自己动:一种做法划不划算,取决于你周围大多数个体在怎么做(演化博弈那期的频率依赖);一方稍微改进就让另一方的分数掉下去(红皇后那期的军备竞赛)。

分数写死了会有什么后果,有一个很干净的对照。2011 年 Lehman 和 Stanley 摆了一个迷宫,出口在一条必须先往反方向绕的通道尽头。按「离出口的直线距离还剩多少」给分,四十次里零次走通:整群搜索全挤在离出口最近的那面墙后面,因为任何要先走远的一步都被判成退步。他们换掉分数,完全不看出口,只奖励「这个走法以前没出现过」——四十次里通了三十九次。

按「离出口还有多远」给分 墙 起点 ★ 出口 40 次里 0 次走通 只按「这个走法以前没出现过」给分 墙 起点 ★ 出口 40 次里 39 次走通
同一个迷宫,同一个算法,只换了给分方式。左边那种分数把「必须先变差几步」全判成退步,于是整群搜索稳定地卡在离目标最近的死路里。

这条线一直连到这个领域至今没解决的那个问题。1991 年 Tom Ray 写了个叫 Tierra 的小世界,里面跑着一些会自我复制的程序。他没写过任何「要出现寄生者」的规则,寄生者自己出现了:有些程序不再自带复制指令,改成借邻居的;接着出现了躲得开它们的宿主;再接着是专吃寄生者的更上一层。这是人造系统最像自然的一次。可这类系统跑久了都会停:多样性先冲上去,然后整群朝更简单更省的少数几个解收拢,不再出新东西。地球上的生物圈四十亿年没停过,至今没有人造系统做到这一点。差的是什么还没答案;有人怀疑差的就是「分数不由任何人写」本身。

EN In 1994 Karl Sims raised blocks-and-joints creatures in a computer, scored on forward swimming speed. Some winning solutions were deflating: the simulator computes motion in discrete time steps, that discretisation has a flaw, and creatures learned to twitch a small part rapidly and gain momentum out of nothing. Their scores were genuinely high. Asked to jump high, the cheapest solution was not to jump but to grow tall and topple over. None of that is the algorithm failing. It is doing exactly what it was told: finding the cheapest route to raising that number. You wanted walking; you wrote down centre-of-mass height; you got the latter. Here sits the deepest gap between artificial and natural evolution: in an algorithm a person writes the score, and in nature nobody does. Fitness is not a mark handed down from outside — it is the after-the-fact record of who left more descendants. There is no exam, so there is nothing to cheat. And the score moves: whether a tactic pays depends on what most others around you are doing (frequency dependence, from evolutionary game theory), and one side's improvement lowers the other's score (the Red Queen arms race). A clean demonstration of what a frozen score costs: in 2011 Lehman and Stanley set a maze whose exit sat at the end of a corridor you must first walk away from. Scored by remaining straight-line distance to the exit, search solved it 0 times out of 40, the whole population piling up behind the wall nearest the exit, because any step that walked away counted as regress. Replacing the score with novelty alone — reward whatever behaviour has not been seen before, ignore the exit entirely — solved it 39 times out of 40. That line runs straight into the field's unsolved problem. In 1991 Tom Ray wrote Tierra, a small world of self-replicating programs. He never wrote a rule calling for parasites; parasites appeared anyway, programs that dropped their own copy instructions and borrowed a neighbour's, followed by hosts that evaded them, followed by hyper-parasites feeding on the parasites. It is the closest an artificial system has come to nature. Yet such systems stall: diversity rises, then the population converges onto a few simpler, cheaper solutions and stops producing anything new. Earth's biosphere has not stalled in four billion years, and no artificial system has matched that. What is missing has no answer yet; some suspect it is precisely that nobody writes the score.

// 03

梯度下降知道往哪走,演化只知道谁还在

把你放在浓雾里的一个山坡上,要往高处去,能看见的只有脚边一圈。

第一种办法:用脚在四周试一圈,哪边是上坡就往那边迈一步,再试。今天训练 AI 模型用的就是这个办法,叫梯度下降——先把「输出错得多厉害」算成一个数,再算出每一个可调的旋钮往哪边转会让这个数变小一点,然后所有旋钮一起往那边挪一点点。关键在于它算得出方向。

第二种办法:从你站的地方派出一千个人,各往一个随机方向走一步,回来报个高度;你朝报得高的那些人挪一点,再派一千个。这不需要知道哪边是上坡,只需要能比高低。演化跑的是第二种——而且连那个「你」都没有:没人负责汇总,站得高的自己多留下后代,这就是汇总。

办法一:算得出哪边是上坡 一个就够,每一步都往上 办法二:只能比高低 这两步高了 低了 一次要一千个,绝大多数白走
两种办法都在爬同一个坡。差别不在谁聪明,在能不能拿到「哪边是上坡」这条信息——拿不到就只能用数量换。

第二种真的能用。2017 年有一组人把它拿去训练控制策略:一千四百四十台机器并行,十分钟之内让一个物理模拟里的三维人形学会走路;在一批老式电子游戏上训练一小时,成绩和当时主流的那类「反复试、按结果给奖励」的学习方法可比。它能并行到这个规模,是因为机器之间只需交换两样极小的东西:一个能让对方生成出相同随机数的小整数,和一个分数。代价论文写明了:要跑的回合数比对照方法多好几倍,省下的是墙上的时间,不是总算力。它真正占优的场合只有两类:分数算不出方向(结果是个整数、是「过/不过」),以及地形长得像「分数是谁定的,决定了这台机器能走多远」那节里那个迷宫。

生物这边缺的正好就是方向。没有任何机制能告诉一个种群哪边是上坡。它手上是另外三样东西:数量极大(你肠道里的细菌比地球上所有人加起来还多好几个数量级)、时间极长、后代从父母停下的地方接着开始——不归零。还有一条差别很少被提:机器上你可以存档、回滚、重跑同一段;演化没有存档,死了就是死了,路径依赖在这里是绝对的。

最后一件最容易搞反的事。「演化是一种优化算法」这句话是把摹本套回原作。遗传算法本来就是照着生物学画的,所以它当然像。但原作里没有目标函数,没有要被最大化的量,也没有谁在优化。剩下的只有一句话:碰巧出现的变异里,让携带者留下更多后代的那些变多了。「优化」是我们事后套上去的框,框很好用——但别把它当成那个东西本身。

EN Put yourself on a hillside in thick fog, wanting to go up, able to see only a metre around. Method one: feel the ground, find which way is uphill, step that way, repeat. This is how today's AI models are trained — gradient descent: turn "how wrong the output is" into a number, work out for every adjustable knob which way to turn it to make that number smaller, and nudge them all. The point is that it can compute a direction. Method two: send a thousand people one step each in random directions, have them report their height, shift towards those who reported high, send another thousand. This needs no uphill direction, only the ability to compare heights. Evolution runs the second — without even the "you": nobody aggregates, the ones standing higher simply leave more offspring, and that is the aggregation. The second really works. In 2017 a group used it to train control policies: 1,440 machines in parallel solved a simulated 3D humanoid's walking in under ten minutes, and an hour of training on a batch of old video games reached scores comparable to the mainstream try-and-reward learning methods of the day. It parallelises that far because machines exchange only two tiny things — a small integer that lets the other side generate identical random numbers, and a score. The paper states the cost plainly: several times more episodes than the comparison method. What is saved is wall-clock time, not total compute. The second method wins where no direction can be computed (the result is an integer, a pass/fail, the state of a finished simulation) and where the landscape resembles that maze. What biology lacks is exactly the direction: no mechanism tells a population which way is uphill. It holds three other things — enormous numbers (the bacteria in your gut outnumber all humans on Earth by orders of magnitude), enormous time, and offspring that start where their parents stopped rather than from zero. One difference is rarely raised: on a machine you can checkpoint, roll back and rerun a stretch. Evolution has no checkpoint; dead is dead, so path dependence here is absolute. And the thing most easily got backwards: calling evolution an optimisation algorithm maps the copy back onto the original. Genetic algorithms were drawn from biology, so of course they resemble it — but the original has no objective function, no quantity being maximised, and nobody optimising. What is left is one sentence: among variants that happened to arise, those whose carriers left more descendants became more common. "Optimisation" is a frame we fitted afterwards. It is a useful frame; it is not the thing.

🎒 场景 · BigCat

🌀 越界 · 跨学科的联想

深入思考

遗传算法既然是照着演化设计的,为什么不能反过来拿它解释演化?
因为那是用摹本解释原作,会把摹本里为了好算而加的东西倒灌回去。算法里有人写的目标函数、固定的一代、明确的终止条件,这三样自然界都没有;听起来讲通了,其实你讲的是那个程序。反过来可以:拿演化解释算法为什么给出怪答案,不循环。
「开放式演化」到底想要什么?怎么算做到了?
想要的是「一直出新东西,而且新东西会给别的东西造出新问题」。难点在判据:多样性上升不算,很快就饱和;复杂度上升也不够,因为怎么定义复杂度会直接决定结论。比较被接受的判据看「新出现的东西有没有改变后面能出现什么」——寄生者出现之后宿主的问题变了,这才是往外长。
自然界没有目标函数,那说一个性状「更适应」还有什么意义?
有意义,但它是比较句不是评价句:在这套具体条件下,带着这个变异的个体平均留下更多后代。它不说这个性状更好、更高级,也不能脱离条件成立——条件一换,同一个性状可能立刻变成拖累。把「更适应」听成「更优秀」,是这门学科最贵的误读。

延伸阅读(均为英文)