JuliaDynamics / Agents.jl

Agent-based modeling framework in Julia
https://juliadynamics.github.io/Agents.jl/stable/
MIT License
728 stars 117 forks source link

Add differentiable programming examples? #416

Open DhairyaLGandhi opened 3 years ago

DhairyaLGandhi commented 3 years ago

Zygote has come a long way, and it'd be cool to demo some differentiable programming capabilities using it, and maybe even together with Flux. There might be some cases to consider such as mutation and other fiddly bits, but would make for a really neat demonstration.

Datseris commented 3 years ago

Sure, if you have something concrete feel free to open a PR!

Libbum commented 3 years ago

It's something we've been interested in, but haven't kept an eye on recently. The reaction networks of Catalyst.jl for example were similar to what we may need to implement for an ABM last I checked. If there's an example you have in mind—happy to hear about it!

DhairyaLGandhi commented 3 years ago

I noticed the zombies and a couple other optimisation examples, which sound promising. I'm not well versed with this package specifically to be able to give very concrete ideas off the bat, but if we want to model things like a multi agent pong, virus spread, survival simulation or show a dP approach to openAI Gym for example.

AriMKatz commented 3 years ago

Are ABMs differentiable even in theory?

Libbum commented 3 years ago

In general: No. However there are subsets of ABMs that could theoretically be differentiable. Take a look at https://youtu.be/6U3YCfPDylk for one example of success.

AriMKatz commented 3 years ago

Interesting, thanks