There is a newer version of the record available.

Published April 25, 2025 | Version v3.2.0
Software Open

Mesa 3: Agent-based modeling with Python in 2025

Description

3.2.0 (2025-04-23)

Highlights

Mesa 3.2.0 is a feature-packed release which stabilizes our experimental spaces, improves many of our visualisation capabilities and includes new documentation and quality of life enhancements.

Stabilization of Discrete Space

The experimental Cell Space system has been stabilized and is now available as mesa.discrete_space (#2610). This powerful spatial modeling framework enables cell-centric simulations with integrated PropertyLayers and improved agent movement capabilities. Key improvements include:

  • Support for dynamic modifications to discrete spaces during simulation (#2755)
  • Methods to add/remove cells and connections in real-time
  • Full integration with PropertyLayers (#2440) for representing environmental variables
  • Compatible with all examples and existing visualizations

The PropertyLayer itself has also been stabilized, allowing for efficient management of spatial environmental properties like terrain, resources, or any grid-based variables. Core examples including Schelling, Game of Life, Boltzmann Wealth, and Virus on Network have been updated to use the new discrete space system.

Enhanced Visualization Experience

The SolaraViz visualization system has received substantial upgrades:

  • Command Console (#2697): An interactive Python console embedded directly in the visualization, allowing real-time model inspection and manipulation
  • Asynchronous Updates (#2656): Visualization now runs in a separate thread, dramatically improving performance for complex models
  • Dark Mode (#2689): Support for Solara Dark theme, automatically matching system preferences
  • Improved Error Handling (#2747, #2753): Better visualization of errors with options to view detailed traceback information
  • Enhanced UI: Arrow key navigation (#2725), movable input field with auto-scroll (#2710), and other quality-of-life improvements

Other Improvements

  • AgentSet's agg method now supports multiple aggregation functions in a single call (#2743), improving both performance and code readability
  • All core examples have been updated to take advantage of the new discrete space system
  • Comprehensive documentation updates, including clearer explanations of batch_run parallel processing (#2707)

These enhancements make Mesa 3.2.0 more powerful, flexible, and user-friendly for both newcomers and experienced modelers. The stabilization of key experimental features provides a solid foundation for building sophisticated agent-based models with more intuitive spatial representations.

What's Changed

🎉 New features added

  • Stabilize experimental Cell Space as mesa.discrete_space by @quaquel in https://github.com/projectmesa/mesa/pull/2610
  • Feat: Added Command Console by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2697
  • Stabilize PropertyLayer by @EwoutH in https://github.com/projectmesa/mesa/pull/2440

🛠 Enhancements made

  • Visualisation: Add dark mode by @sanika-n in https://github.com/projectmesa/mesa/pull/2689
  • Creating threads to update visualization asynchronously by @HMNS19 in https://github.com/projectmesa/mesa/pull/2656
  • Movable Input Field with auto-scroll by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2710
  • Feat: Added arrow key navigation by @Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2725
  • Debug option for errors in visualisation by @colinfrisch in https://github.com/projectmesa/mesa/pull/2747
  • Debug option for errors in visualisation front end by @colinfrisch in https://github.com/projectmesa/mesa/pull/2753
  • Add support for dynamic discrete spaces by @quaquel in https://github.com/projectmesa/mesa/pull/2755
  • Support multiple functions in AgentSet agg method by @EwoutH in https://github.com/projectmesa/mesa/pull/2743

🐛 Bugs fixed

  • Minor (bug) fixes to discrete_space by @quaquel in https://github.com/projectmesa/mesa/pull/2687
  • Fixed Marker in mpl by @sanika-n in https://github.com/projectmesa/mesa/pull/2670

🔍 Examples updated

  • Move boltzmann to cell spaces by @quaquel in https://github.com/projectmesa/mesa/pull/2680
  • Move Game of life to cell space by @quaquel in https://github.com/projectmesa/mesa/pull/2681
  • Move Schelling to discrete space by @quaquel in https://github.com/projectmesa/mesa/pull/2684
  • Move virus_on_a_network to discrete_space by @quaquel in https://github.com/projectmesa/mesa/pull/2688
  • Update boid_flockers example include flight direction by @sanika-n in https://github.com/projectmesa/mesa/pull/2696

📜 Documentation improvements

  • docs: Split off the overview page, extend with spaces/activation by @EwoutH in https://github.com/projectmesa/mesa/pull/2673
  • docs: Add Roles section to CONTRIBUTING.md by @EwoutH in https://github.com/projectmesa/mesa/pull/2694
  • [JOSS] Docs: Clarify difference between core and user examples by @EwoutH in https://github.com/projectmesa/mesa/pull/2706
  • [JOSS] docs: Improve batch_run documentation for parallel processing by @EwoutH in https://github.com/projectmesa/mesa/pull/2707
  • JOSS Tutorial Fixes by @tpike3 in https://github.com/projectmesa/mesa/pull/2708
  • Clean-up old images, compress wolf-sheep image, remove version switch artifact by @EwoutH in https://github.com/projectmesa/mesa/pull/2717
  • docs: Update citation to JOSS article by @EwoutH in https://github.com/projectmesa/mesa/pull/2740
  • update intro tutorial discrete space by @tpike3 in https://github.com/projectmesa/mesa/pull/2731

Other changes

  • added property_layer with altair by @sanika-n in https://github.com/projectmesa/mesa/pull/2643

New Contributors

  • @colinfrisch made their first contribution in https://github.com/projectmesa/mesa/pull/2747

Full Changelog: https://github.com/projectmesa/mesa/compare/v3.1.4...v3.2.0

Notes

If you use this software, please cite our article in the Journal of Open Source Software.

Files

projectmesa/mesa-v3.2.0.zip

Files (594.4 kB)

Name Size Download all
md5:3e0783e76494c132ef3eb6365d02626b
594.4 kB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/projectmesa/mesa/tree/v3.2.0 (URL)

Software