title: NetLogo: move turtles until they find the optimal location
body: <p>I have NetLogo file and assigned for each patch a optimal value (the lower the value, the better). I would like to move my turtles until they all find a spot with the most optimal value. How can I implement this in a piece of code?
  I already have this piece of code that prevents the turtles from directing to a patch that is not 'beach'. Still, their movements are randomly and I would now like them to move to a patch where the optimal value is the lowest possible.</p>
  <pre><code>to go
    ask turtles
    [
      ;ensures that next patch is a beach-patch
      ifelse [value] of patch-ahead 1 != &quot;beach&quot;
        [ lt random-float 360 ]   ;; We see a patch that is not beach in front of us. Turn a random amount.
        [ fd 1 ]                  ;; Otherwise, it is safe to move forward.
        
    ]
  </code></pre>