Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Julia ♥ Agent Based Modeling #2: Work, Eat, Trade, Repeat (julialang.org)
36 points by logankilpatrick on July 12, 2022 | hide | past | favorite | 21 comments


If you can forgive me for departing from the tradition established by 11 comments all talking about the card suit in the title, Agents.jl is a powerful package. I just used it to research a problem in simulated biological evolution, and it did the job wonderfully. You can define the behavior of your agents and their interaction with the environment at a high level, and Agents.jl will take care of the details, such as enforcing boundary conditions, creating ensembles, etc. And it’s fast, and visualization is easy. (I haven’t actually read the article yet.)


Hackers ♥ Julia

BTW, you can use emoji in Julia code, see e.g. https://github.com/StefanKarpinski/Cards.jl, as well as other unicode characters. You can enter help mode in REPL (by pressing `?`) and paste the character to see how you can type it.


Agent-based modeling looks like an interesting topic, something ripe for fun little side projects. The short (three paragraph) "Crash course on agent based modeling" [1] from the package docs gave me an idea of why ABM is useful. And scrolling through the example model [2] kinda answers what conveniences the package gives me, over implementing the simulation myself.

Has anyone here used ABM for a serious project? Fields like economics and sociology are mentioned, but how prevalent is Agent-based modeling in those fields in practice?

[1] https://juliadynamics.github.io/Agents.jl/stable/#Crash-cour... [2] https://juliadynamics.github.io/Agents.jl/stable/examples/sc...


I've done quite a bit for archeology and it's moderately prevalent in the literature. You can implement simple simulations yourself without much effort or use one of the many environments like NetLogo that provide out of the box support. They're best used like thought experiments that are too big to keep in your head, in my experience. Done well, they illuminate dynamics that weren't necessarily obvious at the beginning that you can circle back on with other methodologies.

However, there are some downsides. It's an art to make interesting, simple models that don't evolve to a steady state in some way. You can get around this with more variables , but that's aesthetically unsatisfying. You can also increase the resolution of the simulation, but at the high end you have trouble getting enough data and writing the simulation can take years of effort (e.g. Village ecodynamics project). Using them predictively is also on shaky theoretical ground. Avoid doing that if possible.


ABM can be used to model human movement. In our project at university we used it to model how people evacuate a building in case of a fire. I remember seeing (I think on Nat Geo) how stampedes/crowds could be modeled/avoided at concerts etc.


https://ccl.northwestern.edu/netlogo/references.shtml

That's a list of publications from the NetLogo people. Shows quite a few publications on both educational applications (using ABM for teaching students about various topics and modeling) and for serious applications. Annoyingly, none of them are links to papers but a web search should find most of them.


At first, I thought it was some fashion modeling agency spam from some girl named Julia that got into the front page. The title is still in my opinion click-baity...but worth reading :D


Surprised to see ♥ allowed in the title.


It's not—but it wasn't automatically dropped by the software in this case.


In the comments as well. I thought most emoji characters got stripped.


¯\_(ツ)_/¯


I am also here only because of the emoji.


If it was intentional to only allow ♥ in titles and comments, that'd make my day!


First time I ever see an Emoji on Hacker News. Are they not filtered out anymore?


It’s likely a bug. Iirc dang has posted before that filtering out emoji while allowing most of unicode isn’t entirely simple.

The heart is also weird in that the symbol was in unicode before most emoji (but it would typically be black and somewhat smaller).


I mean… first link I clicked as soon as I opened HN. I think my primate brain is attracted to colors ♥

Need to open the post and actually read it now!


Thought the same - nice : )


Not an emoji, but black heart changed by font. Black meaning solid:

U+2665 ♥ BLACK HEART SUIT

Other card suits: ♠ ♦ ♣


It kinda is emoji…

https://unicode.org/reports/tr51/#Emoji_Characters says emoji character is "a character that has the Emoji property". Let's check:

  $ perl -MUnicode::UCD=charprop -E "say charprop(0x2665, 'emoji')"
  Yes
But then, even some ASCII characters have this property, so maybe it's not a very reasonable definition.


Aren't emojis exactly that?


Unicode Emojis are from higher block made of four bytes each in utf8. https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_...

These are more like "wingdings," older and take three bytes.

    U+2667    ♧    e2 99 a7       WHITE CLUB SUIT
    U+1F574   X    f0 9f 95 b4    MAN IN BUSINESS SUIT LEVITATING
(Second one was stripped out.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: