2011-03-16 55 views

回答

1

我们需要更多的信息,比如,什么问题都遇到你,困难等。在此期间, 这里有一些链接,可以帮助你:

http://www.primaryobjects.com/CMS/Article106.aspx

http://cplus.about.com/b/2008/08/17/programming-challenge-17-implement-the-cellular-automaton-known-as-life.htm

https://web.archive.org/web/20110503020104/http://www.kim-team.com/blog/2009/06/cellular-automaton-in-net/

编辑:谢谢Halil,我编辑了包含web.archive.org链接的答案。

+0

我现在正在研究一些GrowCut扩展算法的实现,并且我从未做过任何类似于元胞自动机的操作。这就是我问你的原因)谢谢!上次资源很有用! – lexeme 2011-03-16 14:20:39

+2

对于那些发现最后一个链接已经死机的人,这里是存档:https://web.archive.org/web/20110503020104/http://www.kim-team.com/blog/2009/06/cellular -automaton-在网/ – 2014-01-30 07:40:50

2

我写一个,你可以用它来写一个.NET实现的伪代码实现:

function automate(cells,bornlist,survivelist,iterations) 
{ 
    loop(iterations) 
    { 
     loop(row < height) 
     { 
      loop(collumn < width) 
      { 
       if(is edge) 
       { 
        alive = true 
       } 
       else 
       { 
        num = add states of all cells around the outside (if in 3d  include above and below and use less iterations) 
        state = cells[row,collumn] 
        alive = (state = 0 and bornlist.contains(num)) or (state = 1  and survivelist.contains(num)) 
       } 

       cells[row,collumn] = alive ? 1 : 0 
      } 
     } 
    } 
} 

这依赖于一个事实,即细胞已经由噪声初始化一个随机值 发生器,例如Simplex或Perlin噪声。