如何阻止我的海龟在NetLogo上堆积起来?如何阻止我的海龟在NetLogo上堆积起来?
我需要我的海龟移动,但不是彼此顶部,并停止堆放。
我已经尝试用下面的代码:
to go ask turtles [ let empty-patches neighbors with [not any? turtles-here]
if (breed = ricos) [
face one-of patches with [ price = 1000 ]
if any? empty-patches [
fd 1 ]
]
if (breed = pobres) [
face one-of patches with [ price = 1000 ]
if any? empty-patches [
fd 1 ]
]
if (breed = medias)[
if any? empty-patches [
face one-of patches with [ price = 1000 ]
fd 1]
]
]
end
to move-to-empty-one-of [locations]
move-to one-of locations
while [any? other turtles-here] [
move-to one-of locations
]
end
但他们仍然堆积如山。
你是否因为海龟而失望? –