StochasticAD.jl
Agents.jl
StochasticAD.jl | Agents.jl | |
---|---|---|
3 | 13 | |
181 | 691 | |
- | 1.6% | |
8.7 | 8.8 | |
19 days ago | 6 days ago | |
Julia | Julia | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
StochasticAD.jl
-
Yann Lecun: ML would have advanced if other lang had been adopted versus Python
This is disregarding the development of said ecosystems though. The point is that Python has been quite inhibitory to the development of this ecosystem. There are many corpses of automatic differentiation libraries (starting from autograd and tangent and then to things like theano to finally tensorflow and pytorch) and many corpses of JIT compilers and accelerators (Cython, Numba, pypy, and TensorFlow XLA, now PyTorch v2's JIT, etc.).
What has been found over the last decade is that a large part of that is due to the design of the languages. Jan Vitek for example has a great talk which describes how difficult it is to write a JIT compiler for R due to certain design choices in the language (https://www.youtube.com/watch?v=VdD0nHbcyk4, or the more detailed version https://www.youtube.com/watch?v=HStF1RJOyxI). There are certain language constructs that void lots of optimizations which have to then be worked around, which is why Python JITs choose subsets of the language to avoid specific parts that are not easy to optimize or not possible to optimize. This is why each take a domain-specific subset, a different subset of the language for numba vs jax vs etc., to choose something that is nice for ML vs for more generic codes.
With all of that, it's perfectly reasonable to point out that there have been languages which have been designed to not have the compilation difficulties, which have resulted having a single (JIT) compiler for the language. And by extension, it has made building machine learning and autodiff libraries not something that's a Google or Meta scale project (for example, PyTorch involves building GPU code bindings and a specialized JIT, not something very accessible). Julia is a language to point to here, but I think well-designed static languages like Rust also deserve a mention. How much further would we have gone if every new ML project didn't build a new compiler and a new automatic differentiation engine? What if the development was more modular and people could easy just work on the one thing they cared about?
As a nice example, for last NeurIPS we put out a paper on automatic differentiation of discrete stochastic models, i.e. extending AD to automatically handle cases like agent-based models. The code is open source (https://github.com/gaurav-arya/StochasticAD.jl), and you can see it's almost all written by a (talented) undergraduate over a span of about 6 months. It requires the JIT compilation because it works on a lot of things that are not solely in big matrix multiplication GPU kernels, but Julia provides that. And multiple dispatch gives GPU support. Done. The closest thing in PyTorch, storchastic, gets exponential scaling instead of StochasticAD's linear, and isn't quite compatible with a lot of what's required for ML, so it benchmarks as thousands of times slower than the simple Julia code. Of course, when Meta needs it they can and will put the minds of 5-10 top PhDs on it to build it out into a feature of PyTorch over 2 years and have a nice release. But at the end of the day we really need to ask, is that how it should be?
-
[P] Stochastic Differentiable Programming: Unbiased Automatic Differentiation for Discrete Stochastic Programs (such as particle filters, agent-based models, and more!)
Found relevant code at https://github.com/gaurav-arya/StochasticAD.jl + all code implementations here
Agents.jl
- Ask HN: I just want to have fun programming again
-
[P] Stochastic Differentiable Programming: Unbiased Automatic Differentiation for Discrete Stochastic Programs (such as particle filters, agent-based models, and more!)
We mean the standard "agent based model" https://www.pnas.org/doi/10.1073/pnas.082080899, https://en.wikipedia.org/wiki/Agent-based_model . The kind of thing you'd use Agents.jl for. For example, look at agent-based infection models. In these kind of models you create many individuals (agents) with rules. Each agent moves around, but if one is standing near an agent that is infected, there's a probability of infecting the nearby agent. What is the average percentage of infected people at time t?
-
What are the Netlogo competitors?
Jullia has packages too.
-
Julia ♥ Agent Based Modeling #2: Work, Eat, Trade, Repeat
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...
-
Tetris game as Agent-Based modeling: maximizing density
Are the pieces the agents? I would recommend looking at Collaborative Diffusion for some examples of combining agent-based techniques with game modeling. As for frameworks, check out agentpy or Agents.jl for alternatives that are moreso software libraries that presume knowledge of programming.
-
What framework would you recommend to build a Tetris game AI using reinforcement learning?
I has a look to Julia too. There are nice tools build by JuliaDynamics. I.e. Agents.jl for agent based modeling. It handles collisions. There is also a framework for reinforcement learning. Also for Genetic Algorithms. Then I found a set of libraries related to Geometry. But it seems to be a lot of work to put that together for my use case.
- What would you like to see in a complex systems modeling software platform?
-
Transition from R Tidyverse to Julia (VS Code)
For agent based modelling, you've come to the right place because Agents.jl is great! It has a way to get interactive visualisations from your models, although I haven't used it myself. See this year's JuliaCon talk about Agents.jl to get an idea of what it can do.
-
Agent Based Simulation
I'm always happy to find you have documentation ;). The doc from https://github.com/JuliaDynamics/Agents.jl was pretty helpful to a noob like me.
-
"No backend available" error when using InteractiveDynamics
Here is the issue. Someone already commented saying it's due to a change in InteractiveDynamics.jl and referenced a pull request. I guess all we need to do is wait.
What are some alternatives?
julia - The Julia Programming Language
Molly.jl - Molecular simulation in Julia
RecursiveFactorization
mesa - Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.
Zygote.jl - 21st century AD
LanguageServer.jl - An implementation of the Microsoft Language Server Protocol for the Julia language.
Octavian.jl - Multi-threaded BLAS-like library that provides pure Julia matrix multiplication
NetLogo - turtles, patches, and links for kids, teachers, and scientists
Distributions.jl - A Julia package for probability distributions and associated functions.
Chain.jl - A Julia package for piping a value through a series of transformation expressions using a more convenient syntax than Julia's native piping functionality.
ReinforcementLearning.jl - A reinforcement learning package for Julia
KernelAbstractions.jl - Heterogeneous programming in Julia