Answers.Body: <p>The short answer, i think, is that it cannot.</p>
  
  <p>The AI system will only do, and it will only be good at the task that the programmer made it for. Of course you could have an AI that, for example, can trigger a prediction on the input with different models depending on some other variables, but that will still be based on what the programmer wrote, it will never be able to do or learn new unintended things. Like having the model.predict() for an image classification NN in a loop and only stop when it detects a dog and then use another model to predict the breed for example.</p>
  
  <p>What you mentioned about "letting the AI lose on the network" usually is part of some concerns about AI that it could evolve, learn new actions and start acting on its own.
  But those people unknowingly are actually talking about a general AI or strong AI, an AI system that could be as smart as a human so it could act in its own too. But as far is a know at least, we are not even close to creating such a system.</p>
  
  <p>Hope I actually answered your question and didn't deviated too much from what you actually asked. Please tell me if so.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T12:18:27.420Z
Answers.Text: There have been plenty of examples of AIs doing unexpected things, but they are still constrained to the domain they are designed for. A Twitter bot may learn to be racist, but it will still only be able to post tweets; it won't be able to stab people.
Answers.UserDisplayName: Criticize SE actions means ban
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-10T23:13:44.830Z
Answers.LastActivityDate: 2019-12-10T23:13:44.830Z
Answers.UserDisplayName: Darius Chira
Answers.Body: <p>You invoke it in a loop. Imagine a digital assistant responding to voice queries. It might look something like this:</p>
  
  <pre><code>for(;;) {
     var audio = RecordSomeAudio();
     var response = model.predict(audio);
     if(response.action == "SAYSOMETHING") {
        PlaySomeAudio(response.output);
     }
  }
  </code></pre>
  
  <p>Note that the model gets invoked repeatedly and can decide in a given situation whether to respond or not. In a digital assistant context, part of the model would be to check for if the user raised a query (e.g. "Hey Google" etc.).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-12T05:55:35.473Z
Answers.LastActivityDate: 2019-12-12T05:55:35.473Z
Answers.UserDisplayName: Morty
Answers.Body: <p>Neural networks, deep learning and other supervised learning algorithms do not "take actions" by themselves, they lack <a href="https://en.wikipedia.org/wiki/Intelligent_agent" rel="noreferrer">agency</a>.</p>
  
  <p>However, it is relatively easy to give a machine agency, as far as taking actions is concerned. That is achieved by connecting inputs to some meaningful data source in the environment (such as a camera, or the internet), and connecting outputs to something that can act in that environment (such as a motor, or the API to manage an internet browser). In essence this is no different from any other automation that you might write to script useful behaviour. If you could write a series of tests, if/then statements or mathematical statements that made useful decisions for any machine set up this way, then in theory a neural network or similar machine learning algorithm could learn to approximate, or even improve upon the same kind of function.</p>
  
  <p>If your neural network has already been trained on example inputs and the correct actions to take to achieve some goal given those inputs, then that is all that is required.</p>
  
  <p>However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge.</p>
  
  <p>There are ways to train neural networks (and learning functions in general) so that they learn useful mappings between observations and actions that progress towards achieving goals. You can use genetic algorithms or other search techniques for instance, and <a href="https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies" rel="noreferrer">the NEAT approach</a> can be successful training controllers for agents in simple environments. </p>
  
  <p><a href="https://en.wikipedia.org/wiki/Reinforcement_learning" rel="noreferrer">Reinforcement learning</a> is another popular method that can also scale up to quite challenging control environments. It can cope with complex game environments such as Defense of the Ancients, Starcraft, Go. The purpose of demonstrating AI prowess on these complex games is in part showing progress towards a longer-term goal of optimal behaviour in the even more complex and open-ended real world. </p>
  
  <p>State of the art agents are still quite a long way from <em>general</em> intelligent behaviour, but the problem of using neural networks in a system that learns how to act as an agent has much research and many examples available online.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T07:45:32.007Z
Answers.Text: "However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge." And if you let it learn based on what they see in unconstrained environments, you can easily get things like Microsoft's Tay turning into a Nazi after spending less than 24 hours on Twitter.
Answers.UserDisplayName: nick012000
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T00:02:04.917Z
Answers.LastActivityDate: 2019-12-11T00:17:51.660Z
Answers.LastEditDate: 2019-12-11T00:17:51.660Z
Answers.UserDisplayName: Neil Slater
Body: <p>Suppose a deep neural network is created using Keras or Tensorflow. Usually, when you want to make a prediction, <strong>the user</strong> would invoke <code>model.predict</code>. However, how would the actual AI system proactively invoke their own actions (i.e. without the need for me to call <code>model.predict</code>)?</p>
  
Tags: <reinforcement-learning><deep-learning><philosophy><agi><intelligent-agent>
Title: How can an AI freely make decisions?
UserDisplayName: joethemow
ThreadText: # How can an AI freely make decisions?
  
  (Asked by: username_0 on 2019-12-10)
  
  Suppose a deep neural network is created using Keras or Tensorflow. Usually, when you want to make a prediction, **the user** would invoke `model.predict`. However, how would the actual AI system proactively invoke their own actions (i.e. without the need for me to call `model.predict`)?
  
  **Tags:** reinforcement-learning, deep-learning, philosophy, agi, intelligent-agent
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2019-12-11. Score: 12 | Accepted answer
  
  Neural networks, deep learning and other supervised learning algorithms do not "take actions" by themselves, they lack [agency](https://en.wikipedia.org/wiki/Intelligent_agent).
  
  However, it is relatively easy to give a machine agency, as far as taking actions is concerned. That is achieved by connecting inputs to some meaningful data source in the environment (such as a camera, or the internet), and connecting outputs to something that can act in that environment (such as a motor, or the API to manage an internet browser). In essence this is no different from any other automation that you might write to script useful behaviour. If you could write a series of tests, if/then statements or mathematical statements that made useful decisions for any machine set up this way, then in theory a neural network or similar machine learning algorithm could learn to approximate, or even improve upon the same kind of function.
  
  If your neural network has already been trained on example inputs and the correct actions to take to achieve some goal given those inputs, then that is all that is required.
  
  However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge.
  
  There are ways to train neural networks (and learning functions in general) so that they learn useful mappings between observations and actions that progress towards achieving goals. You can use genetic algorithms or other search techniques for instance, and [the NEAT approach](https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies) can be successful training controllers for agents in simple environments.
  
  [Reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning) is another popular method that can also scale up to quite challenging control environments. It can cope with complex game environments such as Defense of the Ancients, Starcraft, Go. The purpose of demonstrating AI prowess on these complex games is in part showing progress towards a longer-term goal of optimal behaviour in the even more complex and open-ended real world.
  
  State of the art agents are still quite a long way from *general* intelligent behaviour, but the problem of using neural networks in a system that learns how to act as an agent has much research and many examples available online.
  
  > **Comments:**
  > **username_5**: "However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge." And if you let it learn based on what they see in unconstrained environments, you can easily get things like Microsoft's Tay turning into a Nazi after spending less than 24 hours on Twitter.  
  
  ---
  
  ### Answer by username_1 on 2019-12-10. Score: 3
  
  The short answer, i think, is that it cannot.
  
  The AI system will only do, and it will only be good at the task that the programmer made it for. Of course you could have an AI that, for example, can trigger a prediction on the input with different models depending on some other variables, but that will still be based on what the programmer wrote, it will never be able to do or learn new unintended things. Like having the model.predict() for an image classification NN in a loop and only stop when it detects a dog and then use another model to predict the breed for example.
  
  What you mentioned about "letting the AI lose on the network" usually is part of some concerns about AI that it could evolve, learn new actions and start acting on its own.
  But those people unknowingly are actually talking about a general AI or strong AI, an AI system that could be as smart as a human so it could act in its own too. But as far is a know at least, we are not even close to creating such a system.
  
  Hope I actually answered your question and didn't deviated too much from what you actually asked. Please tell me if so.
  
  > **Comments:**
  > **username_2**: There have been plenty of examples of AIs doing unexpected things, but they are still constrained to the domain they are designed for. A Twitter bot may learn to be racist, but it will still only be able to post tweets; it won't be able to stab people.  
  
  ---
  
  ### Answer by username_3 on 2019-12-12. Score: 2
  
  You invoke it in a loop. Imagine a digital assistant responding to voice queries. It might look something like this:
  for(;;) {
     var audio = RecordSomeAudio();
     var response = model.predict(audio);
     if(response.action == "SAYSOMETHING") {
        PlaySomeAudio(response.output);
     }
  }
  
  Note that the model gets invoked repeatedly and can decide in a given situation whether to respond or not. In a digital assistant context, part of the model would be to check for if the user raised a query (e.g. "Hey Google" etc.).
  
  
  ---
  
  