加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 哈利生活alg如何永远在Golly继续?

发布时间:2020-12-16 10:16:06 所属栏目:百科 来源:网络整理
导读:In hashlife the field is typically treated as a theoretically infinite grid,with the pattern in question centered near the origin. A quadtree is used to represent the field. Given a square of 2^(2k) cells,2k on a side,at the kth level of t

In hashlife the field is typically treated as a theoretically infinite grid,with the pattern in question centered near the origin. A quadtree is used to represent the field. Given a square of 2^(2k) cells,2k on a side,at the kth level of the tree,the hash table stores the 2^(k-1) by 2^(k-1) square of cells in the center,2^(k-2) generations in the future. For example,for a 4×4 square it stores the 2×2 center,1 generation forward; and for an 8×8 square it stores the 4×4 center,2 generations forward.

因此,给定8×8初始配置,我们得到一个4×4平方1代正向中心w.r.t. 8×8正方形和2×2正方形2代正向(1×4正方形,4×4正方形)以8×8平方为中心.随着每一代新生代我们对网格的看法减少,反过来我们得到了自动机的下一个状态.在获得最内部的2×2平方2 ^(k-2)代后,我们可以继续前进.

那么Golly的哈希生活将如何永远持续下去?此外,它对该领域的看法似乎从未减少.它似乎显示了2 ^(k-2)代后整个自动机的状态.更多的是,如果随着时间的推移而扩展的起始配置,算法的视图似乎会增加.网格视图缩小以显示不断扩大的自动机?

解决方法

有一个 good article on Dr. Dobb’s详细介绍了HashLife的工作原理.基本答案是,您不仅要在现有节点上运行算法,还要使用新的移位节点来获取下一代节点.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读