Reputation: 4087
I just started learning NetLogo. I was asked to give difference between agents and objects. I have searched for the solution on several websites but all I've learned is that Agents are beings that can follow instructions. In NetLogo, there are four types of agents: turtles, patches, links, and the observer. However I don't have any idea yet what objects are in Netlogo.
Upvotes: 1
Views: 387
Reputation: 1
In NetLogo, there are four types of agents: turtles, patches, links, and the observer (...)
Well, we shall claim there are infinitely many possible ways to create agents. Some are built-in, by design, like a special kind of agent, the observer
( of our NetLogo simulated world ). Next there are three kinds of agents ( as built-in agent sets ) turtles
that can move ( inside our NetLogo simulated world ), patches
that are ( tiled as ) a "floor", over which our turtles
can move ( in one-tile steps or in many-tile far direct jumps ). Finally we can "link" things together, using links
, which help us construct some sort of "mechanical"-alike relations ( technically speaking agent-to-agent associations ) between only some of the inhabitants of our simulated world, which we can use to describe some problem specific kinds of behaviour that our linked or not-linked agents may differ in.
Besides these built-in agents, we can create any amount of new types of agents, using a constructor syntax of:
breed [ aNewBreedNamePLURAL aNewBreedNameSINGULAR ]
Any such new breed can next be declared in more details, what attributes will these new agents have "built-by-(our)-design" :
breed [ Students Student ]
breed [ studyGroups studyGroup ]
breed [ Teachers Teacher ]
Teachers-own [ many_ideas
some_experience
duty_to_educate
room_or_lab
]
Students-own [ some_time
some_will
some_experience
some_hobbies
some_plan_to_study
]
So, besides the built-ins, we can create our own ZOO of agent-kinds we feel comfortable with, so as to properly describe the world and the relations, that our simulated simplification of the real world, inside the NetLogo simulated world, needs to reflect and will be able to self-evolve, according our further defined rules, constraints and relation-specific behaviours ( expressed with use of links
-based relations, actual agent-specific-state, agent-specific location on patch
, global NetLogo simulated world
state, flow of time and other context-specific pieces of information our NetLogo simulation maintains or exchanges with external world via files, GUI-interactions, M2M-interactions, socket-communications etc ).
Besides these agent-related tools NetLogo uses other abstractions - like lists [ item0 item1 (...) ]
, sets ( of links, of agents, of patches ), strings, plots, histograms, pens, colours, files or even a mouse - that we may also call NetLogo objects, just to distinguish these from being agents.
While we can ask Students with [ some_will > 0 ] [ do_some_work ]
objects like lists or mouse or files can perform only some fixed tasks,
like { file-open | file-read | (... ) | file-at-end? | file-close | file-delete }
Upvotes: 1