NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

WHAT IS IT?

Agents in a world with various interaction rules. Different rules produce different behaviour. This model is very similar to Heatbugs and Slime which can be found in netlogo models library.

HOW TO USE IT

go: start the model
example: example rule number
set-example: set example rule as the current rule

######More######
mouse: select several agents and move them
unify: put agents very close to eachother
scatter: randomly scatter the agents in the world
recolor: randomly recolor agents
field: currently visualized field
recolor-value: absolute field recolor value, absolute values above that value will be white
field [0 1 2 3]
positive field color [55 45 25 15] or [green yellow orange red]
negative field color [115 95 85 125] or [violet sky cyan magenta]
scaled so that dark is close to 0, more white is higher absolute value.
restart-model: restarts model

######Making rules######
world: world to view, change to switch world
new-rules: all 4 world will have random rules
agents-count: number of agents to spawn during world switching
mutate-rules: every world besides the one being viewed will have rules that are changed based on the world that is being viewed
mutate-previous: mutate rules that are associated with the previous world that was mutated
rule: input/output field for rules
get: get the current rule
set: current rule will become whatever value is on *rule* field and mutate-rules is invoked
undo: undoes actions new-rule and mutate-rules
redo: redoes undo actions
delete agent: delete all agents of selected color

######Manual rule modification tools######
agent?: if it is off, then world elements will be changed, otherwise the picked agent groups elements will be changed
pick agent group: pick the agent group for modification, lowest left corner of the world indicates the color of picked agent group
element-to-change: element to change (agents have 15, world has 8)
element description: describes element-to-change
element-value: element value
reset element: resets element to what it was in the beginning
reset rule: resets rule to what it was in the beginning

HOW IT WORKS

There are 4 fields. The values on the field diffuse and evaporate according to evaporation and diffusion constants.
Agents(the order of agents is random at each time step):
1)face towards one of closest 8 patches not counting the one under them with lowest value of:
[[w1] of myself * abs([i1] of myself - s1) + [w2] of myself * abs([i2] of myself - s2) + [w3] of myself * abs([i3] of myself - s3) + [w4] of myself * abs([i4] of myself - s4)]

where:
s1 ... s4 stands for the field value of the patch in focus
[i1] of myself ... [i4] of myself stands for ideal-field1 ... ideal-field4 of the agent
[w1] of myself ... [w4] of myself stands for weight1 ... weight4 of the agent
abs() is absolute value

2)move forward by *step* value that each of them has
3)increase the field patch values under them according to the 4 different field-output values

THINGS TO NOTICE

Notice the various emergent properties of various rules

THINGS TO TRY

1)Find some interesting rules and modify them by mutating them to find even more interesting rules
2)Pick a rule, modify some property of it using rule modification tools and see how the world reacts
3)Pick a random rule and without running it try to estimate the behaviour of the world based on the rule only

EXTENDING THE MODEL

Find algorithms to produce various interesting rules more easily

MORE INFORMATION

structure and explanation of rule list:
[diffusion1 d2 d3 d4 evaporation-rate1 e2 e3 e4 field recolor-value
[...];particle-group1
[...];particle-group2
amount of particles]

particle group list:
how many particles; summed up across all particles to produce 100% value
color
step
weight1...w4
ideal-field1...i4
otput-field-value1...o4

The algorithms for producing new rules and mutating them are meant to produce interesting rules more easily. Explore the code if interested

There are more tools for helping to understand the world with a different perspective (only applies for some rules) below a white note marked with @@@@. The tools are different plots for average field values of the world and agent stats.

RELATED MODELS

NetLogo Models Library:
Heatbugs
Slime
Mouse Drag Multiple Example

(back to the NetLogo User Community Models)