# Why does patch-here exist when turtles can access the variables and procedures of the patch they're standing on?

**URL:** <https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865>\
**Category:** Q&A\
**Tags:** en\
**Created:** [September 1, 2026, 4:08am UTC](https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865 "2026-09-01T04:08:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![p276301](https://forum.netlogo.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@p276301](https://forum.netlogo.org/u/p276301)\
**Post date:** [September 1, 2026, 4:08am UTC](https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865/1 "2026-09-01T04:08:28Z")

</div>

I got an interesting question from a student: Why does patch-here exist when turtles can access the variables and procedures of the patch they’re standing on? Or, more specifically, is there any situation that can only be implemented using patch-here, which cannot be implemented in any other way?

---

<div class="post-metadata">

**Author:** ![ERSUCC](https://forum.netlogo.org/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@ERSUCC](https://forum.netlogo.org/u/ERSUCC)\
**Post date:** [September 1, 2026, 9:26pm UTC](https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865/2 "2026-09-01T21:26:34Z")

</div>

Hi @p276301,

It is true that most cases are probably covered by just directly accessing patch variables. However, if you want to create a [patch set](https://docs.netlogo.org/dictionary#patch-set) or otherwise keep track of specific patches for later use, you would need access to the actual agent, not just its variables. There are ways to get around this, such as `patch xcor ycor`, but it’s nice to have `patch-here` as a clearer way of expressing that.

Isaac B.

---

<div class="post-metadata">

**Author:** ![p276301](https://forum.netlogo.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@p276301](https://forum.netlogo.org/u/p276301)\
**Post date:** [September 2, 2026, 3:50am UTC](https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865/3 "2026-09-02T03:50:56Z")

</div>

Thanks!

Thinking about it, that makes sense. I was thinking in terms of purely reflexive agents, but for agents with some kind of (possibly shared) memory or representation you may need to keep track of specific patches.

An immediate example I could think of is modelling a robotic vacuum that remembers which parts of the room it has already visited. Patches serve as the floor and can either be dirty or clean, while a turtle represents the robotic vacuum that moves around the room, cleans the floor, and remembers which patches it has already cleaned. The robot can’t simply move to the nearest dirty patch because it may not have the perception required to see that, so it has to add patches it visits to its memory.

---

<div class="post-metadata">

**Author:** ![lucasdavis](https://forum.netlogo.org/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@lucasdavis](https://forum.netlogo.org/u/lucasdavis)\
**Post date:** [November 23, 2026, 12:32am UTC](https://forum.netlogo.org/t/why-does-patch-here-exist-when-turtles-can-access-the-variables-and-procedures-of-the-patch-theyre-standing-on/865/4 "2026-11-23T00:32:37Z")

</div>

Another practical reason is composition: `patch-here` lets you pass the current patch as an agent argument, e.g. `set visited lput patch-here visited` or `update-patch patch-here`, without recomputing coordinates. Strictly speaking it may not be the only way—`patch-at 0 0` or `patch xcor ycor` can also get the agent—but `patch-here` is the direct, readable expression of “the patch I’m standing on,” especially when a procedure expects a patch rather than a variable value.
