-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move core example models back (v2) #2358
Conversation
Additionally: - Include interactive version with single run, batch run and server options - Update .gitignore to ignore IDE environment files
* - Add sugarcape_g1mt that is consistent with complexity tutorial - Include interactive version with single run, batch run and server options - Update .gitignore to ignore IDE environment files * - update eat function based on user identified bug in Complexity Explorer Tutorial - update Readme so batch run does not get an argument error - update run so data processing of batchrunner does not get a key error
…t of unnecessary dependencies
* Use Pathlib Code by Phil Robare (versilimidude2) * Use pre-commit * Dropped unused imports * used pre-commit to run pyupgrade, trim whitespace * Remove pathlib changes These belong in a separate PR. * remove redundant black, move comment as per rht's suggestions --------- Co-authored-by: Catherine Devlin <[email protected]>
* Use Pathlib Code by Phil Robare (versilimidude2) * Use pre-commit * Dropped unused imports * used pre-commit to run pyupgrade, trim whitespace * Remove pathlib changes These belong in a separate PR. * remove redundant black, move comment as per rht's suggestions --------- Co-authored-by: Catherine Devlin <[email protected]>
…ojectmesa#30) Co-authored-by: Jeremy Silver <[email protected]>
…ojectmesa#30) Co-authored-by: Jeremy Silver <[email protected]>
* fix bug where agent gives money to itself in the boltzmann model example * [pre-commit.ci] auto fixes from pre-commit.com hooks --------- Co-authored-by: Houssam Kherraz <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
… option; modified most other examples in the same way
… option; modified most other examples in the same way
…a#33) - update maybe_sell_spice() so calculate_MRS() takes potential sugar and spice based on trade - update calculate_MRS() with kwargs so it can take potential trade but defaults to agents sugar and spice Update increases agent_reporter due to number of trades creating memory issues - Update data collection so non-relevant data rmeoved on each step (i.e. sugar and spice agents don't have trade partners)
* Implement Streamlit UI for Boltzmann wealth model * change slider text * change slider text * update readme --------- Co-authored-by: Ankit Kumar <[email protected]>
See PR projectmesa#36 for the app.py implementation if it. * Initialize Game of Life example * set slider text * udpate readme * Implement Streamlit UI for Boltzmann wealth model * resolve merge conflicts --------- Co-authored-by: Ankit Kumar <[email protected]>
Replace shuffle().do() in 18 models with the performance optimized shuffle_do() method.
…mesa#202) This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include: - Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods - Updated `Model.step()` implementations to use AgentSet activation - Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type` - Updated agent addition/removal logic to work with AgentSets - Adjusted data collection and visualization code to use `Model.steps` and `Model.agents` For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
…mesa#202) This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include: - Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods - Updated `Model.step()` implementations to use AgentSet activation - Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type` - Updated agent addition/removal logic to work with AgentSets - Adjusted data collection and visualization code to use `Model.steps` and `Model.agents` For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
* refactor: Simplify Schelling code 1. Remove unused model attributes 2. Make `similar` calculation more natural language readable * Remove unused argument doc * Add type hints to agent class * refactor: Simplify self.running expression
Add a Readme for the Example folder, largely taken from the mesa-examples Readme.
This comment was marked as off-topic.
This comment was marked as off-topic.
Don't run ruff on the examples for now, and fix the remaining pre-commit issues (mainly codespell).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes look good.
I guess all the requirements.txt files can be removed since from now on these will be up to date?
Thanks!
Yes, I will open a tracking issues with things that can be improved / cleaned up, and try to tick as many of boxes feasible once this is merged. |
Approved the PR itself, but not sure if all the discussion points from v1 have been resolved? |
Thanks!
Define resolved ;) Full consensus among 7 maintainer (on very little detail)? No. Majority agrees on major points? Yes. Clear plan to move forward? I also believe so. But yeah, I would like to get a little more alignment in today’s meeting. |
@tpike3 @jackiekazil we discussed it in the meeting, but could you give your formal approval, mainly for historical reference? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per 15 Oct Dev session I agree
With jackie also in approval in the meeting, we have 5 core maintainers in agreement. Thanks for the quick and insightful discussion everyone! |
The big checklist to start working on: |
This PR moves several core examples back to the main Mesa repository, organized into Basic and Advanced categories:
Basic Examples:
Advanced Examples:
It uses some ideas discussed in #2330 (comment), and the division of models originates from #2349 (comment).
It keeps the git history, with the only side effect that the PR numbers now link to the wrong repo (there's no easy way to fix this).
Moving these examples back into the main Mesa repository:
After this PR is merged, these examples can be updated further to become fully exemplary.
@projectmesa/maintainers, like with the previous PR, I kindly request your review.