7 ms·
NetLogo – A multi-agent programmable modeling environment
- xrd 8y agoWhat other languages provide this kind of model output? It's very interesting.
- nickmancol 8y agoI have used Mesa (python 3) in one of my master's classes. https://github.com/projectmesa/mesa https://github.com/projectmesa/mesa
- maxbond 8y agoThere's a similar language called StarLogo (http://www.slnova.org/ http://www.slnova.org/), but the latest iteration (StarLogo TNG https://education.mit.edu/portfolio_page/starlogo-tng/ https://education.mit.edu/portfolio_page/starlogo-tng/) is focused on education and accessibility, and is a graphical block style language. There's a JavaScript framework based on NetLogo called AgentScript (http://agentscript.org/ http://agentscript.org/). I've also seen people use Processing (https://processing.org/ https://processing.org/) for agent-based modeling. StarLogo and NetLogo were some of my first languages. Modeling real-world systems is an immensely powerful educational tool. It helps contextualize programming in a relatable way, and it helps you to learn about complexity and the way the world works at the same time.
- mcphage 8y agoTo add to your comment: StarLogo is talked about in the book "Turtles, Termites, and Traffic Jams", which is a great book talking about understanding decentralized phenomenon, and how we learn to understand them. But the language seems to have vastly diverged from what's used in the book, which is disappointing.
- falls-to-bits 8y agoThere are more and more these days. If you want Java/scala-based, the two biggest ones are: - MASON: https://cs.gmu.edu/~eclab/projects/mason/ https://cs.gmu.edu/~eclab/projects/mason/ - Repast: https://repast.github.io/index.html https://repast.github.io/index.html For Python, someone else has already mentioned Mesa: https://github.com/projectmesa/mesa/ https://github.com/projectmesa/mesa/ You can find some more lists at https://www.comses.net/ https://www.comses.net/ -- sadly https://en.wikipedia.org/wiki/Comparison_of_agent-based_modeling_software https://en.wikipedia.org/wiki/Comparison_of_agent-based_mode... looks fairly sparse / a little outdated (though I have only passing familiarity with most of those). Finally, I think a great technical source of theory about these models comes from Cosma Shalizi's notebook on ABM: http://bactra.org/notebooks/agent-based-modeling.html http://bactra.org/notebooks/agent-based-modeling.html He's one of the single best sources I've seen for describing systems for formally estimating ABMs. Netlogo is great for fast prototyping, but at least as of ...well a number of years ago now, there was a noticeable lack of scientific computing libraries. For example numerical optimization routines were extremely basic. I had to use a user-contributed package to solve a root finding problem. Honestly for this type of work I typically write my own from scratch in Python. Here's a great set of lectures and code from Blake LeBaron, "from sratch" in Python, for finance ABMs: http://people.brandeis.edu/~blebaron/classes/agentfin/ http://people.brandeis.edu/~blebaron/classes/agentfin/ ...and here's a nice from scratch Schelling model in Python: https://lectures.quantecon.org/py/schelling.html https://lectures.quantecon.org/py/schelling.html
- xrd 8y agoTerrific summary, thanks so much.
- gambler 8y agoThere is a GPU accelerated particle simulator from Yoshiki Oshima and a few other people. It can run in browsers. http://tinlizzie.org/~ohshima/shadama2/live2017/ http://tinlizzie.org/~ohshima/shadama2/live2017/ A bit tricky due to shader limitations, but very fast. You can use a million particles at a time. This is a product of HARC/VPRI cooperation, from what I understand.
- xtracto 8y agoYou can use the RePast Suite ( https://repast.github.io/ https://repast.github.io/ ). I used both of them about 10 years ago when I was in academia in a PostDoc. I taught Agent Based Modelling and Simulation to Social Sciences PhD Students. I also had the opportunity to work with Klaus Troitzsch ( https://en.wikipedia.org/wiki/Klaus_G._Troitzsch https://en.wikipedia.org/wiki/Klaus_G._Troitzsch). These kind of models yield really interesting results. But people have to be VERY careful on how to interpret their outcomes, as some people make the mistake to try to take them as direct forecasting. Also, they suffer very much from the garbage-in/garbage-out problem.
- jbottoms 8y agoOh, well beyond "very interesting". This type of modeling can yield results that are otherwise intractable. It is one of the primary reasons Thomas Schelling received a Nobel prize in economics. It should be in the toolkit of every applied mathematician or computer scientist.
- xrd 8y agoI liked the tutorial #1, linked from here: https://ccl.northwestern.edu/netlogo/docs/ https://ccl.northwestern.edu/netlogo/docs/ Is this only available for use within the GUI? I can imagine how mathematicians would use it but what would be typical applications of a computer scientist?
- xrd 8y agoAgent script looks like an amazing port: http://agentscript.org/ http://agentscript.org/ Not in love with coffee script anymore but oh well. The demos are great: http://agentscript.org/models/flock.html http://agentscript.org/models/flock.html
- deleted 8y ago[deleted]
- zeptomu 8y ago> NetLogo is a multi-agent programmable modeling environment. What does that even mean? That description fits nearly every commonly used programming language and runtime.
- Jtsummers 8y agoIt's about the environment. Everything in NetLogo could be done in straight assembly, that doesn't mean it's accessible to a wider audience. A large chunk of the motivation for NetLogo is pedagogical: make simulations and modeling accessible to students so they can explore (dynamically, not just statically) different concepts.
- xtracto 8y agoExactly... for non-developer students (social sciences), even doing a model in NetLogo is a big challenge. Still, with the right tools, they can do amazing things.
- reuven 8y agoMost programming languages don't use the multi-agent paradigm. It's a different way of thinking about problems, in which you describe how each type of agent should interact with others, and then you let them run and play out the scenario. It's true that you can implement multi-agent programming in other languages, but it's very natural and clear in NetLogo. PS: I did my PhD in the group that produces NetLogo, and continue to be blown away from the language and what you can do with it, even though I don't use it on a daily basis any more.
- veddox 8y agoI am in a research group that does ecological modelling, so I've heard a fair bit about NetLogo, though I haven't used it myself. I quite like its approach - like you say, it's a very natural way to do agent-based modelling. I also think its a good beginners' language for modellers who know their field (e.g. ecology) but haven't yet learnt how to program. Lastly, I like it's GUI integration. However, I am somewhat put off by its verbose "toy language" syntax; and I really can't afford its performance. (We are currently working on a model in Julia, and even that can take up to several weeks to compute a single run on our HPC...) So I guess my opinion is that its a fantastic language to learn about modelling, but not well suited to constructing large, complex and resource-intensive models.
- rootoor 8y agoI worked with a grad student in college who was building models in NetLogo for modeling drug overdoses. It was pretty janky and slow. They had to run the model millions of times so I had to build NetLogo on our HPC cluster running Rocks OS and write some magic config in slurm to run it and it took for ever because about 1/3 of the jobs would fail because they ran out of ram and would need to be run again. I’m not sure how much of it was the grad students fault or NetLogos fault but either way, the experience was quite painful
- frankling_ 8y agoAs for the performance aspect, these kinds of simulations (typically using fixed time steps and with per-agent decision-making) are a natural fit for many-core devices. We recently did a survey on that subject [1]. There is a lot of work being done along these lines right now. Some groups are also trying to target sequential, parallel and, say, GPU execution from the same model specification language, which could actually help with the usability of running such simulations in practice. [1] https://arxiv.org/abs/1807.01014 https://arxiv.org/abs/1807.01014
- veddox 8y agoThis is interesting. We've been thinking quite a bit about parallelising our model, but haven't managed it yet. The problem is that although our agents are mostly independent of each other, they all depend on the shared state of the world (and modify this, too). Therefore, if we were to use a multiprocessing setup, we would have to be able to lock the world object when a process is writing to it; and furthermore, find a way to pass it around in memory so that all processes have read access to it. While we know that it should be technically doable, the latency overhead of the latter has proven prohibitively high.
- frankling_ 8y agoYeah, for some models, especially small-scale ones, it can be hard to get a performance gain. There are actually ways of avoiding the locking, e.g., by staging the desired actions and then carrying them out afterwards, resolving conflicts as needed. We actually have a paper on this as well, but I'm going to stop pushing my research at this point ;)
- deleted 8y ago[deleted]
- mujoco 8y agoFor anyone who'd like to try out NetLogo without installing it, you can run example models and play with the code online in NetLogo Web: https://www.netlogoweb.org/launch#https://www.netlogoweb.org/assets/modelslib/Sample%20Models/Computer%20Science/Cellular%20Automata/Life.nlogo https://www.netlogoweb.org/launch#https://www.netlogoweb.org...
- vanderZwan 8y agoIronically, if I click that link on mobile it downloads a file
- eggy 8y agoI used NetLogo and a example file that I modified to demonstrate to non-techie designers why the doors they were proposing for a theater were too few and too narrow. The scrambling arrows representing people colliding and changing directions and the traffic made it very apparent. Simply telling them code requires X and you have Y wasn't as poignant. We wound up using NetLogo for other types of presentations.
- nasir 8y agoDuring our graduation period we used Netlogo for projects of distributed networks. It was lots of fun to do different simulations. I remember writing Ant Colongy Optimization and Firefly Synchronization with it and being able to visually see and tweak parameters.
- lettergram 8y agoYears ago I wrote an application which was essentially a neural circuit of a sea slug (they only eat and forage) with my now wife. https://austingwalters.com/modeling-and-building-robotic-sea-slug/ https://austingwalters.com/modeling-and-building-robotic-sea... We then showed how (using netlogo) how when another neural circuit for aggressive behavior was added (but the connections of the markov chain had yet to be trained) the sea slugs. After adding the aggressive circuit and letting generations live and die using a genetic algorithm - it appeared to observers like the animals became social. I.e. only the territorial sea slugs remained, and they wouldn’t attack ones of the same species, this proved to be the best for “survival”. The goal of the work was to provide insight into what neural circuits can lead to social behavior. Specifically, what environmental conditions can lead to an evolutionary trait that triggers social like behaviors. Honestly, idk if you can make any “claims”, but it was a fun undergraduate project. The best part is we exported the trained models from the Netlogo program, then imported them into a lego robot. At which point our robot had learned to be aggressive - I.e. would “chase” people away from the food source.
- vanderZwan 8y ago> Honestly, idk if you can make any “claims” Well, the results are reproducible, and the constraints of the model are clearly defined in the code. So you might not be able to generalize claims, but in some sense it is also better than many papers out there because you can be more precise about discussing flaws in the model than with empirical data.