NetLogo Help: diffuse

### diffuse1.0

#### diffuse patch-variable number

Tells each patch to give equal shares of (number * 100) percent of the value of patch-variable to its eight neighboring patches. number should be between 0 and 1. Regardless of topology the sum of patch-variable will be conserved across the world. (If a patch has fewer than eight neighbors, each neighbor still gets an eighth share; the patch keeps any leftover shares.)

Note that this is an observer command only, even though you might expect it to be a patch command. (The reason is that it acts on all the patches at once -- patch commands act on individual patches.)

    diffuse chemical 0.5
    ;; each patch diffuses 50% of its variable
    ;; chemical to its neighboring 8 patches. Thus,
    ;; each patch gets 1/8 of 50% of the chemical
    ;; from each neighboring patch.)

Take me to the full NetLogo Dictionary