examples: Add needs-based Wolf-Sheep exploring behavioral drive patterns#432
examples: Add needs-based Wolf-Sheep exploring behavioral drive patterns#432DashamiJituri wants to merge 2 commits intomesa:mainfrom
Conversation
B2prakash
left a comment
There was a problem hiding this comment.
Great to see a needs-based behavioral model — this is exactly the kind of pattern the Behavioral Framework project aims to explore.
A few thoughts after reviewing:
-
The drive-based approach is a good structural improvement over inline conditionals. Separating hunger and fear as explicit state variables that degrade over time and determine action priority makes the behavioral logic much clearer and more extensible.
-
Pre-commit CI is failing — you'll need to fix that before this can be merged. Check the failing checks to see what ruff or formatting issues need to be resolved.
-
Missing files: I don't see an app.py for SolaraViz visualization or a metadata.toml. Adding these would align with the direction discussed in Discussion #417 and #3272 for mesa-examples best practices.
-
README question: Does the README explain how the needs-based approach differs from the standard Wolf-Sheep model in terms of emergent behavior? For example, do the population dynamics change when agents prioritize fear over hunger?
-
CellAgent usage: Good to see this built on Mesa 4.0 API with OrthogonalMooreGrid and CellAgent rather than the deprecated MultiGrid.
-
GSoC checklist: I don't see the GSoC contributor checklist (context/motivation, what I learned, learning repo link, peer review). The GSoC contribution guidelines in issue #3536 require this for all GSoC PRs.
3334275 to
1a31fca
Compare
Thanks for the detailed review @B2prakash — really helpful feedback.
|
What this adds
A new example model extending Wolf-Sheep with explicit needs-based
behavioral drives (hunger, fear) instead of inline conditionals.
Motivation
While extending Wolf-Sheep to explore behavioral patterns for the
GSoC 2026 Behavioral Framework project, I noticed that all agent
decisions are checked every tick regardless of whether state changed.
This model restructures that logic using explicit drive states that
degrade over time and determine action priority.
Connection to Mesa discussions
Files added
and drive state management
Testing
Runs cleanly for 100 steps. Population dynamics stable.
Mesa version: checked against current main branch.