问题
Have I got this correct please?
If I write:
ask turtles
[go_forward
go_backward]
is it correct that a random turtle will move forward then move backward, and then a second random turtle will do the same, and so on? As opposed to:
ask turtles [go_forward]
ask turtles [go_backward]
which will get all turtles in a random order to move forward, and then all turtles in a (different) random order to move backward.
回答1:
That is correct. There's a very similar example right at the end of the section on ask
in the NetLogo Programming Guide: http://ccl.northwestern.edu/netlogo/docs/programming.html#ask
See also Ask Ordering Example, in the Code Examples section of NetLogo's Models Library.
来源:https://stackoverflow.com/questions/34872363/what-is-the-sequence-of-netlogo-execution