with-max2.1

agentset with-max [reporter]

Takes two inputs: on the left, an agentset (usually "turtles" or "patches"). On the right, a reporter. Reports a new agentset containing all agents reporting the maximum value of the given reporter.

show count patches with-max [pxcor]
;; prints the number of patches on the right edge

See also max-one-of, max-n-of.

Take me to the full NetLogo Dictionary