昨天简单介绍了一篇文章及生命游戏在R中的实现:
PNAS:模拟微生物群落互作及生命游戏在R中的实现
生命游戏中有不少有趣的图形,今天又玩了一下,顺便做一介绍。代码用昨天的即可实现。...ifelse( ((fun.sum == 2|fun.sum == 3)& life[[k-1]][i,j]==1) | (fun.sum == 3 & life[[k-1]][i,j]==0), 1, 0)
生命游戏基本图形介绍及在...# 恒定
size = 4
d1 = c(0,0,0,0,
0,1,1,0,
0,1,1,0,
0,0,0,0)
start = matrix(data=d1...# 震荡
size = 5
d2 = c(0,0,0,0,0,
0,0,1,0,0,
0,0,1,0,0,
0,0,1,0,0,
0,0,0,0,0...# 滑翔机
size = 6
d3 = c(0,0,0,1,0,0,
0,1,0,1,0,0,
0,0,1,1,0,0,
0,0,0,0,0,0,