

An introduction to agent-based models: simulating segregation with Python - adilmoujahid
https://www.binpress.com/tutorial/introduction-to-agentbased-models-an-implementation-of-schelling-model-in-python/144

======
starlord
Nice.

If you have also used NetLogo, how different/difficult was it as compared to
that.

I had used NetLogo a few years back in college to study tax evasion behaviour
from agent based models, it worked out quite well to match IRS figures with
similar policy variables with not much time spent in coding up the logic. But
a major problem I faced then was dealing with a few matrix operations, for
which I had to write out a lot of code. So I figure it would be fun to
replicate it in python now, hence the question to gauge difficulty in porting
that code to python...

~~~
adilmoujahid
Schelling segregation model is included in Netlogo.
[http://ccl.northwestern.edu/netlogo/models/Segregation](http://ccl.northwestern.edu/netlogo/models/Segregation)

Personally, I prefer to code in Python. The logic was straightforward to code,
and Python has different visualisation libraries such as Matplotlib that makes
building custom graphs very simple.

Tax evasion behaviour from agent based models sounds very interesting!!

