Body: <p>Update on 2019-05-19:</p>
  
  <p>My question is about teaching AI to solve the problem, not letting AI teach a human developer to solve a problem.</p>
  
  <hr>
  
  <p>Original post:</p>
  
  <p>I'm a software developer but very new to AI.</p>
  
  <p>Today my friend and I chatted about the development of AI. One topic was about implementing the capability of "given a problem, analyzing the problem and designing a solution".</p>
  
  <p>Since we are both software developers, we used a simple example problem in our discussion to see how AI might possibly find a solution:</p>
  
  <pre><code>Print the following three lines on the console:
  
  *
  ***
  *****
  </code></pre>
  
  <p>My friend and I thought we may use some <a href="https://en.wikipedia.org/wiki/Formal_methods" rel="nofollow noreferrer">formal method</a> to describe <strong>WHAT</strong> we want but <strong>NOT</strong> how we implement it. It's the AI's job to figure out the solution.</p>
  
  <p>Then we came to the question I'm asking here: Since my friend and I are both outsiders of AI research, we don't know if there is any existing research (we believe such research must have existed somewhere) that teaches AI to <strong>analyze the problem (which is formally defined) and design a solution using the given tools</strong>.</p>
  
  <p>For us human beings, our analysis of the problem and designing might look like the following:</p>
  
  <ul>
  <li>Let me choose a programming language. For example, C.</li>
  <li>Let me see what tools I have in the chosen programming language. Oh, here they are:
  
  <ul>
  <li><code>putchar(ch)</code> which prints a single character on the console.</li>
  <li><code>printf(str)</code> which prints a string on the console.</li>
  <li>for-loop; if-else; support of subroutines; etc.</li>
  </ul></li>
  <li>I see the result has three lines of characters: line 1, 2, and 3.</li>
  <li>I see the numbers of '*' in the three lines are an arithmetic progression and there is a connection of line number and character number: given the line number <em>i</em>, the character number is <em>2*i-1</em>, where <em>i</em> is 1, 2, and 3. This is repetition and I can use a for-loop.</li>
  <li>Each line is the repetition of '*' so I may implement a function to do this.</li>
  </ul>
  
  
  
  <pre><code>void print_line(int N) {
    for (int i = 0; i &lt; N; i++) {
      putchar('*');
    }
    putchar('\n');
  }
  
  int main(int argc, char * argv[]) {
    for (int i = 1; i &lt;=3; i++) {
      print_line(2 * i - 1);
    }
    return 0;
  }
  </code></pre>
  
  <p>Alternatively, I may design a naive solution of using <code>printf()</code> three times and hard-code each string:</p>
  
  
  
  <pre><code>printf("*\n");
  printf("***\n");
  printf("*****\n");
  </code></pre>
  
  <p>We think an AI that can do this may follow a similar analyzing and designing approach as a human developer does. In general, we think:</p>
  
  <ul>
  <li>This AI should have a toolbox using which it can solve some problems (possibly not all problems). In my example above, this toolbox may be a programming language and its corresponding library.</li>
  <li>This AI should have the knowledge about some concepts (such as <em>console</em> and <em>string</em> in the example above) and their relationships.</li>
  <li>This AI should have the knowledge that connects the toolbox and the concepts, so the AI knows how a tool can manipulate the properties of a concept.</li>
  <li><strong>Most importantly</strong>, this AI should have the capability of figuring out one or more paths that connect the input to the desired output, using the toolbox. This process, we think, needs the capability of "analysis" and "design".</li>
  </ul>
  
  <p>Excuse us if the description is still vague. My friend and I are both new to AI so, in fact, we don't even know if "analysis" and "design" are the proper words to use. We will be glad to clarify if needed.</p>
  
  <p>BTW, we did some quick search about such AI:</p>
  
  <ul>
  <li><a href="https://info.askbayou.com/" rel="nofollow noreferrer">Bayou by Rice University</a> doesn't look like understanding the problem, either.</li>
  <li><a href="https://www.microsoft.com/en-us/research/publication/deepcoder-learning-write-programs/" rel="nofollow noreferrer">DeepCoder</a> uses Deep Learning and I doubt whether it understands the problem, either.</li>
  <li>The <a href="https://github.com/primaryobjects/AI-Programmer" rel="nofollow noreferrer">AI-Programmer</a> uses genetic algorithms to generate the desired string in BrainFuck. But this AI doesn't look like understanding the problem. It looks like a trial-and-error with feedback.</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-19T13:31:16.333Z
Comments.Text: Software development is a quite complex task, which involves a lot of abstract concepts. I doubt there's any AI system that is capable of solving any non-trivial programming task satisfactorily. Programming is likely an [AI-complete problem](https://ai.stackexchange.com/a/12147/2444).
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-19T13:42:21.533Z
Comments.Text: @nbro Thanks for the information! I'll take a look at the "AI-complete problem". Meanwhile, I just learned about the research field ["Program synthesis"](https://en.wikipedia.org/wiki/Program_synthesis) which seems to be related to my question. I'll take a look, too.
Comments.UserDisplayName: yaobin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-19T13:44:33.643Z
Comments.Text: @nbro Yes, I agree with you that it is quite complex and probably there isn't any AI that can do it so far. This is why when my friend and I were discussing this, we thought we human developers can define the problem formally, instead of using natural language. So the AI doesn't have to process natural language to understand the problem. However, figuring out a solution from even a formally specified problem still seems so difficult for a machine.
Comments.UserDisplayName: yaobin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-14T12:34:59.230Z
Comments.Text: There are two main problems with this question: You have to define the problem in a useful way (You just write (which is formally defined)) and you use the word "understanding" which bears some problems. There is no research to this because it might be too broadly-defined. There is research to developing models to solve more than task though.
Comments.UserDisplayName: N. Kiefer
Tags: <machine-learning><algorithm><research><human-like>
Title: Is there research about teaching AI to "analyze the problem and design a solution"?
UserDisplayName: yaobin
ThreadText: # Is there research about teaching AI to "analyze the problem and design a solution"?
  
  (Asked by: username_0 on 2019-05-19)
  
  Update on 2019-05-19:
  
  My question is about teaching AI to solve the problem, not letting AI teach a human developer to solve a problem.
  
  ---
  
  Original post:
  
  I'm a software developer but very new to AI.
  
  Today my friend and I chatted about the development of AI. One topic was about implementing the capability of "given a problem, analyzing the problem and designing a solution".
  
  Since we are both software developers, we used a simple example problem in our discussion to see how AI might possibly find a solution:
  
  ```
  Print the following three lines on the console:
  
  *
  ***
  *****
  
  ```
  
  My friend and I thought we may use some [formal method](https://en.wikipedia.org/wiki/Formal_methods) to describe **WHAT** we want but **NOT** how we implement it. It's the AI's job to figure out the solution.
  
  Then we came to the question I'm asking here: Since my friend and I are both outsiders of AI research, we don't know if there is any existing research (we believe such research must have existed somewhere) that teaches AI to **analyze the problem (which is formally defined) and design a solution using the given tools**.
  
  For us human beings, our analysis of the problem and designing might look like the following:
  
  * Let me choose a programming language. For example, C.
  * Let me see what tools I have in the chosen programming language. Oh, here they are:
    + `putchar(ch)` which prints a single character on the console.
    + `printf(str)` which prints a string on the console.
    + for-loop; if-else; support of subroutines; etc.
  * I see the result has three lines of characters: line 1, 2, and 3.
  * I see the numbers of '\*' in the three lines are an arithmetic progression and there is a connection of line number and character number: given the line number *i*, the character number is *2\*i-1*, where *i* is 1, 2, and 3. This is repetition and I can use a for-loop.
  * Each line is the repetition of '\*' so I may implement a function to do this.
  
  ```
  void print_line(int N) {
    for (int i = 0; i < N; i++) {
      putchar('*');
    }
    putchar('\n');
  }
  
  int main(int argc, char * argv[]) {
    for (int i = 1; i <=3; i++) {
      print_line(2 * i - 1);
    }
    return 0;
  }
  
  ```
  
  Alternatively, I may design a naive solution of using `printf()` three times and hard-code each string:
  
  ```
  printf("*\n");
  printf("***\n");
  printf("*****\n");
  
  ```
  
  We think an AI that can do this may follow a similar analyzing and designing approach as a human developer does. In general, we think:
  
  * This AI should have a toolbox using which it can solve some problems (possibly not all problems). In my example above, this toolbox may be a programming language and its corresponding library.
  * This AI should have the knowledge about some concepts (such as *console* and *string* in the example above) and their relationships.
  * This AI should have the knowledge that connects the toolbox and the concepts, so the AI knows how a tool can manipulate the properties of a concept.
  * **Most importantly**, this AI should have the capability of figuring out one or more paths that connect the input to the desired output, using the toolbox. This process, we think, needs the capability of "analysis" and "design".
  
  Excuse us if the description is still vague. My friend and I are both new to AI so, in fact, we don't even know if "analysis" and "design" are the proper words to use. We will be glad to clarify if needed.
  
  BTW, we did some quick search about such AI:
  
  * [Bayou by Rice University](https://info.askbayou.com/) doesn't look like understanding the problem, either.
  * [DeepCoder](https://www.microsoft.com/en-us/research/publication/deepcoder-learning-write-programs/) uses Deep Learning and I doubt whether it understands the problem, either.
  * The [AI-Programmer](https://github.com/primaryobjects/AI-Programmer) uses genetic algorithms to generate the desired string in BrainFuck. But this AI doesn't look like understanding the problem. It looks like a trial-and-error with feedback.
  
  **Tags:** machine-learning, algorithm, research, human-like
  
  > **Comments:**
  > **username_1**: Software development is a quite complex task, which involves a lot of abstract concepts. I doubt there's any AI system that is capable of solving any non-trivial programming task satisfactorily. Programming is likely an [AI-complete problem](https://ai.stackexchange.com/a/12147/2444).  
  > **username_0**: @username_1 Thanks for the information! I'll take a look at the "AI-complete problem". Meanwhile, I just learned about the research field ["Program synthesis"](https://en.wikipedia.org/wiki/Program_synthesis) which seems to be related to my question. I'll take a look, too.  
  > **username_0**: @username_1 Yes, I agree with you that it is quite complex and probably there isn't any AI that can do it so far. This is why when my friend and I were discussing this, we thought we human developers can define the problem formally, instead of using natural language. So the AI doesn't have to process natural language to understand the problem. However, figuring out a solution from even a formally specified problem still seems so difficult for a machine.  
  > **username_2**: There are two main problems with this question: You have to define the problem in a useful way (You just write (which is formally defined)) and you use the word "understanding" which bears some problems. There is no research to this because it might be too broadly-defined. There is research to developing models to solve more than task though.  
  
  ---
  
  ## 0 answers
  
  