OK, now I think an AI must view grids in a different way to computers.

For example a computer would represent a grid like this:

cells = [[1,2,3],[4,5,6],[7,8,9]] = [row1,row2,row3]

That is a grid is 3 rows of 3 cells.

But... that's not how a human sees it. A human sees a grid as made of 3 rows and 3 collumns somehow intersecting.

If an AI is built on some mathematical logic like set theory, it's like a set of rows which in turn is a set of cells.

So what would be a way to represent a grid in a computer that is more "human". And doesn't favor either rows or columns? Or is there some mathematical or programmatical description of a grid that treats rows and columns as equivalent?

  • $\begingroup$ If I understand you correclty, you are wondering if there is a way of describing a 2-dimensional surface without choosing which dimension is the first to be indexed? So you don't want to pick (x, y) vs (y, x) but have some other way of defining position in a grid? $\endgroup$ Sep 21, 2019 at 7:47

1 Answer 1


Although it is common to represent a grid as two dimensional array in a computer program, this is not the only way to represent one. You could, for example, use a generalized graph structure made of linked nodes, with 4 links each. Many other representations are possible. Even if you use a 2d array, some languages would index the columns first rather than the rows (FORTRAN for instance).

That issue is really an aside though, because it conflates representation with reasoning. By choosing to represent the world in certain data structures, we can made it easier or harder for different AI algorithms to reason about them, but the reasoning can often proceed even if the representation is inefficient. That is, an AI algorithm can ask questions about the columns in the grid, even if the columns of the grid are not represented in a way that makes it programmitcally easy to group them together.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .