Freely moving agents in a GridSpace-like environment

I am currently trying to implement a model similar to
the model “Predator-prey dynamics” from the Example Zoo.
My current issue is that i need freely moving agents in a space made out
of square patches just like the example model.
As far as I know agents with float-coordinates can’t be added to a GridSpace
as it uses integer-coordinates for an agents’ position.
Is there a way to implement a model that contains agents with float-coordinates
moving in a GridSpace-like environment?

ContinuousSpace will give you float-coordinates and allow you to move around the space ‘freely’ in the way I assume you’re thinking.

ContinuousSpace actually uses GridSpace internally to assist with nearest neighbour lookups. So you can, in principle, access model.space.s if you need to use the grid style coordinate system.

2 Likes