Patches are "the world!" They are similar to Turtles, but they do not move. They work like a Cartesian graph (the "normal" graphs that you see in math class)

In NetLogo, we're able to specify the dimensions of what this grid is (default is $x \epsilon [-16, 16]$ and $y \epsilon [-16, 16]$, meaning that the world is a 33x33 world (including 0).

Grid World

Suppose our world is a 5x5 grid:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7cf87222-1271-4103-a1a0-eeb23f1c1a0b/Untitled.png

The red box here is the middle of the world. By default, (0,0) is going to be in the middle. There are ways to change it to the different corners of the world, but for now we are going to keep it in the middle.

Let's try another one:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/4584f52f-2486-4fbb-a6c4-ca3307cd6d07/Untitled.png

Let's do one more!

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fbeba7e6-0e8b-4549-b089-2ec321bc9784/Untitled.png

Try working with patches!

In the command center:

> ask patch 0 0 [set pcolor red]
> ask patches [set pcolor white]

You can also add a condition.

> ask patches with [pxcor > 5] [set pcolor green]