Abmax is a general-purpose agent-based modeling(ABM) framework in Jax It provides:
- Two algorithms to apply unique updates to a dynamic number of agents selected during run-time. Both are JIT friendly and can be vectorized across different number of models
- Rank-Match (RM)
- Sort-Count-Iterate (SCI)
- JAX-transformation-friendly data structures and functions that can be used to define sets of agents and their manipulations.
- Selecting agents based on a run-time determined key.
- Searching and sorting agents based on their attributes.
- Updating an arbitrary number of agents to a specific state.
- Stepping agents in a vectorized way.
- Running multiple such simulations in parallel.
- Implementation of common algorithms used in ABM implemented in vmap and jit friendly way.
Paper
Preprint available here
Installation
pip install abmax
Dependencies:
Benchmark
A comparison of the performance of Abmax with other ABM frameworks: Agents.jl and Mesa based on the Wolf-Sheep (Grid space) and Bird-Flock (Continuous space) models. These simulations are run for 100 steps and the median time taken for 10 runs is logged in ms. The benchmark is run on a gcn GPU node(Intel Xeon Platinum 8360Y + Nvidia A100) of the Snelius cluster The number of initial agents for these simulations are as follows:
- Wolf-Sheep small: 600 sheep, 400 wolves on a 100 x 100 grid
- Wolf-Sheep large: 6000 sheep, 4000 wolves on a 1000 x 1000 grid
| Model | Agents.jl | Abmax RM | Abmax SCI | Mesa |
|---|---|---|---|---|
| Wolf-Sheep small | 14.93 | 50.26 | 726.78 | 1333.047 |
| Wolf-Sheep large | 685.03 | 3315.88 | 5455.01 | 170070.95 |
In Abmax, we can run multiple simulations in parallel because of automatic batching and vectorization. Here is a trend in running different numbers of wolf-sheep small models in parallel.
| Number of models | 10 | 20 | 50 | 100 | 200 | 500 |
|---|---|---|---|---|---|---|
| time taken (s) | 5.75 | 6.81 | 7.32 | 8.52 | 8.617 | 14.32 |
Note: All times that are reported, are excluding the model setup time.
Examples
tutorials in the form of Python notebooks can be found in the Example section, currently they include:
- Finance markets
- Traffic simulation
- Predation model
Citation
If you use Abmax in your work, please consider citing it as follows:
@misc{chaturvedi2025abmax,
title={Abmax: A JAX-based Agent-based Modeling Framework},
author={Siddharth Chaturvedi and Ahmed El-Gazzar and Marcel van Gerven},
year={2025},
eprint={2508.16508},
archivePrefix={arXiv},
primaryClass={cs.MA}
}
Metadata
Release files for abmax 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| abmax-0.0.8.tar.gz | 16.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abmax-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.8 kB
Release files / abmax-0.0.8.tar.gz
| Download URL | abmax-0.0.8.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5c0c3987c158657013fa628af5f2fcccae8811aefc398ded8fffa4c79fe33fd
|
|
BLAKE2b-256 checksum How to use checksums |
a30ee8e025e6a081ac663c32d8cc3b8f0a07e8d2786c511fbf726159eac67cbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / abmax-0.0.8-py3-none-any.whl
| Download URL | abmax-0.0.8-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b82dd953c5e41b19daeb340badb7431b9585442fe6c77606bb356f0f42e38da
|
|
BLAKE2b-256 checksum How to use checksums |
7bfa1112676b21da4b813d212fd413c149bbcad9b8750f0ef0927ed320eb5b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for abmax 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.