Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. QA Testing
  3. Question
QA Testing

Explain the uniform cost search pseudocode.

Asked by Ananya Pawar May 10, 2022 1.3K views 1 answer
Share

About this question

On page 84 of Russell & Norvig book "Artificial Intelligence: A Modern Approach Book'' (3rd edition), the pseudocode for uniform cost search is given. I provided a screenshot of it here for your convenience.

I am having trouble understanding the highlighted line if child.STATE is not in explored **or** frontier then Shouldn't that be if child.STATE is not in explored **and** frontier then

The way it's written, it seems to suggest that if the child node has already been explored, but not currently in the frontier, then we add it to the frontier, but I don't think that's correct. If it's already been explored, then it means we already found the optimal path for this node previously and should not be processing it again. Is my understanding wrong?

Your answer

1 Answer

More QA Testing discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest QA Testing Blogs

Guides, tips and career advice on QA Testing from JanBask experts.