Skip to content

v3.0 alpha 5 (pre-release)

Pre-release
Pre-release
Compare
Choose a tag to compare
@EwoutH EwoutH released this 22 Sep 07:38
· 274 commits to main since this release
6219c5e

Highlights

Mesa v3.0 alpha 5 release contains many quality of life updates, a big new feature for the DataCollector and a major deprecation.

The entire mesa.time module, including all schedulers, has been deprecated (#2306). Users are encouraged to transition to AgentSet functionality for more flexible and explicit agent activation patterns. Check the migration guide on how to upgrade.

The DataCollector now supports collecting data from specific Agent subclasses using the new agenttype_reporters parameter (#2300). This allows collecting different metrics for different agent types. For example:

self.datacollector = DataCollector(
    agenttype_reporters={
        Wolf: {"sheep_eaten": "sheep_eaten"},
        Sheep: {"wool": "wool_amount"}
    }
)

Furthermore, a new shuffle_do() method for AgentSets provides a faster way to perform shuffle().do() (#2283). The GroupBy class gained count() and agg() methods to count the number of agents in groups and aggregate variables of them (#2290).

In the experimental Cell Space, the CellCollection.select method was updated to use at_most instead of n, aligning with the AgentSet API (#2307). Cell connections in grids and networks are now public and named for more intuitive agent movements (#2296). Additionally, the Cell class now features a dedicated neighborhood property for direct neighbors (default radius=1) and a get_neighborhood method for larger radii (#2309).

Finally, SolaraViz received updates improving its interface and performance (#2299, #2304). The Model class initialization process was simplified by moving random seed and random object creation to __init__ (#1940). Documentation has been extensively updated, including enforcing Google docstrings (#2294) and reorganizing the API documentation (#2298) for better clarity and navigation.

While the Mesa 3.0 timeline is still being discussed, we're aiming at the first Mesa 3.0 beta in October followed by a stable release in November. Testing new features and sharing feedback is appreciated!

What's Changed

🎉 New features added

  • GroupBy: Add count and agg methods by @EwoutH in #2290
  • datacollector: Allow collecting data from Agent (sub)classes by @EwoutH in #2300
  • Add optimized shuffle_do() method to AgentSet by @EwoutH in #2283

🛠 Enhancements made

🧪 Experimental features

  • Make cell connections public and named by @Corvince in #2296
  • Update to CellCollection.select by @quaquel in #2307
  • Have a dedicated neighborhood property and a get_neighborhood method on Cell by @quaquel in #2309

📜 Documentation improvements

  • Enforce google docstrings by @quaquel in #2294
  • Api docs by @quaquel in #2298
  • update migration guide to describe solaraviz updates by @Corvince in #2297
  • Migration Guide: Add Model initialization requirement and automatic Agent.unique_id assignment by @EwoutH in #2302
  • Deprecate Time module and all its Schedulers by @EwoutH in #2306
  • intro_tutorial: Don't initialize agents with an unique_id by @EwoutH in #2315
  • Migration guide: Intro, upgrade strategy, model.agents, headers by @EwoutH in #2314

🔧 Maintenance

  • make typing behavior of AgentSet.get explicit by @quaquel in #2293
  • model: Move random seed and random to init by @rht in #1940
  • Remove schedulers from benchmark models. by @quaquel in #2308

Full Changelog: v3.0.0a4...v3.0.0a5