Cell space: Convenient method/practice to deny agents access (or remove cells)
It would be nice if you could create inaccessible parts in the cell space, like having "walls" in your space. Maybe even completely being able to remove cells.
Neighbours e.d. should be updated.
Why would you want to create inaccessible parts? Can you give some examples of phenomena that you would like to model?
A critical design choice of the cell spaces is that the way they are wired up is static and cached. This is, in part, what makes them fast. Having dynamic cell spaces would break that design choice and result in a potentially substantial slowdown.
Moreover, you can easily do something like this using property layers. Add a boolean layer indicating which parts of the space a given agent or agent class can access and use this in your custom movement logic.
There is one use case for dynamic cell spaces, and that is for changing networks. There are quite a few open issues about dynamic networks, and neither the old-style network nor the new-style network supports this.
Why would you want to create inaccessible parts? Can you give some examples of phenomena that you would like to model?
Basically everything with pathfinding or segregation. Emergency workers finding people in an (unknown) environment, a river dividing an ecoystem, a highway through a neighbourhood, etc.
Ideally you could also deny certain types / groups of agents access.
Not sure on implementation, haven't mapped the solution space yet. But a PropertyLayer could work. Removing cells might also be interesting, since it could even increase performance since there are both less cells and less neighbours to check. You could might be able to create vast sparse spaces this way.
Basically everything with pathfinding or segregation. Emergency workers finding people in an (unknown) environment, a river dividing an ecoystem, a highway through a neighbourhood, etc.
I am not sure I would use a cell space for most of these examples. Moreover, the emergency worker example reflect the knowledge of the agents and should thus be handled via agent state not via the environment itself.
Removing cells might also be interesting, since it could even increase performance since there are both less cells and less neighbours to check. You could might be able to create vast sparse spaces this way.
There is a difference between having a dynamic discrete space (i.e., the environment is dynamic) vs. the case where different agents have different understandings of the environment (and where this understanding might itself be evolving). The former is not possible with the current cell spaces. The later is not supported out of the box by MESA. I also doubt whether we should even support that out of the box because there is a 101 ways that users of mesa migth want to implement this.
Slightly related:
- https://github.com/projectmesa/mesa/issues/2565
Basically you dynamically "deny" Sheep to access cells with Wolfs.