Mesa

Latest version: v3.1.5

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 12

3.1.4

Highlights
This release contains various improvements and bugfixes to the matplotlib-based visualization of spaces. Hexgrids are now fully supported, including property layers. In making this possible, various minor bugs were encountered and also fixed. In addition to the visualization improvements, there are various minor convenience improvements to the docs.


What's Changed
๐Ÿ›  Enhancements made
* Fixed hex-space draw function to avoid overlaps by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2609
* Fix: Property layer visualization for HexGrid by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2646
* Enhance DataCollector to validate model_reporters functions by peter-kinger in https://github.com/projectmesa/mesa/pull/2605
* Implemented post_process in Altair based components by sanika-n in https://github.com/projectmesa/mesa/pull/2641
๐Ÿ› Bugs fixed
* bugfix for draw_property_layer by quaquel in https://github.com/projectmesa/mesa/pull/2639
* Uses array for hex grid property layer fix by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2651
* Update Binder environment to use latest Mesa version (2652) by aarav-shukla07 in https://github.com/projectmesa/mesa/pull/2655
* Change Hexgrid._connect_cells_2d to use x,y coordinates by quaquel in https://github.com/projectmesa/mesa/pull/2632
๐Ÿ” Examples updated
* Added property layer viz to sugarscape by sanika-n in https://github.com/projectmesa/mesa/pull/2653
* added color-bar for spice by sanika-n in https://github.com/projectmesa/mesa/pull/2622
๐Ÿ“œ Documentation improvements
* remove any reference to using --pre by quaquel in https://github.com/projectmesa/mesa/pull/2618
* Updated Docs by sanika-n in https://github.com/projectmesa/mesa/pull/2624
* Fixed 404 error for Examples Tab in Introductory Tutorial (2662) by aarav-shukla07 in https://github.com/projectmesa/mesa/pull/2664
* Documentation by Spartan-71 in https://github.com/projectmesa/mesa/pull/2630
* Adding a copy option at the top of the code written in the docs by PrashantChoudhary13579 in https://github.com/projectmesa/mesa/pull/2628
* Adding Mesa Extension page by PrashantChoudhary13579 in https://github.com/projectmesa/mesa/pull/2627
๐Ÿ”ง Maintenance
* remove remnants of mesa cli by quaquel in https://github.com/projectmesa/mesa/pull/2617
* benchmarks.yml: Install SciPy and use uv for pip install by EwoutH in https://github.com/projectmesa/mesa/pull/2633
* [pre-commit.ci] pre-commit autoupdate by pre-commit-ci in https://github.com/projectmesa/mesa/pull/2659

New Contributors
* PrashantChoudhary13579 made their first contribution in https://github.com/projectmesa/mesa/pull/2628
* aarav-shukla07 made their first contribution in https://github.com/projectmesa/mesa/pull/2655
* peter-kinger made their first contribution in https://github.com/projectmesa/mesa/pull/2605

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

3.1.3

Highlights
Mesa 3.1.3 introduces a major experimental reimplementation of Mesa's continuous space, providing an intuitive agent-centric API and significant performance improvements. The new implementation supports n-dimensional spaces and offers streamlined methods for agent movement and neighbor calculations.

New Continuous Space Features
- Agent-centric movement API similar to cell spaces
- Efficient neighbor calculations and position updates
- Support for n-dimensional spaces
- Improved memory management with dynamic array resizing

Here's a quick look at the new API:

python
Create a 2D continuous space
space = ContinuousSpace(
dimensions=[[0, 1], [0, 1]],
torus=True,
random=model.random
)

Create and position an agent
agent = ContinuousSpaceAgent(space, model)

3.1.2

Highlights
Mesa v3.1.2 is a patch release containing updates to our wolf-sheep, shelling and prisoner's dilemma example models and improving documentation in the tutorials and visualisation docstring. No functional changes to the core library were made.

What's Changed
๐Ÿ” Examples updated
* examples/wolf_sheep: Don't allow dumb moves by EwoutH in https://github.com/projectmesa/mesa/pull/2503
* Added homophily ratio in basic schelling example by vbv-shm in https://github.com/projectmesa/mesa/pull/2520
* examples: Update pd_grid analysis.ipynb to use new spaces by quaquel in https://github.com/projectmesa/mesa/pull/2553
๐Ÿ“œ Documentation improvements
* Corrected a few errors in Intro tutorial by sanika-n in https://github.com/projectmesa/mesa/pull/2583
* Small draw_space docstring fix by quaquel in https://github.com/projectmesa/mesa/pull/2554
* fix: model name in visualization tutorial by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2591

New Contributors
* vbv-shm made their first contribution in https://github.com/projectmesa/mesa/pull/2520
* sanika-n made their first contribution in https://github.com/projectmesa/mesa/pull/2583

**Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.1.1...v3.1.2

3.1.1

Highlights
Mesa 3.1.1 is a maintenance release that includes visualization improvements and documentation updates. The key enhancement is the addition of an interactive play interval control to the visualization interface, allowing users to dynamically adjust simulation speed between 1ms and 500ms through a slider in the Controls panel.

Several example models were updated to use Mesa 3.1's recommended practices, particularly the `create_agents()` method for more efficient agent creation and NumPy's `rng.integers()` for random number generation. The Sugarscape example was modernized to use PropertyLayers.

Bug fixes include improvements to PropertyLayer visualization and a correction to the Schelling model's neighbor similarity calculation. The tutorials were also updated to reflect current best practices in Mesa 3.1.

What's Changed
๐ŸŽ‰ New features added
* Add Interactive Play Interval Control to Mesa Visualization by AdamZh0u in https://github.com/projectmesa/mesa/pull/2540
๐Ÿ› Bugs fixed
* bug fixes for draw_property_layers by quaquel in https://github.com/projectmesa/mesa/pull/2548
๐Ÿ” Examples updated
* Wolf-sheep to use `create_agent` by quaquel in https://github.com/projectmesa/mesa/pull/2543
* Shift sugarscape example to using create_agent by quaquel in https://github.com/projectmesa/mesa/pull/2544
* Fix: Schelling Model Neighbor Similarity Calculation by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2518
* Change pd_grid example to use create_agents by quaquel in https://github.com/projectmesa/mesa/pull/2545
* Switch sugarscape to using property layers by quaquel in https://github.com/projectmesa/mesa/pull/2546
๐Ÿ“œ Documentation improvements
* Updated docs and check_model param by nissu99 in https://github.com/projectmesa/mesa/pull/2510
* Update tutorials to use `create_agents` and `rng.integers` by DarshPareek in https://github.com/projectmesa/mesa/pull/2541

New Contributors
* nissu99 made their first contribution in https://github.com/projectmesa/mesa/pull/2510
* DarshPareek made their first contribution in https://github.com/projectmesa/mesa/pull/2541

**Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.1.0...3.1.1

3.1.0

Highlights
With Mesa 3.1.0 we're back on our regular release schedule after the big Mesa 3.0 release, with some exciting new features.

This release adds experimental support for Observables and Computed, enabling a more reactive and responsive programming model for agent-based simulations. The new `Observable` and `Computable` classes allow developers to declaratively define attributes that automatically emit signals when their values change, and compute derived values that update dynamically. This lays the groundwork for more advanced event handling and data visualization features in future releases (2291).

The experimental cell space module has been updated with full support for n-dimensional property layers. These allow agents to easily interact with and modify spatial properties of the environment, such as terrain, resources, or environmental conditions. The new implementation provides a more intuitive attribute-based API and ensures tight integration with the cell space architecture (2512).

Mesa now includes built-in support for logging using the standard Python `logging` module. This provides developers with a flexible and powerful way to add structured diagnostic and debug output to their simulations, without the need for custom logging solutions. The logging system is integrated throughout the library, including the new SolaraViz visualization system (2506).

Creating multiple agents with varying initialization parameters is now significantly easier with the new `Agent.create_agents` class method. This factory function supports both uniform and per-agent parameters, simplifying the code required to set up a simulation with a large number of heterogeneous agents (2351).

In addition to the major new features, this release includes a number of smaller enhancements and bug fixes that improve the overall developer experience. These include removing deprecated functionality, cleaning up examples, and addressing various edge cases reported by the community. Mesa 3.1 requires Python 3.11 or higher.

What's Changed
๐Ÿงช Experimental features
* Add support for Observables to MESA by quaquel in https://github.com/projectmesa/mesa/pull/2291
* Add full support for property layers to cell spaces by quaquel in https://github.com/projectmesa/mesa/pull/2512
๐ŸŽ‰ New features added
* Add logging to MESA by quaquel in https://github.com/projectmesa/mesa/pull/2506
* Add `create_agents` factory method to Agent by quaquel in https://github.com/projectmesa/mesa/pull/2351
๐Ÿ” Examples updated
* Add seed control to all examples by quaquel in https://github.com/projectmesa/mesa/pull/2496
๐Ÿ“œ Documentation improvements
* doc fix for pip install error on mac by quaquel in https://github.com/projectmesa/mesa/pull/2508
* Refactored docs for Introductory Tutorial by Spartan-71 in https://github.com/projectmesa/mesa/pull/2511
* Add module-level docstring to experimental features by EwoutH in https://github.com/projectmesa/mesa/pull/2532
๐Ÿ”ง Maintenance
* Remove deprecated time module by EwoutH in https://github.com/projectmesa/mesa/pull/2476
* Drop support for Python 3.10, require Python >= 3.11 by EwoutH in https://github.com/projectmesa/mesa/pull/2474
* Remove deprecated functionality by EwoutH in https://github.com/projectmesa/mesa/pull/2483
* Remove visualization modules from `mesa.experimental` by quaquel in https://github.com/projectmesa/mesa/pull/2495
* Cleanup two occurrences of removed scheduler by EwoutH in https://github.com/projectmesa/mesa/pull/2499
* move _setup_agent_registration into `Model.__init__` by quaquel in https://github.com/projectmesa/mesa/pull/2501
* remove devs related examples from devs/examples by quaquel in https://github.com/projectmesa/mesa/pull/2507
* added empty iterable checks and updated tests by Sahil-Chhoker in https://github.com/projectmesa/mesa/pull/2523
* Fix: running Mesa in Docker with Schelling model by AdamZh0u in https://github.com/projectmesa/mesa/pull/2524

New Contributors
* Spartan-71 made their first contribution in https://github.com/projectmesa/mesa/pull/2511
* Sahil-Chhoker made their first contribution in https://github.com/projectmesa/mesa/pull/2523
* AdamZh0u made their first contribution in https://github.com/projectmesa/mesa/pull/2524

**Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.3...v3.1.0

3.0.3

Highlights
A small bugfix release that fixes two bugs.

What's Changed
๐Ÿงช Experimental features
* cell_space: Allow CellCollection to be empty by EwoutH in https://github.com/projectmesa/mesa/pull/2502
๐Ÿ› Bugs fixed
* Only set model_parameters once by Corvince in https://github.com/projectmesa/mesa/pull/2505

**Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.0.2...v3.0.3

Page 1 of 12

ยฉ 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.