Answers.Body: <p>Although it is <em>common</em> 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 <a href="https://en.wikipedia.org/wiki/Graph_theory" rel="nofollow noreferrer">graph structure</a> made of linked nodes, with 4 links each. Many other representations are possible. Even if you use a 2d array, some languages <em>would</em> index the columns first rather than the rows (FORTRAN for instance).</p>
  
  <p>That issue is really an aside though, because it conflates <em>representation</em> with <em>reasoning</em>. 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. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-21T20:36:32.573Z
Answers.LastActivityDate: 2019-09-21T20:36:32.573Z
Answers.UserDisplayName: John Doucette
Body: <p>OK, now I think an AI must view grids in a different way to computers.</p>
  
  <p>For example a computer would represent a grid like this:</p>
  
  <pre><code>cells = [[1,2,3],[4,5,6],[7,8,9]] = [row1,row2,row3]
  </code></pre>
  
  <p>That is a grid is 3 rows of 3 cells. </p>
  
  <p>But... that's not how a human sees it. A human sees a grid as made of 3 rows and 3 collumns somehow intersecting.</p>
  
  <p>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.</p>
  
  <p>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? </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-21T07:47:55.487Z
Comments.Text: 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?
Comments.UserDisplayName: Neil Slater
Tags: <ai-design><knowledge-representation>
Title: How would an AI understand grids?
UserDisplayName: zooby
ThreadText: # How would an AI understand grids?
  
  (Asked by: username_0 on 2019-09-21)
  
  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?
  
  **Tags:** ai-design, knowledge-representation
  
  > **Comments:**
  > **username_1**: 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?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-09-21. Score: 4
  
  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](https://en.wikipedia.org/wiki/Graph_theory) 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.
  
  
  ---
  
  