Answers.Body: <p>One way to think of the difference between search and learning is that search usually entails a search key, and an algorithm hunts through the structure looking for a match between the key and an already-existing item. Whereas learning is the creation of the structure in the first place. But search and learning are related in that on receipt of an input (say from one or more sensors) the structure is initially searched to see if the input already exists, but if it doesn't then current input (when certain conditions are met) is added to the structure, and learning follows a failure of search. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-26T04:16:46.237Z
Answers.LastActivityDate: 2019-05-26T04:16:46.237Z
Answers.UserDisplayName: Roddus
Answers.Body: <p>In the context of AI:</p>
  
  <ol>
  <li><p><strong>Search</strong> refers to Simon &amp; Newell's <a href="https://en.wikipedia.org/wiki/General_Problem_Solver" rel="nofollow noreferrer">General Problem Solver</a>, and it's many (many) descendant algorithms. These algorithms take the form:</p>
  
  <p>a. Represent a current state of some part of the world as a vertex in a graph.</p>
  
  <p>b. Represent, connected to the current state by edges, all states of the world that could be reached from the current state by changing the world with a single action, and represent all subsequent states in the same manner.</p>
  
  <p>c. Algorithmically find a sequence of actions that leads from a current state to some more desired goal state, by walking around on this graph.</p></li>
  </ol>
  
  <p>An example of an application that uses search is Google Maps. Another is Google Flights.</p>
  
  <ol start="2">
  <li><p><strong>Learning</strong> refers to any algorithm that refines a belief about the world through the exposure to experiences or to examples of others' experiences. Learning algorithms do not have a clear parent, as they were developed separately in many different subfields or disciplines. A reasonable taxonomy is the <a href="https://medium.com/42ai/the-5-tribes-of-the-ml-world-670ebce96b4c" rel="nofollow noreferrer">5 tribes</a> model. Some learning algorithms actually use search within themselves to figure out how to change their beliefs in response to new experiences! </p>
  
  <p>An example of a learning algorithm used today is <a href="https://en.wikipedia.org/wiki/Q-learning" rel="nofollow noreferrer">Q-learning</a>, which is part of the more general family of <a href="https://en.wikipedia.org/wiki/Reinforcement_learning" rel="nofollow noreferrer">reinforcement learning</a> algorithms. Q-learning works like this:</p>
  
  <p>a. The learning program (usually called the <em>agent</em>) is given a representation of the current state of the world, and a list of actions that it could choose to perform.</p>
  
  <p>b. If the agent has not seen this state of the world before, it assigns a random number to the reward it expects to get for performing each action. It stores this number as <span class="math-container">$Q(s,a)$</span>, its guess at the quality of performing action <span class="math-container">$a$</span> in-state <span class="math-container">$s$</span>.</p>
  
  <p>c. The agent looks at <span class="math-container">$Q(s,a)$</span> for each action it could perform. It picks the best action with some probability <span class="math-container">$\epsilon$</span> and otherwise acts randomly.</p>
  
  <p>d. The action of the agent causes the world to change and may result in the agent receiving a reward from the environment. The agent makes a note of whether it got a reward (and how much the reward was), and what the new state of the world is like. It then adjusts its belief about the quality of performing the action it performed in the state it used to be in, so that its belief about the quality of that action is closer to the reality of the reward it got, and the quality of where it ended up.</p>
  
  <p>e. The agent repeats steps b-d forever. Over time, its beliefs about the quality of different state/action pairs will converge to match reality more and more closely.</p></li>
  </ol>
  
  <p>An example of an application that uses learning is AI.SEs recommendations, which are made by a program that likely analyzes the relationships between different combinations of words in pairs of posts, and the likelihood that someone will click on them. Every time someone clicks on them, it learns something about whether listing a post as related is a good idea or not. Facebook's feed is another everyday example. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-12T13:17:57.890Z
Answers.Text: This answer is correct, but I think it should be noted that learning algorithms _can be viewed as_ search algorithms (not necessarily in the same way as you describe search algorithms, which is the typical way of describing traditional search algorithms, such as A*, where you represent the state space as a graph, states as nodes and connections between those states as edges). For example, we can view Q-learning as searching for state-action value function over some space of state-action value functions.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-12T18:54:53.493Z
Answers.Text: @nbro I think that's true also. In the context of the Sutton quote though I'm quite sure he is thinking of search in the classic AI sense, rather than optimization of functions, since he lists the two ideas as separate.
Answers.UserDisplayName: John Doucette
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-13T21:10:42.090Z
Answers.LastActivityDate: 2019-05-18T22:49:25.160Z
Answers.LastEditDate: 2019-05-18T22:49:25.160Z
Answers.UserDisplayName: John Doucette
Body: <p>I came across an article, <a href="http://www.incompleteideas.net/IncIdeas/BitterLesson.html" rel="nofollow noreferrer">The Bitter Truth</a>, via the <a href="https://www.youtube.com/watch?v=wEgq6sT1uq8" rel="nofollow noreferrer">Two Minute Papers</a> YouTube Channel. Rich Sutton says...</p>
  <blockquote>
  <p>One thing that should be learned from the bitter lesson is the great power of general purpose methods, of methods that continue to scale with increased computation even as the available computation becomes very great. The two methods that seem to scale arbitrarily in this way are <strong>search</strong> and <strong>learning</strong>.</p>
  </blockquote>
  <p>What is the difference between search and learning here? My understanding is that learning is a form of search -- where we iteratively search for some representation of data that minimizes a loss function in the context of deep learning.</p>
  
Tags: <machine-learning><deep-learning><comparison><philosophy><search>
Title: What is the difference between search and learning?
UserDisplayName: nvi
ThreadText: # What is the difference between search and learning?
  
  (Asked by: username_0 on 2019-04-13)
  
  I came across an article, [The Bitter Truth](http://www.incompleteideas.net/IncIdeas/BitterLesson.html), via the [Two Minute Papers](https://www.youtube.com/watch?v=wEgq6sT1uq8) YouTube Channel. Rich Sutton says...
  
  > One thing that should be learned from the bitter lesson is the great power of general purpose methods, of methods that continue to scale with increased computation even as the available computation becomes very great. The two methods that seem to scale arbitrarily in this way are **search** and **learning**.
  
  What is the difference between search and learning here? My understanding is that learning is a form of search -- where we iteratively search for some representation of data that minimizes a loss function in the context of deep learning.
  
  **Tags:** machine-learning, deep-learning, comparison, philosophy, search
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-04-13. Score: 9 | Accepted answer
  
  In the context of AI:
  
  1. **Search** refers to Simon & Newell's [General Problem Solver](https://en.wikipedia.org/wiki/General_Problem_Solver), and it's many (many) descendant algorithms. These algorithms take the form:
  
     a. Represent a current state of some part of the world as a vertex in a graph.
  
     b. Represent, connected to the current state by edges, all states of the world that could be reached from the current state by changing the world with a single action, and represent all subsequent states in the same manner.
  
     c. Algorithmically find a sequence of actions that leads from a current state to some more desired goal state, by walking around on this graph.
  
  An example of an application that uses search is Google Maps. Another is Google Flights.
  
  2. **Learning** refers to any algorithm that refines a belief about the world through the exposure to experiences or to examples of others' experiences. Learning algorithms do not have a clear parent, as they were developed separately in many different subfields or disciplines. A reasonable taxonomy is the [5 tribes](https://medium.com/42ai/the-5-tribes-of-the-ml-world-670ebce96b4c) model. Some learning algorithms actually use search within themselves to figure out how to change their beliefs in response to new experiences!
  
     An example of a learning algorithm used today is [Q-learning](https://en.wikipedia.org/wiki/Q-learning), which is part of the more general family of [reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning) algorithms. Q-learning works like this:
  
     a. The learning program (usually called the *agent*) is given a representation of the current state of the world, and a list of actions that it could choose to perform.
  
     b. If the agent has not seen this state of the world before, it assigns a random number to the reward it expects to get for performing each action. It stores this number as $Q(s,a)$, its guess at the quality of performing action $a$ in-state $s$.
  
     c. The agent looks at $Q(s,a)$ for each action it could perform. It picks the best action with some probability $\epsilon$ and otherwise acts randomly.
  
     d. The action of the agent causes the world to change and may result in the agent receiving a reward from the environment. The agent makes a note of whether it got a reward (and how much the reward was), and what the new state of the world is like. It then adjusts its belief about the quality of performing the action it performed in the state it used to be in, so that its belief about the quality of that action is closer to the reality of the reward it got, and the quality of where it ended up.
  
     e. The agent repeats steps b-d forever. Over time, its beliefs about the quality of different state/action pairs will converge to match reality more and more closely.
  
  An example of an application that uses learning is AI.SEs recommendations, which are made by a program that likely analyzes the relationships between different combinations of words in pairs of posts, and the likelihood that someone will click on them. Every time someone clicks on them, it learns something about whether listing a post as related is a good idea or not. Facebook's feed is another everyday example.
  
  > **Comments:**
  > **username_3**: This answer is correct, but I think it should be noted that learning algorithms _can be viewed as_ search algorithms (not necessarily in the same way as you describe search algorithms, which is the typical way of describing traditional search algorithms, such as A*, where you represent the state space as a graph, states as nodes and connections between those states as edges). For example, we can view Q-learning as searching for state-action value function over some space of state-action value functions.  
  > **username_2**: @username_3 I think that's true also. In the context of the Sutton quote though I'm quite sure he is thinking of search in the classic AI sense, rather than optimization of functions, since he lists the two ideas as separate.  
  
  ---
  
  ### Answer by username_1 on 2019-05-26. Score: 0
  
  One way to think of the difference between search and learning is that search usually entails a search key, and an algorithm hunts through the structure looking for a match between the key and an already-existing item. Whereas learning is the creation of the structure in the first place. But search and learning are related in that on receipt of an input (say from one or more sensors) the structure is initially searched to see if the input already exists, but if it doesn't then current input (when certain conditions are met) is added to the structure, and learning follows a failure of search.
  
  
  ---
  
  