-
Notifications
You must be signed in to change notification settings - Fork 920
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
Switch sugarscape to using property layers #2546
Conversation
for more information, see https://pre-commit.ci
Performance benchmarks:
|
It’s really awesome how much this cleans up the code! So much more elegant. Could you add a screenshot of how the visualization now looks? |
Yes and there is more to come. For examples, traders do a gradient hill climb based on their neighborhood. This can now be expressed in a fully vectorized way using the masking stuff and some other property layer functionality. I'll post a comparative visual tomorrow but at the moment I looks basically the same as before. |
components=[SpaceDrawer, make_plot_component(["Trader", "Price"])], | ||
components=[ | ||
SpaceDrawer, | ||
make_plot_component("#Traders"), |
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.
Just curious why "#Traders" and not Just "Traders"
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.
I changed the name of the reporter so I had to change it here. For me #
means "number of".
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.
Property layer is super cool; I will leave it you if you want to merge and do another PR for the visual or just merge
Just had one question out of curiosity
This changes sugarscape to use property layers for sugar and spice instead of a resource agent.
I haven't yet updated the visualization side fully to take advantage of the property layer visualizations in MESA, I can do this in this PR or in a subsequent one, whichever is prefered.