Reputation: 3
I want my turtles to be able to assess which neighbour patches have a higher elevation than the current patch and then randomly select one of these higher elevation patches to move to.
Thank you very much in advance.
Upvotes: 0
Views: 537
Reputation: 1399
You can use uphill
primitive i.e. dictionary with something like
ask turtles [
uphill elevation
]
EDIT You can use something like
ask tutles [
let myelevPatch elevation patch-here
let higherpatches patches in neighbors with [elevation > myelevPatch]
move-to one-of higherpatches
]
Upvotes: 2