Netlogo:如何从所有具有更高海拔的相邻补丁中随机 select?
Netlogo: How to randomly select out of all neighbor patches that have a higher elevation?
我希望我的海龟能够评估哪些相邻补丁的海拔高于当前补丁,然后随机 select 移动到这些海拔较高的补丁之一。
非常感谢您。
您可以将 uphill
原语 i.e. dictionary 与
之类的东西一起使用
ask turtles [
uphill elevation
]
编辑
你可以使用类似
ask tutles [
let myelevPatch elevation patch-here
let higherpatches patches in neighbors with [elevation > myelevPatch]
move-to one-of higherpatches
]
我希望我的海龟能够评估哪些相邻补丁的海拔高于当前补丁,然后随机 select 移动到这些海拔较高的补丁之一。
非常感谢您。
您可以将 uphill
原语 i.e. dictionary 与
ask turtles [
uphill elevation
]
编辑 你可以使用类似
ask tutles [
let myelevPatch elevation patch-here
let higherpatches patches in neighbors with [elevation > myelevPatch]
move-to one-of higherpatches
]