b) Refer to the pseudocode snippet below, which refers to a well-known search algorithm. Briefly explain what issue this

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

b) Refer to the pseudocode snippet below, which refers to a well-known search algorithm. Briefly explain what issue this

Post by answerhappygod »

B Refer To The Pseudocode Snippet Below Which Refers To A Well Known Search Algorithm Briefly Explain What Issue This 1
B Refer To The Pseudocode Snippet Below Which Refers To A Well Known Search Algorithm Briefly Explain What Issue This 1 (32.66 KiB) Viewed 26 times
b) Refer to the pseudocode snippet below, which refers to a well-known search algorithm. Briefly explain what issue this algorithm has in relation to searching over local minima. Modify the algorithm to add exploratory behaviour. You can provide your answer as a simple pseudocode. [8 marks] 1. currentSolution = copy(startSolution); 2. bestSolution = copy(currentSolution); bestEval evaluate (currentSolution); 3. improved=false; 4. while (termination criteria not satisfied) { 5. neighborsSet = NeigborsOf(currentSolution); for all s in neighborsSet { 6. 7. tmpEval= evaluate(s); if (tmpEval < bestEval) { 8. 9. bestSolution = s; bestEval= tmpEval; improved=true; } // end if 10. 11. } // end for 12. if (improved) currentSolution = copy(bestSolution); 13. else return currentSolution; 14. } //end while
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply