Skip to content

Commit cfb1925

Browse files
authored
Update release notes and version for 3.1.3 (#2612)
Update version and release notes for the next feature release, Mesa 3.1.3.
1 parent db0225b commit cfb1925

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

HISTORY.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,60 @@
11
---
22
title: Release History
33
---
4+
# 3.1.3 (2025-01-11)
5+
## Highlights
6+
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.
7+
8+
### New Continuous Space Features
9+
- Agent-centric movement API similar to cell spaces
10+
- Efficient neighbor calculations and position updates
11+
- Support for n-dimensional spaces
12+
- Improved memory management with dynamic array resizing
13+
14+
Here's a quick look at the new API:
15+
16+
```python
17+
# Create a 2D continuous space
18+
space = ContinuousSpace(
19+
dimensions=[[0, 1], [0, 1]],
20+
torus=True,
21+
random=model.random
22+
)
23+
24+
# Create and position an agent
25+
agent = ContinuousSpaceAgent(space, model)
26+
agent.position = [0.5, 0.5]
27+
28+
# Move agent using vector arithmetic
29+
agent.position += [0.1, 0.1]
30+
31+
# Get neighbors within radius
32+
neighbors, distances = agent.get_neighbors_in_radius(radius=0.2)
33+
34+
# Find k nearest neighbors
35+
nearest, distances = agent.get_nearest_neighbors(k=5)
36+
```
37+
38+
The new implementation particularly benefits models requiring frequent position updates and neighbor queries, such as flocking simulations or particle systems. See [#2584](https://github.com/projectmesa/mesa/pull/2584) for more details. We would love to get feedback on the new Continuous Space in [#2611](https://github.com/projectmesa/mesa/discussions/2611).
39+
40+
Other improvements in this release include consistent visualization behavior across space types with the reimplementation of `draw_voronoi` [#2608](https://github.com/projectmesa/mesa/pull/2608), and a new render interval slider for controlling visualization update frequency in SolaraViz, which helps improve performance when working with complex visualizations [#2596](https://github.com/projectmesa/mesa/pull/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](https://github.com/projectmesa/mesa/pull/2598).
41+
42+
## What's Changed
43+
### 🧪 Experimental features
44+
* Reimplementation of Continuous Space by @quaquel in https://github.com/projectmesa/mesa/pull/2584
45+
### 🛠 Enhancements made
46+
* reimplementation of draw_voroinoi by @quaquel in https://github.com/projectmesa/mesa/pull/2608
47+
* Add render interval slider to control visualization update frequency by @HMNS19 in https://github.com/projectmesa/mesa/pull/2596
48+
### 🐛 Bugs fixed
49+
* Bugfix for non deterministic rng behavior by @quaquel in https://github.com/projectmesa/mesa/pull/2598
50+
### 🔍 Examples updated
51+
* Clarify ContinuousSpace.get_neighbors behavior with multiple agents at same position by @quaquel in https://github.com/projectmesa/mesa/pull/2599
52+
53+
## New Contributors
54+
* @HMNS19 made their first contribution in https://github.com/projectmesa/mesa/pull/2596
55+
56+
**Full Changelog**: https://github.com/projectmesa/mesa/compare/v3.1.2...v3.1.3
57+
458
# 3.1.2 (2025-01-04)
559
## Highlights
660
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.

mesa/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
]
2323

2424
__title__ = "mesa"
25-
__version__ = "3.1.2"
25+
__version__ = "3.1.3"
2626
__license__ = "Apache 2.0"
2727
_this_year = datetime.datetime.now(tz=datetime.UTC).date().year
2828
__copyright__ = f"Copyright {_this_year} Project Mesa Team"

0 commit comments

Comments
 (0)