Answers.Body: <p>This sounds like a problem that's best solved with a simple non-AI algorithm. If you just enumerate the coordinates in a regular order (rows, colums, zig-zag, hilbert curve) and emit the coordinates where the image has a '1' you're meeting your requirements. Is there any specific reason you want to use an AI algorithm which is most likely worse than this?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-23T08:01:08.663Z
Answers.Text: Yes the algorithmic solution is pretty simple. But I need to extend this problem further and use multiple agents to recreate the image with coordination. This is my first step and I want to identify a good approach for the extended problem. And in that, the order of placing ones on the image matters (The application is robots creating the image using some kind of building blocks, placing one block after the other)
Answers.UserDisplayName: doca
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-23T11:19:29.617Z
Answers.Text: Multiple agents can still execute a centrally generated plan, no need to involve AI. If recreating the original image faithfully is the actual goal, emergent swarm behavior is probably not suitable.
Answers.UserDisplayName: Hans-Martin Mosner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-22T07:07:26.083Z
Answers.LastActivityDate: 2020-08-22T09:41:34.157Z
Answers.LastEditDate: 2020-08-22T09:41:34.157Z
Answers.UserDisplayName: Hans-Martin Mosner
Body: <p>If the title wan not very clear, I want a method to take an input image like this,</p>
  <pre><code>[[0, 0, 0, 0],
   [1, 1, 1, 0],
   [1, 1, 1, 0],
   [0, 1, 1, 0]]
  </code></pre>
  <p>and output the 2D coordinates of the <code>1</code>s of the image (So that I can recreate the image)</p>
  <p><strong>The application is a robot creating the image using some kind of building blocks, placing one block after the other</strong></p>
  <p>I want the output to be sequential because I need to reconstruct the input image pixel by pixel and there are some conditions on the image construction order (e.g. You cannot place a <code>1</code> somewhere when it is surrounded by <code>1</code>s)</p>
  <p>The image can change and the number of <code>1</code>s in the image too.</p>
  <ol>
  <li>What is an appropriate AI method to apply in this case?</li>
  <li>How should I feed the image to the network? (Will flattening it to 2D affect my need of an output order?)</li>
  <li>Should I get the output coordinates one by one or as an ordered 2xN matrix?</li>
  <li>If one by one, should I feed the same image for each output or the image without the <code>1</code>s already filled?</li>
  </ol>
  <hr />
  <p>I have tried to apply &quot;NeuroEvolution of Augmenting Topologies&quot; for this using <a href="https://neat-python.readthedocs.io/en/latest/neat_overview.html" rel="nofollow noreferrer">neat-python</a> but was unsuccessful. I am currently looking at RNNs but I am not sure if it is the best choice either.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-23T06:46:12.483Z
Comments.Text: https://cs.stackexchange.com/q/129468/755
Comments.UserDisplayName: D.W.
Tags: <neural-networks><ai-design><recurrent-neural-networks><evolutionary-algorithms><neuroevolution>
Title: Choosing an AI method to recreate a given binary 2D image
UserDisplayName: doca
ThreadText: # Choosing an AI method to recreate a given binary 2D image
  
  (Asked by: username_0 on 2020-08-22)
  
  If the title wan not very clear, I want a method to take an input image like this,
  
  ```
  [[0, 0, 0, 0],
   [1, 1, 1, 0],
   [1, 1, 1, 0],
   [0, 1, 1, 0]]
  
  ```
  
  and output the 2D coordinates of the `1`s of the image (So that I can recreate the image)
  
  **The application is a robot creating the image using some kind of building blocks, placing one block after the other**
  
  I want the output to be sequential because I need to reconstruct the input image pixel by pixel and there are some conditions on the image construction order (e.g. You cannot place a `1` somewhere when it is surrounded by `1`s)
  
  The image can change and the number of `1`s in the image too.
  
  1. What is an appropriate AI method to apply in this case?
  2. How should I feed the image to the network? (Will flattening it to 2D affect my need of an output order?)
  3. Should I get the output coordinates one by one or as an ordered 2xN matrix?
  4. If one by one, should I feed the same image for each output or the image without the `1`s already filled?
  
  ---
  
  I have tried to apply "NeuroEvolution of Augmenting Topologies" for this using [neat-python](https://neat-python.readthedocs.io/en/latest/neat_overview.html) but was unsuccessful. I am currently looking at RNNs but I am not sure if it is the best choice either.
  
  **Tags:** neural-networks, ai-design, recurrent-neural-networks, evolutionary-algorithms, neuroevolution
  
  > **Comments:**
  > **username_1**: https://cs.stackexchange.com/q/129468/755  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-08-22. Score: 2
  
  This sounds like a problem that's best solved with a simple non-AI algorithm. If you just enumerate the coordinates in a regular order (rows, colums, zig-zag, hilbert curve) and emit the coordinates where the image has a '1' you're meeting your requirements. Is there any specific reason you want to use an AI algorithm which is most likely worse than this?
  
  > **Comments:**
  > **username_0**: Yes the algorithmic solution is pretty simple. But I need to extend this problem further and use multiple agents to recreate the image with coordination. This is my first step and I want to identify a good approach for the extended problem. And in that, the order of placing ones on the image matters (The application is robots creating the image using some kind of building blocks, placing one block after the other)  
  > **username_2**: Multiple agents can still execute a centrally generated plan, no need to involve AI. If recreating the original image faithfully is the actual goal, emergent swarm behavior is probably not suitable.  
  
  ---
  
  