Hi @mohovilka, the example in your original post is from a former student of mine (Umberto Pignatti Morano, 2012 class), nice to see it referenced!
You can get started with the logic of stigmergy from here (examples in Processing):
And here in Grasshopper (both in C# and using only components + plugins - check the 02-00_stigmergy - basic - intuition.gh example):
I hope this can get you started!