Agentpy - Agent-based modeling in Python

Hi everyone,

I am new to this forum and happy to share my package for agent-based modeling in Python! The project is still in an early stage of development. If you want to contribute or have feedback, let me know :slight_smile:

Documentation: https://agentpy.readthedocs.io
Source: https://github.com/joelforamitti/

Here are some main features:

  • Design of agent-based models with complex procedures.
  • Creation of custom agent types, environments, and networks.
  • Container classes for operations on groups of agents and environments.
  • Experiments with repeated iterations, large parameter samples, and distinct scenarios.
  • Output data that can be saved, loaded, and transformed for further analysis.
  • Tools for sensitivity analysis, interactive output, animations, and plots.

In the model library of the documentation, you can find examples of wealth transfers, disease spreading, random networks, and forest fires. You can use these as tutorials, or also to compare the syntax and tools to other existing frameworks like Mesa or Netlogo.

Here is an example from an animation in one of the demonstration models:

ElW8ZlLXYAAWN-2

Best,
Joël

Thanks for sharing, @joelforamitti ! Would you be willing to explain more about why you decided to build this framework instead of using or contributing to Mesa? I didn’t see anything in the docs besides Mesa being more similar to NetLogo. (as a side note, you might want to consider following the Python PEP8 Style Guidelines more closely in your examples and codebase while you’re still in the early stages).

Regardless, congratulations on your first release! Competition is always a good thing and helps spur innovation :sweat_smile:!

Hi @alee, I’ve deleted the last post since there is now an updated comparison page on the documentation Comparison — agentpy 0.1.3.dev0 documentation