Conversation
for more information, see https://pre-commit.ci
…examples into bdi_recommender
|
Thanks for the PR, nice to see some BDI. Could you:
|
ShreyasN707
left a comment
There was a problem hiding this comment.
I have tested it in my local system and it works good with all the different model parameters i tired .
examples/bdi_recommender/model.py
Outdated
| "beliefs": lambda a: dict(a.beliefs) if hasattr(a, "beliefs") else {}, | ||
| "trust": lambda a: a.trust if hasattr(a, "trust") else 0, | ||
| "goals": lambda a: ( | ||
| dict(a.goals) if hasattr(a, "goals") and callable(a.goals) else {} |
There was a problem hiding this comment.
the DataCollector incorrectly checks if goals is callable.
Since goals is a @computed_property, it already returns a value, so callable() is always false.
There was a problem hiding this comment.
Hi , thanks for looking into this , I will update it
| renderer.draw_agents() | ||
|
|
||
| page = SolaraViz( | ||
| model, |
There was a problem hiding this comment.
Passing a model instance here might limit reactivity—using the model class could help updates work better.
There was a problem hiding this comment.
I think this is not an issue because , SolaraViz accepts model: Model | solara.Reactive[Model]
There was a problem hiding this comment.
yes SolaraViz accepts both. My concern was more about reactivity in practice (e.g. model resets/param updates), but if it's working correctly with the current setup then it should be fine.
|
Peer Review — BDI Recommender Agent Reviewed Overall A genuinely interesting example BDI architecture is underrepresented in Mesa examples and the NetLogo port is a good choice. The use of Critical: Non-seeded RNG in
Trust Logic in if sender and sender.trust > 0.5:This checks the doctor's trust level, not Bob's trust in the doctor. The BDI model says Bob's receptiveness should be governed by his own trust variable (already stored on
Hardcoded location coordinates in self.gym = GymAgent(self, self.grid[21, 26])
self.nutrition_centre = NutritionCentreAgent(self, self.grid[24, 22])
self.clinic = ClinicAgent(self, self.grid[16, 19])These are hardcoded for a 40×40 grid. If a user changes
The README abbreviations unexplained Belief/desire keys like Summary The core BDI logic is correct and the |
|
Cool example, BDI is a nice addition to the repo! Abhinavk0220 already caught the big ones, just want to +1 the two that really need fixing before merge:
Otherwise the mesa_signals / computed_property usage is a genuine highlight here, good stuff! |
|
I have updated the trust . The current implementation does give reproducible results , so no change should be needed, and there is no code like |
This is a mesa implementation of BDI Recommender Agent from NetLogo Modeling Commons.
It is a good minimal example of Belief Desire Intention(BDI) architecture
This model simulates an agent ("Bob") who autonomously reasons about his health by maintaining Beliefs (knowledge about his health), Desires (motivations), Goals (achievable desires), and Intentions (action plans). It demonstrates how new information (advice from a Doctor) can dynamically change Bob's beliefs and alter his behavior.
Visualization:


Review Checklist
Does it belong?
Is it correct?
Is it clean?