生命的游戏,NetLogo我将我的邻居扩展到24个单元,使用半径

生命的游戏,NetLogo我将我的邻居扩展到24个单元,使用半径,netlogo,Netlogo,代码如下: to new_neighbor set my-neighbors (other patches) in-radius 2 end to go ask patches [ set live-neighbors count my-neighbors with [living?] ] ;; Starting a new "ask patches" here ensures that all the patches ;; finish executing th

代码如下:

to new_neighbor

  set my-neighbors (other patches) in-radius 2


end

to go
  ask patches
    [ set live-neighbors count my-neighbors with [living?] ]
  ;; Starting a new "ask patches" here ensures that all the patches
  ;; finish executing the first ask before any of them start executing
  ;; the second ask.  This keeps all the patches in synch with each other,
  ;; so the births and deaths at each generation all happen in lockstep.
  ask patches
    [ ifelse live-neighbors = 3
      [ cell-birth ]
      [ if live-neighbors != 2
        [ cell-death ] ] ]
  tick
end
以下是错误:

COUNT预期输入为agentset,但得到的却是数字0。 修补程序30-31运行计数时出错 通过程序GO调用 按“一次执行”按钮调用

我只想把我的邻居扩大到24个牢房。没有别的了。我要程序检查的不是前8个细胞环而是24个细胞环


谢谢。

查看模型库(文件菜单)。在代码示例部分,有一个名为“Moore&von Neumann示例”。这正是你想要的

因为你的错误,我的邻居没有补丁。您的代码没有包含任何实际设置my Neights变量的部分,因此不清楚为什么它是空的。也就是说,实际调用过程的代码位是什么