Skip to content

Releases: projectmesa/mesa

v3.2.0

08 May 09:37
773ad91
Compare
Choose a tag to compare

Highlights

Mesa 3.2.0 is a feature-packed release, which stabilizes our discrete space, improves many of our visualisation capabilities, improves our tutorial organization, adds the experimental meta-agents, and includes other quality of life enhancements.

We also celebrate the publication of our peer-reviewed Mesa 3 paper in JOSS. See the updated Citing Mesa section on how to cite us.

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
  • PropertyLayer visualisation in Altair (#2643): Support for visualising PropertyLayers using the Altair frontend in Solara.

Restructured and updated tutorial

Our introduction tutorial has been completely restructured (#2731). Instead of one huge notebook, the tutorial is now divided into smaller, focused modules that build progressively:

  • Creating Your First Model: Essential basics to get started
  • Adding Space: Learn how to use the new discrete space system
  • Collecting Data: Effectively gather model statistics
  • AgentSet: Master agent management techniques
  • Visualization: Series of modules covering basic to advanced visualization

Introducing Meta-Agents

Complex systems often have multiple levels of components. An organization is not one entity, but is made of departments, sub-departments, and people. A person is not a single entity, but it is made of micro biomes, organs and cells. A city is not a single entity, but it is made of districts, neighborhoods, buildings, and people. A forest comprises an ecosystem of trees, plants, animals, and microorganisms.

This reality is the motivation for meta-agents. It allows users to represent these multiple levels, where each level can have meta-agents with constituting agents.

To demonstrate meta-agents capability there are two examples:

  1. Dynamic meta-agent creation - Alliance formation, which shows emergent meta-agent formation through a game theoretic based alliance formation.
  2. Deliberate meta-agent creation - Warehouse model, which provides a pseudo warehouse model to demonstrate meta-agent functionality.

Let us know what you think on our Matrix Channel

Other improvements

  • AgentSet's agg method now supports multiple aggregation functions in a single call (#2743)
  • Many documentation improvements have been made based on feedback by our JOSS reviewers

What's Changed

🎉 New features added

🛠 Enhancements made

🔍 Examples updated

📜 Documentation improvements

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

🧪 Experimental features

🐛 Bugs fixed

New Contributors

Full Changelog: v3.1.4...v3.2.0

v3.1.5

26 Mar 11:11
59101b8
Compare
Choose a tag to compare

Highlights

Mesa 3.1.5 is a maintenance release focused on improving documentation and cleaning up our resources. This update includes no breaking changes and is compatible with previous 3.1.x releases.

The documentation improvements include enhanced explanations for batch run parallel processing, a significantly expanded overview section covering spaces, property layers and time advancement methods with practical code examples, and a clearer installation guide detailing what the optional [rec] dependencies provide. We've also improved our examples documentation to better distinguish between core and user-contributed examples, and added a new "Roles" section to the contributing guide that outlines the project's community structure and progression paths.

On the maintenance side, we've cleaned up unused images and compressed existing ones, reducing the repository size by over 2MB and distribution size from 3.2MB to 1.2MB.

We recommend all users update to this release for the improved documentation.

What's Changed

📜 Documentation improvements

  • docs: Split off the overview page, extend with spaces/activation by @EwoutH in #2673
  • docs: Add Roles section to CONTRIBUTING.md by @EwoutH in #2694
  • [JOSS] Docs: Clarify difference between core and user examples by @EwoutH in #2706
  • [JOSS] docs: Improve batch_run documentation for parallel processing by @EwoutH in #2707
  • Clean-up old images, compress wolf-sheep image, remove version switch artifact by @EwoutH in #2717

Full Changelog: v3.1.4...v3.1.5

v3.1.4

09 Feb 18:20
8c24e1b
Compare
Choose a tag to compare

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

🐛 Bugs fixed

🔍 Examples updated

📜 Documentation improvements

🔧 Maintenance

New Contributors

Full Changelog: v3.1.3...v3.1.4

v3.1.3

11 Jan 15:59
cfb1925
Compare
Choose a tag to compare

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:

# 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)
agent.position = [0.5, 0.5]

# Move agent using vector arithmetic
agent.position += [0.1, 0.1]

# Get neighbors within radius
neighbors, distances = agent.get_neighbors_in_radius(radius=0.2)

# Find k nearest neighbors
nearest, distances = agent.get_nearest_neighbors(k=5)

The new implementation particularly benefits models requiring frequent position updates and neighbor queries, such as flocking simulations or particle systems. See PR #2584 and the API documentation for more details. We would love to get feedback on the new Continuous Space in #2611.

Other improvements in this release include consistent visualization behavior across space types with the reimplementation of draw_voronoi #2608, and a new render interval slider for controlling visualization update frequency in SolaraViz, which helps improve performance when working with complex visualizations #2596. We've also fixed a bug affecting random number generation determinism when using Model(seed=something), ensuring both model.random and model.rng now behave consistently when seeded with the same initial value #2598.

What's Changed

🧪 Experimental features

🛠 Enhancements made

  • reimplementation of draw_voroinoi by @quaquel in #2608
  • Add render interval slider to control visualization update frequency by @HMNS19 in #2596

🐛 Bugs fixed

🔍 Examples updated

  • Clarify ContinuousSpace.get_neighbors behavior with multiple agents at same position by @quaquel in #2599

New Contributors

Full Changelog: v3.1.2...v3.1.3

v3.1.2

04 Jan 13:14
b8230a3
Compare
Choose a tag to compare

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 #2503
  • Added homophily ratio in basic schelling example by @vbv-shm in #2520
  • examples: Update pd_grid analysis.ipynb to use new spaces by @quaquel in #2553

📜 Documentation improvements

New Contributors

Full Changelog: v3.1.1...v3.1.2

v3.1.1

14 Dec 16:25
393f6a0
Compare
Choose a tag to compare

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 #2540

🐛 Bugs fixed

🔍 Examples updated

📜 Documentation improvements

New Contributors

Full Changelog: v3.1.0...3.1.1

v3.1.0

04 Dec 19:39
03ce5f0
Compare
Choose a tag to compare

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 #2291
  • Add full support for property layers to cell spaces by @quaquel in #2512

🎉 New features added

🔍 Examples updated

📜 Documentation improvements

🔧 Maintenance

New Contributors

Full Changelog: v3.0.3...v3.1.0

v3.0.3

13 Nov 23:29
9543815
Compare
Choose a tag to compare

Highlights

A small bugfix release that fixes two bugs.

What's Changed

🧪 Experimental features

  • cell_space: Allow CellCollection to be empty by @EwoutH in #2502

🐛 Bugs fixed

Full Changelog: v3.0.2...v3.0.3

v3.0.2

11 Nov 14:52
8da32e2
Compare
Choose a tag to compare

Highlighst

Mesa 3.0.2 is a small follow-up patch release to Mesa 3.0, in which we fixed a lot of small bugs in the example models their visualisation, and improved their testing.

What's Changed

🐛 Bugs fixed

  • allow components as a positional argument again by @Corvince in #2488

🔍 Examples updated

  • examples: Add required components keyword by @EwoutH in #2485
  • examples: Fix boid_flockers viz by @EwoutH in #2492
  • examples: Fix schelling viz by @EwoutH in #2490
  • example: Add input sliders to Sugerscape viz by @EwoutH in #2487
  • examples/gol: Add initial fraction alive, add sliders to viz by @EwoutH in #2489

🔧 Maintenance

Full Changelog: v3.0.1...v3.0.2

v3.0.1

11 Nov 10:16
7430eca
Compare
Choose a tag to compare

Highlights

After our huge 3.0.0 release, Mesa 3.0.1 follows up with two improvements to experimental features, examples and docs.

What's Changed

🧪 Experimental features

🛠 Enhancements made

🔍 Examples updated

  • Integrate benchmarks and example models by @EwoutH in #2473

📜 Documentation improvements

  • docs/tutorial: Replace scheduler in MoneyModel by @EwoutH in #2475
  • docs: update migration_guide.md by @eltociear in #2480
  • Update some DeprecationWarnings to note they are removed in Mesa 3.1 by @EwoutH in #2481

New Contributors

Full Changelog: v3.0.0...v3.0.1