Answers.Body: <p>In the case of UCS, the <em>evaluation function</em> (that is, the function that is used to select the next node to <em>expand</em>) is <span class="math-container">$f(n) = g(n)$</span>, where <span class="math-container">$g(n)$</span> is the cost of the path from the initial node to <span class="math-container">$n$</span>, while in the case of the greedy BFS it is <span class="math-container">$f(n) = h(n)$</span>, where <span class="math-container">$h(n)$</span> is the heuristic function that estimates the cost of the path from <span class="math-container">$n$</span> to the goal node. In other words, in the case of UCS, nodes are expanded only using the experience (in the form of <span class="math-container">$g(n)$</span>), while, in the case of GBFS, nodes are expanded only using the estimate of the cost to the goal. Note that, in both cases, the node that is chosen to be expanded is the one with the smallest <span class="math-container">$f(n)$</span> value.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-16T01:56:50.377Z
Answers.LastActivityDate: 2019-07-06T20:41:47.510Z
Answers.LastEditDate: 2019-07-06T20:41:47.510Z
Answers.UserDisplayName: user23973
Body: <p>What are the differences between the uniform-cost search (UCS) and greedy best-first search (GBFS) algorithms? How would you convert a UCS into a GBFS?</p>
  
Tags: <comparison><search><uniform-cost-search><best-first-search>
Title: What are the differences between uniform-cost search and greedy best-first search?
UserDisplayName: Abbas Ali
ThreadText: # What are the differences between uniform-cost search and greedy best-first search?
  
  (Asked by: username_0 on 2018-11-12)
  
  What are the differences between the uniform-cost search (UCS) and greedy best-first search (GBFS) algorithms? How would you convert a UCS into a GBFS?
  
  **Tags:** comparison, search, uniform-cost-search, best-first-search
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-16. Score: 4
  
  In the case of UCS, the *evaluation function* (that is, the function that is used to select the next node to *expand*) is $f(n) = g(n)$, where $g(n)$ is the cost of the path from the initial node to $n$, while in the case of the greedy BFS it is $f(n) = h(n)$, where $h(n)$ is the heuristic function that estimates the cost of the path from $n$ to the goal node. In other words, in the case of UCS, nodes are expanded only using the experience (in the form of $g(n)$), while, in the case of GBFS, nodes are expanded only using the estimate of the cost to the goal. Note that, in both cases, the node that is chosen to be expanded is the one with the smallest $f(n)$ value.
  
  
  ---
  
  