-
Notifications
You must be signed in to change notification settings - Fork 131
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
Sugarscape Chapter 3- Draft Pull Request #106
base: main
Are you sure you want to change the base?
Conversation
* creating the base code for chapter 3 of sugarscape, attempt to keep as a superset of chapter 2 * On branch sugarscape Changes to be committed: new file: examples/sugarscape_scc/README.md new file: examples/sugarscape_scc/sugarscape_scc/__init__.py new file: examples/sugarscape_scc/sugarscape_scc/resources/ant.png new file: examples/sugarscape_scc/sugarscape_scc/sugar-map.txt Changes not staged for commit: modified: examples/sugarscape_cg/sugarscape_cg/model.py Untracked files: examples/sugarscape_scc/sugarscape_scc/agents.py examples/sugarscape_scc/sugarscape_scc/model.py * modified: examples/sugarscape_cg/sugarscape_cg/model.py * Changes to be committed: new file: examples/sugarscape_scc/sugarscape_scc/model.py Untracked files: examples/sugarscape_scc/sugarscape_scc/agents.py * new file: examples/sugarscape_scc/sugarscape_scc/agents.py * modified: examples/sugarscape_scc/README.md * modified: examples/sugarscape_cg/sugarscape_cg/model.pymodified: examples/sugarscape_scc/README.md
* creating the base code for chapter 3 of sugarscape, attempt to keep as a superset of chapter 2 * On branch sugarscape Changes to be committed: new file: examples/sugarscape_scc/README.md new file: examples/sugarscape_scc/sugarscape_scc/__init__.py new file: examples/sugarscape_scc/sugarscape_scc/resources/ant.png new file: examples/sugarscape_scc/sugarscape_scc/sugar-map.txt Changes not staged for commit: modified: examples/sugarscape_cg/sugarscape_cg/model.py Untracked files: examples/sugarscape_scc/sugarscape_scc/agents.py examples/sugarscape_scc/sugarscape_scc/model.py * modified: examples/sugarscape_cg/sugarscape_cg/model.py * Changes to be committed: new file: examples/sugarscape_scc/sugarscape_scc/model.py Untracked files: examples/sugarscape_scc/sugarscape_scc/agents.py * new file: examples/sugarscape_scc/sugarscape_scc/agents.py * modified: examples/sugarscape_scc/README.md * modified: examples/sugarscape_cg/sugarscape_cg/model.pymodified: examples/sugarscape_scc/README.md * modified: examples/sugarscape_scc/sugarscape_scc/model.py * Update agents.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@apranav22 how much smaller would the code be if it were to inherit from the existing sugarscape_cg classes? Let me know, and if it is sufficiently small, we may publish sugarscape_cg to be importable from |
@rht I think it would reduce redundant code by an order of magnitude actually. Shall I rewrite the code to inherit from the existing files? I also wanted to refactor a little bit keeping AgentSets in mind. Is writing examples with experimental features encourages? |
This is needed so that projectmesa#106 can inherit from sugarscape_cg, to reduce code duplication.
I published the
Yes, sounds good to me.
I suppose it is fine for new examples. I have only used AgentSet for the experimental examples. What do you think, @projectmesa/maintainers @quaquel ? |
This is needed so that #106 can inherit from sugarscape_cg, to reduce code duplication.
@apranav22 #108 has been merged. |
@apranav22 hey! Would you like to finish this PR? Is there anything we can do to help? |
Hi! I've been meaning to get to it but I've been swamped of late. I will work on it right now. Sorry for the slack :( |
There's a problem. Some of the relative file paths get mangled when I try to inherit from |
tried to inherit from sugarscape_cg: ran into problems immediately :(.
for more information, see https://pre-commit.ci
TODO:
Current Issues:
Struggling with agent reporters, I'd like to access agents' age data from
agents.py
using the data collectordatacollector
inmodels.py
to visualise a bar chart. However, the bar chart does not show up.x----
On branch sugarscape Changes to be committed:
new file: examples/sugarscape_scc/README.md
new file: examples/sugarscape_scc/sugarscape_scc/init.py
new file: examples/sugarscape_scc/sugarscape_scc/resources/ant.png
new file: examples/sugarscape_scc/sugarscape_scc/sugar-map.txt
Changes not staged for commit:
modified: examples/sugarscape_cg/sugarscape_cg/model.py
Untracked files:
examples/sugarscape_scc/sugarscape_scc/agents.py
examples/sugarscape_scc/sugarscape_scc/model.py
modified: examples/sugarscape_cg/sugarscape_cg/model.py
Changes to be committed:
new file: examples/sugarscape_scc/sugarscape_scc/model.py
Untracked files:
examples/sugarscape_scc/sugarscape_scc/agents.py
new file: examples/sugarscape_scc/sugarscape_scc/agents.py
modified: examples/sugarscape_scc/README.md
modified: examples/sugarscape_cg/sugarscape_cg/model.pymodified: examples/sugarscape_scc/README.md