|
本帖最后由 exv 于 2015-1-7 18:11 編輯
Gospers_glider_gun.gif (20.77 KB, 下載次數: 295)
下載附件
二位宇宙模擬動態圖
2015-1-7 18:01 上傳
霍金在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.
二位宇宙模擬.jpg (22.87 KB, 下載次數: 279)
下載附件
二位宇宙模擬
2015-1-7 18:01 上傳
上圖是自己用51單片機在12864液晶上模擬的二位宇宙演化,該宇宙的演化經歷時間為43演化單位。
相關書籍及代碼晚些時候附上。
此模擬方案可用于:
1. 練習編寫與液晶/單片機有關的代碼優化;
2. 測試硬件性能,類似計算PI來評價計算機性能的那個程式。
|
|