Lenia:连续的生命游戏
Lenia,Bert Wang-Chak Chan,2018 年

正在布展…
它是怎么做的
- 第 1 步世界是一张实数场(0~1),而不是二值格子
- 第 2 步每一步用环形核(多个同心环的光滑凸起)对场做卷积,得到“邻居势”
- 第 3 步增长函数是以 μ 为中心、宽 σ 的高斯:势在合适范围内则增长,否则衰减
- 第 4 步以小时间步 dt 累加增长并裁剪到 [0,1]
- 第 5 步内置物种库提供预设参数和初始图案,可旋转、缩放后放入世界
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Store the world as a float grid with values in [0,1]. Build a kernel of radius R as one or more smooth concentric rings (for example a bump exp(4 - 1/(r(1-r))) over normalised radius) and normalise it to sum to one. Each step, convolve the world with the kernel (FFT or a GPU shader), apply the growth function G(u) = 2*exp(-((u-μ)²)/(2σ²)) - 1, add dt times that to the world and clamp. Start from catalogued patterns with their μ, σ and R, and colour the field with a perceptual colormap.
档案
性能开销
视觉强度
实现难度
尺度为策展判断(1 到 5),用于比较和推荐。
核实记录:Opened https://chakazul.github.io/Lenia/JavaScript/Lenia.html (200, title 'Lenia'); repo Chakazul/Lenia exists, licence MIT via GitHub API; JavaScript/ folder contains Lenia.html and Lenia-LifeForms.js.


