difference between a stackable 2D agent and a 3D agent

31 views
Skip to first unread message

yasolo...@gmail.com

unread,
Jun 18, 2020, 6:57:12 PM6/18/20
to HAL Q and A
What's the difference between a stackable 2D agent and a 3D agent?

Jack Edwards

unread,
Jun 25, 2020, 6:15:18 PM6/25/20
to HAL Q and A
Someone can correct me if I am wrong, but the only difference I know of between the 2D and 3D agents is that the 3D agent must be housed on a 3D grid, which will then have a z-coordinate associated with its position. As for the difference between a stackable 2D agent and a 3D agent, stackable 2D agents can coexist on the same point in a 2D grid (so you could have 3 cells at the point (1, 2) for on-lattice, or at the point (3.7, 8.1) for off-lattice), whereas unstackable 3D agents can still only have one agent per point (so you could have 1 cell at (1, 2, 0), 1 cell at (1, 2, 1) and 1 cell at (1, 2, 2), but you could not have 3 cells at (1, 2, 0)). This distinction makes a difference when considering cell neighborhoods, as if agents are stackable, cells can simply divide with the new agent residing in the same position, whereas 3D unstackable agents still must have space in the neighborhood in order to divide (unless there is some sort of pushing mechanism in place).

I am also under the impression that it is more difficult to specify a specific cell by its position when using a stackable agent type, see 4.14.1  http://halloworld.org/grids_agents.html#agentgridmethods for the warning on  the GetAgent method.

Rafael Bravo

unread,
Jul 6, 2020, 12:47:02 PM7/6/20
to HAL Q and A
This is correct, for stacked agents you should use either the GetAgents or IterAgents function to get all agents at a specific position instead
Reply all
Reply to author
Forward
0 new messages