-
Hi! I've been trying to select a group of agents using agentpy.Space.select, and then from those agents select only those with a specific state. I'm running into some trouble with the syntax for Here's what I've been using:
I added the second line (using
I'd really appreciate any advice about the syntax, or better ways of doing what I'm trying to accomplish. Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @fl-hat ! Please make sure to update to the latest version (0.1.2), as I think it should work with the following:
Or with just one line:
To improve performance, you could consider to put your resources in a separate |
Beta Was this translation helpful? Give feedback.
Hi @fl-hat !
Please make sure to update to the latest version (0.1.2), as
to_list
is a new feature.I think it should work with the following:
Or with just one line:
To improve performance, you could consider to put your resources in a separate
Space
, so that you don't have to select the resources (i.e. your third line of code) every time. E.g. you could have anagent_space
and aresource_space
.