如何创建邻居列表以验证是否被其他乌龟占领 [英] how to create a list of neighbors to verify if occupied or not by other turtles

查看:43
本文介绍了如何创建邻居列表以验证是否被其他乌龟占领的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一般来讲,我不会知道其他海龟占据了哪些邻居,而在海龟的半径范围内,我不会知道正在占据哪些斑块.如果我可以创建它们或类似的列表以验证其中的哪些已被占用或没有,则更好.有什么建议吗? 谢谢

i wont to know what neighbors are occupied from other turtles, in general terms i wont to know what patches are occupied in-radius from the turtles patch. Better if i can create a list of them or similar to verify what of this are occupied or no. Some suggestion? thanks

推荐答案

对于8个相邻补丁:neighbors with [ any? turtles-here ]

对于半径范围内的色块:patches in-radius x with [ any? turtles-here ]

For patches in a radius: patches in-radius x with [ any? turtles-here ]

这篇关于如何创建邻居列表以验证是否被其他乌龟占领的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆