Repository navigation
Add examples/experimental group and move alliance_formation into it - #3785
Conversation
The alliance formation example is built on `mesa.experimental.meta_agents`, which carries no semver guarantees, so it doesn't belong alongside the advanced examples. Add a third `mesa/examples/experimental/` group and move the example there in full. Also fixes the package's `__init__ .py` (leading space), which meant the example directory had no real `__init__.py`, and adds the example to examples/README.md under a new Experimental section. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Hi @tpike3, I went ahead and implemented the refactor as we discussed. Would appreciate if you or @jackiekazil could give a quick review |
|
Performance benchmarks:
|
|
Hi @codebreaker32 and @tpike3, I'm coming back to this one with a question. Some history: when the core examples moved back into Mesa in #2358 (October 2024), based on this discussion (#2330 (comment)), they were split into basic and advanced, following quaquel's breakdown. From the start, the README said advanced examples "may use experimental Mesa features", while basic ones only use stable features. That line is still in the README, and the developer guide (#3975) now states the same rule. This PR added a third tier because I'm curious what the considerations were. The PR mentions an earlier conversation; is that written down somewhere I can read? I'm about to add an example that uses CC @mesa/maintainers |
The example lives in advanced/, which may use experimental features, so list it there rather than under the experimental examples. What that tier is for is discussed in mesa#3785. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The example lives in advanced/, which may use experimental features, so list it there rather than under the experimental examples. What that tier is for is discussed in mesa#3785. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The example lives in advanced/, which may use experimental features, so list it there rather than under the experimental examples. What that tier is for is discussed in mesa#3785. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Adds a third example group,
mesa/examples/experimental/, alongsidebasic/andadvanced/, and moves the entirealliance_formationexample into it.Motive
alliance_formationis built onmesa.experimental.meta_agents. Everything undermesa/experimental/explicitly carries no semver guarantees and may change withoutnotice, but the example demonstrating it lived in
examples/advanced/, which readsas core, maintained, stable-API territory.
That mismatch is misleading in both directions: users browsing the advanced examples
have no signal that this one rests on an unstable API, and the example is liable to
break on any
meta_agentschange, which makes it look like a regression in a coreexample rather than expected churn in an experimental one.
Rather than special-case a single example, this splits the examples into three tiers
so the directory a user is browsing tells them what stability to expect.
This also gives future experimental-API examples an obvious home instead of accreting
into
advanced/orbasic/.No public API change.
Usage Examples