文章

顯示從 1月, 2022 起發佈的文章

彩色生命遊戲:戈斯珀滑翔機鎗 Gosper's Glider Gun, Game of Life

圖片
  這是一個模擬細胞活動的電腦編程遊戲。我加上不同顏色使其更易明白:     黑色、空格     紅色、新生兒出現在有3個鄰居的空格     綠色、有2或3個鄰居的細胞     藍色、細胞剛離世,因為太孤獨或太擁擠(少於2個或多於3個鄰居)。 不被計算為鄰居 。 (你可能已經留意到,選色附合 RGB 在彩虹的順序)😁 The game of go is a well-known computer science game which uses simple rules to produce complex cell-like behaviors.  What makes it easier to understand?  Coloring the cells!     BLACK - empty spots     RED - new borns were at empty spots with exactly 3 neighbours.     GREEN - existing cells with 2 or 3 neighbours live on     BLUE - cells just dead due to loneliness or starved from crowdiness, less than 2 or more than 3 neighbors.  Think of BLUEs non-exist . (you might have already noticed that the colours, RGB, are selected for the life phases to match the same sequences as on a rainbow 🌈 ) the 'gun' Gosper's Glider Gun is an interesting pattern, each cycle has 60 frames, while the glider ...