# Error in the book Artificial Intellingence Modern Approach (at Un-informed search)? [closed]

Please let me know if this is not appropriate question to ask here (I hope not but afraid since this isn't really theoretical question).

In the book "Artificial Intelligence Modern Approach" (Russell, Norvig) 3rd ed., in Figure 3.14 in page 84, is the 2nd last line error (this is not on current errata) ?

else if child.State is in frontier with higher PATH-COST then
replace that frontier node with child


My guess is:

else if child.State is in frontier with lower PATH-COST then
replace that frontier node with child


This is pseudocode for Un-informed, breadth search, where the search candidates are in a list called frontier, which is lower ordered by PATH-COST. I wonder the suspected code would update the list with the node with higher cost.

Correct me if I'm wrong. Thank you.

## closed as off topic by KavehFeb 23 '12 at 18:01

Questions on Theoretical Computer Science Stack Exchange are expected to relate to research-level theoretical computer science within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to cstheory, a Q&A site for research-level questions in theoretical computer science (TCS). Your question does not appear to be a research-level question in TCS. Please see the FAQ for more information on what is meant by this and suggestions for sites that might welcome your question. Finally, if your question is closed for being out of scope, and you believe you can edit the question to make it a research-level question, please feel free to do so. Closing is not permanent and questions can be reopened, check the FAQ for more information. – Kaveh Feb 23 '12 at 17:59
• There are a number of Q&A sites linked in the FAQ where your question might be appropriate (but read their FAQ before posting). – Kaveh Feb 23 '12 at 18:00

• Thanks, that makes clear what the code is describing, and I see it is correct although confusing. Btw, I don't get why it's called uniform-cost search...I'm seeing the cost b/w nodes varies in the example both in the book and Wikipedia. Think this should be asked separately though. – IsaacS Feb 23 '12 at 17:38