Thank you for the quick answer !

####
My Answer

Have you read the docs ?

Yes, I have read the docs of Agents.jl and of Graphs.jl (which strangely does not seem to export basic regular lattices â€¦). I have also read part of the source code of Agents.jl but I still lack a general point of view.

You cannot create a hexagonal grid with creating a fancy metric, at least not in Agents.jl. It would be too complex and inefficient way to do it. You need a new space.

I agree, I just stated it for completeness. In fact, I have already run my own simulations on 2D triangular lattices and indeed, one can use a simple 2D matrix to store the positions and the only difference (apart from plotting, which can become tricky or very inefficient) is accessing the neighbours.

My recommendation is for you to open a Pull Request.

That would be the first time I participate in a collaborative project. Funnily, the only theoretical knowledge I have of it actually comes from one of your videos : Good Scientific Code Workshop.

####
Motivation

A quick point on the on the utility of the triangular lattice, which you appear to doubt.

First, I once again state that the triangular lattice is the closest one can possibly get to the continuum space, which means that this is the lattice that minimizes the most the artifacts that discrete lattices usually induce in Agent Based Simulations. For example, I donâ€™t think I will come back to the usual square for my research.

Then, I mention that a lot of well-known physics phenomena differ if taking place on hexagonal / square / triangular lattices. I take for illustration the Percolation threshold problem, easily extendable to active agents. Plus, here the triangular lattice has a very simple (1/2) *site* percolation threshold and a complicated yet theoretically tractable *bond* threshold 2\,\sin (\pi/18), I believe it could one day serve as a benchmark for more advanced research.

####
Suggestions / Ideas

In my opinion, the Agents.jl package would gain from an even easier way to define new subtypes of `GridSpace`

(triangular / hexagonal, even the very common Kagome lattice etc).

Correct me if Iâ€™m wrong but I think that the methods `add_agent_to_space!`

, `remove_agent_from_space!`

etc should not depend on the specific type of grid you want.

While I am at it : since the recent addition of `GridSpaceSingle`

**is a great idea** and will benefit a lot of users, here is another suggestion :

To help/simplify further creation of discrete lattices, would it be imaginable to integrate the property â€śsingleâ€ť into the struct itself, as already done for the property â€śperiodicâ€ť : `GridSpace{Dimension,Periodic,Single}`

?

It makes conceptual sense and would avoid code duplication for new subtypes of `GridSpace`

(`TriGridSpace`

and `TriGridSpaceSingle`

for instance) .

Many thanks,

Once again, please let me know if something is unfeasible as Iâ€™m novice to collaborative code.