Epstein civil violence: Switch to experimental datacollector#158
Epstein civil violence: Switch to experimental datacollector#158
Conversation
| "Cops": self.count_cops, | ||
| } | ||
| agent_reporters = { | ||
| "x": lambda agents: [pos[0] for pos in agents.get("pos")], |
There was a problem hiding this comment.
This API is awkward. It is better to use instead lambda a: a.pos[0]. But this means AgentSet needs to have the feature of .apply() along the line of DataFrame's apply.
This also means that the new DataCollector heavily relies on AgentSet in order to remain simple. Simple is good.
There was a problem hiding this comment.
I think @quaquel was also thinking in this direction: mesa/mesa#1944 (comment)
There was a problem hiding this comment.
I am back in office and do have some time. However, I lot has been happening wrt to MESA so @EwoutH if you have 30 minutes to bring me up to speed, I am happy to take a look at the apply idea.
There was a problem hiding this comment.
Good to hear! Let me get back to you what works.
There was a problem hiding this comment.
yes, just email me a time and place (online or my office)
No description provided.