Netlogo: asking a turtle to count its neighbors
问题 I´m asking a turtle to count its neighboring turtles that are healthy with the following code let healthy-neighbors count turtles-on neighbors with [infected? = false] I get the following: You can´t use INFECTED? in a patch context, because INFECTED? is turtle-only My mistake must be basic, but can't find it, any help? 回答1: NetLogo is seeing that as turtles-on (neighbors with [infected? = false) , and since neighbors gives an agentset of patches, the with clauses is expecting patches, but