Closed bennlich closed 3 years ago
corner patches have neighbors (nn) = 3 neighbors and edge patches have nn = 5. they will be different from n=4 or 8. To explore this I set a conditional breakpoint to pause whenever n != nn and saw it pausing on the patches with 3's and 5s. Note in the image below the debugger is currently paused on patch id 4 in the right "Block" tree you can see it has 5 neighbors
and when I mouse over "nn" it gives me the current value.
To edit a breakpoint to be conditional, right click on it and put in your expression.
You can also have the option to make a "logpoint" here which is convenient for console logging especially when you can't modify the source:
I suspect Benny's dad wants to know if the diffuse process conserves the quantity being diffused. I once answered him with a confident yes wrt to Netlogo :-) Reading through Owen's code (very cool btw), I think it is also true for Agentscript
Ahhhhh, I see. Nice breakdown. Thanks @stephenguerin
Is diffusion unstable if rate > 1? See attached figure with rate = 1.5.
@backspaces I'm looking w/ my dad at https://github.com/backspaces/agentscript/blob/master/src/Patches.js#L301 :
I'm having trouble understanding the last term on the last line. Isn't
(n - nn)
always 0?