# Agents.jl 4.0 + Comparison with competitors

**URL:** <https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927>\
**Category:** Package Announcements\
**Created:** [January 25, 2021, 8:32pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927 "2021-01-25T20:32:47Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [January 25, 2021, 8:32pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/1 "2021-01-25T20:32:47Z")

</div>

Hello everyone,

with pleasure I announce here the release 4.0 of Agents.jl: [Github repo](https://github.com/JuliaDynamics/Agents.jl), [Documentation](https://juliadynamics.github.io/Agents.jl/stable/), [CHANGELOG](https://github.com/JuliaDynamics/Agents.jl/blob/master/CHANGELOG.md).

This new release is a really big one. I’d say about 50% of the library has been either entirely re-written or re-thought at a large degree. Our focus was one the one hand doing large performance upgrades, but most importantly huge simplifications of internal code base as well as user API. Some highlights of this release:

- Continuous and Grid spaces support arbitrary dimensionality and have gained about an order of magnitude performance benefit.
- Easy-to-extend space types: you can write custom spaces by extending 5 functions and then have the entire Agents.jl API work for your new space type.
- Open Street Map space (thanks to @pszufe for support and an initial sketch of the space)
- A buttload of renames of the API for higher clarity (deprecations are in place)
- `walk`-ing functionality for agents

And more. Here is a nice agent simulation (zombie outbreak) on our new space based on Open Street Map

![outbreak](https://global.discourse-cdn.com/julialang/original/3X/1/f/1f7bb5b3848e185a4833ac41ba6a83e38f07d5e3.gif)

* * *

This post is also a good opportunity to announce the new lead developer of Agents.jl, Tim (@Libbum)  
Tim has had large influence in discussing design, solving bugs and implementing new features for quite a while now, and is absolutely worthy to take the rains of this project, as I will be stepping down from it to focus more on the remaining JuliaDynamics organization.

* * *

Lastly, while preparing this release we did an _exhaustive_ comparison of Agents.jl with 3 competing major ABM software as we prepared a publication for it that we put in arXiv (will update link here). Here is the comparison table:

 ![table1](https://global.discourse-cdn.com/julialang/original/3X/c/b/cb84d67fa3aec60e3032f8a9e7a93c62bb672917.png)

 ![table2](https://global.discourse-cdn.com/julialang/original/3X/e/7/e7c48793ada94fbb7c6266cdbe7567577aa04516.png)

Our conclusion from this comparison is that Agents.jl outclasses competitors by being simpler to use, having more features overall, and being _always_ faster.

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [January 25, 2021, 9:13pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/2 "2021-01-25T21:13:51Z")

</div>

Great work!

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [January 25, 2021, 10:05pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/3 "2021-01-25T22:05:51Z")

</div>

Looks great! I am glad that you made a good use of my map animation code!

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [January 26, 2021, 12:20pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/4 "2021-01-26T12:20:17Z")

</div>

Looking forward to update our WIP project with this simplified and more performant framework.  
Thank you for your hard work on this project and also congratulations to @Libbum!

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [January 26, 2021, 2:02pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/5 "2021-01-26T14:02:05Z")

</div>

We’ve also just put up our [paper on the arXiv](https://arxiv.org/abs/2101.10072) if you want to check it out!

---

<div class="post-metadata">

**Author:** ![John\_Coppola](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_coppola/32/16462_2.png) [@John\_Coppola](https://discourse.julialang.org/u/John_Coppola)\
**Post date:** [January 31, 2021, 9:52pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/7 "2021-01-31T21:52:39Z")

</div>

Interesting. Congrats Tim!

---

<div class="post-metadata">

**Author:** ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Post date:** [February 1, 2021, 11:12am UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/8 "2021-02-01T11:12:13Z")

</div>

Hi,  
I’ve never done Agent-based models, but I’ve read one or twice people using the commercial environment [AnyLogic](https://www.anylogic.com/use-of-simulation/agent-based-modeling/). Would this fit in your comparison table?  
Best,  
Pierre

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [February 1, 2021, 12:16pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/9 "2021-02-01T12:16:50Z")

</div>

Hi Pierre,  
Our choice of comparisons was essentially arbitrary: with caveats. There are at least 20 active, popular ABM frameworks in use today and we needed a set that we had access to documentation, features and a set of standard ABM examples to benchmark against. The frameworks we chose had some, but not all of our requirements covered (MASON does not have two of our benchmark models available as you see).

Commercial software doesn’t lend itself to such analysis too easily; one must have a license for it, and learn enough of its syntax to appropriately compare results. If sample code is not available for models due to the commercial nature of the software, then due to the stochastic nature of ABM output, it’s very difficult to verify you’re comparing like-to-like.

With that being said, if there are AnyLogic experts out there, we would welcome any inclusions to our table and would be happy to work with them on an appropriate set of tests.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [February 1, 2021, 12:58pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/10 "2021-02-01T12:58:01Z")

</div>

While I agree with everything Tim said, I also want to voice my **personal** opinion: that there isn’t much sense in comparing closed source with open source software. When doing a comparison you want to be able to compare apples with apples. The problem with closed source software is that you will never be able to compare apples with apples, for the simple reason that you cannot prove whether a closed source software is an apple or a pear.

---

<div class="post-metadata">

**Author:** ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Post date:** [February 24, 2021, 9:08pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/11 "2021-02-24T21:08:46Z")

</div>

Thanks for your replies. As I said, I never did Agent-based simulations, so I cannot help!

About Datseris’ answer, I think it depends on how well the closed-source software is documented. These days, I’m working on microgrid simulation codes very similar to the commercial simulator [HOMER](https://www.homerenergy.com/). Although it is closed source, it was spun off an academic lab (NREL) and the method it implements is documented in a 40-page book chapter from its original authors. So comparison of features is easy.

In mathematical optimization, the [2017 journal paper](https://mlubin.github.io/pdf/jump-sirev.pdf) which introduces [JuMP.jl](https://jump.dev/) is filled with comparisons with the existing commercial environments GAMS and AMPL, because they are so widespread.

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [February 24, 2021, 9:24pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/12 "2021-02-24T21:24:58Z")

</div>

Sure, but GAMS _et al_ are optimisation frameworks that are tested against known problems, generally the subset with known local solutions. ABM’s don’t have such luxury, since they are defined by a loose set of rules that attempt to describe complexity as a bottom-up process.

Not to say it isn’t impossible, it’s just highly unlikely documentation helps. For instance, the MASON manual is 375 pages long, which really wasn’t too useful when trying to build the table above. To get decent benchmark comparisons I had to de-compile java binaries, since the source for their examples is not distributed in plain text albeit an ‘open source’ project.

---

<div class="post-metadata">

**Author:** ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Post date:** [February 24, 2021, 9:34pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/13 "2021-02-24T21:34:28Z")

</div>

> [@Libbum](#):
>
> To get decent benchmark comparisons I had to de-compile java binaries, since the source for their examples is not distributed in plain text albeit an ‘open source’ project.

Wow!

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [February 24, 2021, 9:35pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/14 "2021-02-24T21:35:37Z")

</div>

😄 yeah, rough time!

---

<div class="post-metadata">

**Author:** ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Post date:** [March 23, 2021, 1:20pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/15 "2021-03-23T13:20:24Z")

</div>

Are the agents asynchronous or multithreaded?

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [March 23, 2021, 1:33pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/16 "2021-03-23T13:33:50Z")

</div>

We can’t provide that capacity in the general case, since we need things like [synchronous updates](https://juliadynamics.github.io/Agents.jl/stable/examples/hk/#Core-structures) over all agents.

We do provide parallel replicates of models, so that you can run one model with different properties, or perhaps a different random seed (this is currently getting fixed).

There’s no reason though why you cannot make agents asynchronous/multithreaded in your own model, provided the logic you require allows it. For example the agent step function is ultimately just [iterated over each agent](https://github.com/JuliaDynamics/Agents.jl/blob/91b44d6b76453f361db6cfcac63ca13995499954/src/simulations/step.jl#L55). You could provide a custom step function that uses an async/await syntax. Or perhaps each agent needs to do some heavy work each step: use threads inside its logic etc.

If you have a use case, let us know. Something like this would be helpful to go into the Ecosystem Integration section of our [documentation](https://juliadynamics.github.io/Agents.jl/stable/).

---

<div class="post-metadata">

**Author:** ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Post date:** [March 23, 2021, 3:27pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/17 "2021-03-23T15:27:47Z")

</div>

Oh, I’ve mixed up Agents.jl and Actors.jl. Now both are interesting, but are different beasts.

---

<div class="post-metadata">

**Author:** ![Igor\_Douven](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/igor_douven/32/8433_2.png) [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Post date:** [March 23, 2021, 4:46pm UTC](https://discourse.julialang.org/t/agents-jl-4-0-comparison-with-competitors/53927/18 "2021-03-23T16:46:21Z")

</div>

> [@Libbum](#):
>
> or perhaps a different random seed (this is currently getting fixed).

Very happy to hear this – it will make an already great package better still!
