Query on Starlogo TNG

31 views
Skip to first unread message

Kevin Gee

unread,
Jun 18, 2014, 11:22:39 AM6/18/14
to starlo...@googlegroups.com
Hi, 

I am an teacher and i just started learning star logo TNG in order to teach the students in my class. 
 
Is it possible to perform the project "Bees -honey comb" modelling and simulation previously on Starlogo on Starlogo TNG? I am not so sure what the command diffusion does.

Could you please advise? 

Thank you very much

Best regards

Kevin

 


Daniel Wendel

unread,
Jun 20, 2014, 12:36:37 AM6/20/14
to starlo...@googlegroups.com
Hi Kevin,

Welcome! Yes, it is still possible to do that model, but it's a little different now. In StarLogo 2.2, the patches themselves could run code, which is how diffusion worked. In TNG, the patches can't run code, so you have to program some agents to do the diffusion work instead. There are many ways to do this, but my favorite is to just create a bunch of agents who will move around randomly, make them invisible, and then make their behavior be that if they are on a colored patch, take 1/2 of its value, set its color to represent the new value, and then move one step forward and add the value to THAT patch. The overall effect is that the colors of the patches will get spread around similar to how the "diffusion" command worked.

You could also actually program an agent to visit every patch and update its color exactly the way diffusion worked. In that case the behavior would be simple (just copy from the old model), but getting the agent to visit every patch would take some repeat blocks nested inside of repeat blocks.

Good luck!

Best,
--Daniel (StarLogo TNG / Nova Team)


--
You received this message because you are subscribed to the Google Groups "StarLogo TNG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starlogo-tng...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages