Observer

diffuse4 variable percentage

Parameters:
variable Number patch variable to diffuse
percentage Number percentage of variable's value to diffuse

Description:
Makes each patch give 1/4 of percentage of variable to each non-diagonal (N,E,S,W) neighboring patch.
percentage should be expressed as a number between 0 and 1. variable should be a patch variable.

Examples:
diffuse food 20 causes each patch to give 1/4 of 20 percent of the variable food to each of its four directly-neighboring patches.

Notes:
diffuse4 must be run by the observer, even though it affects patches.

Related Commands:
diffuse nsum nsum4