Heterogeneous space


If I have a simple model in Agents.jl, where Agents have to find food.
And now I would like to add obsticles, like lets say a river, how can I do that?

Is there a way to use a grid as space which has e.g. ones and zeros and the agents can only walk where there are ones or something like that?

There is the “mountain runner” example, which uses a terain map as underground,
Mountain Runners · Agents.jl (juliadynamics.github.io)
But here the terain is only used by the path finder.

I think one way would be to have the grid seperatly and just chack in the step function if the coordinates the agent goes to is a zero or a one on the grid, but that brings me into trouble when I want to plot it…

Is there a Agents.jl way to do that?

Thank you!

Yes, this is the recommended way to do it.

In how far would that get you into trouble when plotting it? Could you please be a bit more specific about which troubles you’ve encountered?


Thank you for the quick response!
sorry for not beeing specific!
I will first try how far I get, produce some code and get back when I can show you on the code what I mean!

Do you happen do know of some example of this?