在netlogo中跟踪访问的修补程序

在netlogo中跟踪访问的修补程序,netlogo,Netlogo,如何跟踪访问的修补程序。乌龟到处移动,我需要跟踪它,哪一块被乌龟访问过,哪一块没有被访问过 有很多方法可以做到这一点,它们的效用取决于您的需要。这里有一种方法,使用内存列表。 海龟拥有[记忆] to setup ca crt 1 [set memory (list patch-here)] end to move ;;turtle proc let unvisited patches with [not member? self [memory] of myself] mov

如何跟踪访问的修补程序。乌龟到处移动,我需要跟踪它,哪一块被乌龟访问过,哪一块没有被访问过

有很多方法可以做到这一点,它们的效用取决于您的需要。这里有一种方法,使用内存列表。 海龟拥有[记忆]

to setup
  ca
  crt 1 [set memory (list patch-here)]
end

to move  ;;turtle proc
  let unvisited patches with [not member? self [memory] of myself]
  move-to one-of unvisited
  set memory lput patch-here memory
end

在这个简单的例子中,内存列表的增长没有限制。在实际应用程序中,您可能希望在一定长度后删除旧内存。

它会创建一个列表,但是如果该列表中存在此位置,我如何查询该列表您在
移动过程中查看了
未访问的
的创建吗?我想这回答了你的问题。如果没有,请重新措辞。