-
Notifications
You must be signed in to change notification settings - Fork 928
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
Update into_tutorial #2372
Update into_tutorial #2372
Conversation
tpike3
commented
Oct 16, 2024
- Update intro tutorial to be compatible with Mesa 3.0
Update intro tutorial for Mesa 3.0
A first quick comment. You currently have class MoneyModel(mesa.Model):
"""A model with some number of agents."""
def __init__(self, N):
super().__init__() This should be changed to class MoneyModel(mesa.Model):
"""A model with some number of agents."""
def __init__(self, N, seed=None):
super().__init__(seed=seed) The same change should be made in all other places where you have the MoneyModel class. This ensures that seed is handled correctly and is controllable. |
I added seed with None and added a challenge to set a seed and see the impact when setting up the initial model and agent interaction. (In this case it demonstrates that the agent order stays in whatever random configuration the seed is set too) As the seed kwarg is set to none, I am thinking we should not put it in each one. Thoughts? |
Maybe we need to make seeds / random numbers a separate section - but not sure that fits in an introductory tutorial. |
|
- Updates descriptions to be consistent with 3.0 - Adds user challenges - Corrects headers
I think it is critical to have the seed in there and upfront, it is one of those oft overlooked and but critically important. Everyone wants to ignore the butterfly effect, because it is intuitively scary. How about I bookend seed--- right up front and then as the last section is batchrun put it in there? I got the writing part of the documentation done, #TODO is add some of the new agentset functionalities. |
Sounds good to me. We can keep an experimentation tutorial for later. |
Also please check for changes between the Model in the tutorial and the updated example in mesa/examples. The latter for example uses "n" instead of "N" for the number of agents |
- add AgentSet functionality section - change N parameter to n to be consistent - improve grammar and readability
Performance benchmarks:
|
- Fix build failure - Make portions independent to avoid computational overhead
I am scanning the tutorial. A few quick points:
|
Ok this is ready now that the build is working . As there is a lot of happies to glads, besides making compatible with 3.0 the three big parts to look at are: 1- I added an AgentSet functionality section. As I am always behind, I am a little worried I did code that worked vs good coding practices we want to instill in students This should however give us a very nice tutorial for CSSSA |
Thanks--- on it! |
I agree, this looks like a great tutorial. Once the few points I had are addressed this is good to go as far as I am concerned. |
I will review today! |
- update agent "do" section - remove schedule reference in batch_run - other minor fixes
Updates made
|
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.
It looks like there are now some duplicate parts in the Visualisation tutorial, is that intentional?
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.
Really great job on the tutorial! I especially like all the challenges to get users to engage with the code!
Please check if the changes to the viz tutorial are intentional and as expected, but otherwise, good to go!
The repetition is intentional; although very brute force The problem is when you run three dashboards at the same the last one barely moves. So each part is self contained with instructions to restart the kernel. So far I haven't found a good solution, with but this was better than users getting frustrated with the visuals. I imagine our tutorial is a bit of an edge case for jupyter and solara. |
@Corvince or @maartenbreddels any suggestions? It's about this changeset in the visualisation tutorial (rendered: old | new). |
Awesome!! Thanks @EwoutH Very curious to see their thoughts! |