Check out breeds, which you could configure for shooters, fighters, civilians, etc. You could use turtles-own (or breeds-own) variables to track accuracy of turtle.
I am not sure if I understand, but I think you need this
so in case "nodes" is a list of ids:
ask sensors with [member? who nodes] [set color black]
or in case "nodes" is an agentset
ask sensors with [member? self nodes] [set color black]
No problem! By the way, this subreddit is pretty dead for the most part. I'd recommend asking future questions on StackOverflow or the NetLogo user group. It was just luck that I happened to see this question. Generally, SO is better for programming questions, like this one, and the user group is better for conceptual questions.
Yes:
http://ccl.northwestern.edu/netlogo/5.0/docs/dictionary.html#file-write
There is a really brief code example there. The CSV extension will make it easier to import the data, but if you need to do this without any extensions, then it's possible with file-write and related functions.
http://ccl.northwestern.edu/netlogo/5.0/docs/dictionary.html#fileiogroup
You can find how to got to the file here: http://ccl.northwestern.edu/netlogo/docs/faq.html#how-big-can-my-model-be-how-many-turtles-patches-procedures-buttons-and-so-on-can-my-model-contain. I believe on Macs it's actually in the .app.
NetLogo comes with a Logging Application. It's exactly like NetLogo, except it logs user actions. Read more about NetLogo Logging here
We also have a custom logging extension if you want to log things that are not automatically logged by NetLogo logging.
It outputs everything to xml, so you need to feel okay about that. If you don't, or if you strongly dislike xml, just use the file-open
, file-write
, and file-close
commands to write your own logs.
1: sprout-breed # [] will create differing variables because it knows the starfish (or whatever) need to have a color/etc but because it's a patch creating them through the sprout command and not another starfish that it can copy its variable from, the program just kinda makes some up. You can fix this by adding -
set color blue set age 0 set favorite-activity long-walks-on-the-beach
to the [] after sprout
2: Yes! It's a great tool called Behavior Space. Check out the link here: http://ccl.northwestern.edu/netlogo/docs/behaviorspace.html to read the how-to on using it