Mandatory I’m brand new to Julia and Agents.jl so apologies if this is obvious.
I am making a predator-prey model, following the wolf-sheep example.
GridSpace has a property “grass”. In the example predator-prey model, sheep move at random to a nearby cell. I would like my sheep to “look” around and move to the nearest cell where there is grass. To do this I think I need something like
nearby_agents (but for nearby grid cells) to retrieve a vector of grid cell IDs within range r (sheep vision range). I would then be able to iterate over the nearby cells to see a) which have grass and b) which is closest.
My question: Is there an equivalent of
nearby_agents for nearby cells? And does my approach seem sensible?