|
本帖最后由 exv 于 2015-1-7 18:11 编辑
二位宇宙模拟动态图
霍金在The Grand Design中写道
"In the Game of Life, as in our world, self-reproducing patterns are complex objects. One estimate, based on the earlier work of mathematician John von Neumann, places the minimum size of a self- replicating pattern in the Game of Life at ten trillion squares—roughly the number of molecules in a single human cell."
这里Game指的是Law而非游戏,Einstein说过“The god does not play the game which throw the dice.",Game与Law的不同在于前者是不定的,如同Schrodinger's Cat的状态是不定的。
如果模拟宇宙的维数达到11,并且有合适的Law及相应起始状态,复现我们这个世界也是可能的,这便是The Grand Design之意。
由于是既定的演化路径,故而可用51单片机模拟二维宇宙演化。
以下是编码原则(The Law of A 2D World,摘自霍金的书The Grand Design)
The world Conway envisioned is a square array, like a chessboard, but extending infinitely in all directions. Each square can be in one of two states: alive (shown in green) or dead (shown in black). Each square has eight neighbors: the up, down, left, and right neighbors and four diagonal neighbors. Time in this world is not continuous but moves forward in discrete steps. Given any arrangement of dead and live squares, the number of live neighbors determine what happens next according to the following laws:
1. A live square with two or three live neighbors survives (survival).
2. A dead square with exactly three live neighbors becomes a live cell (birth).
3. In all other cases a cell dies or remains dead. In the case that a live square has zero or one neighbor, it is said to die of loneliness; if it has more than three neighbors, it is said to die of overcrowding.
二位宇宙模拟
上图是自己用51单片机在12864液晶上模拟的二位宇宙演化,该宇宙的演化经历时间为43演化单位。
相关书籍及代码晚些时候附上。
此模拟方案可用于:
1. 练习编写与液晶/单片机有关的代码优化;
2. 测试硬件性能,类似计算PI来评价计算机性能的那个程式。
|
|