Question: My question: How do I just return the shortest path with no cost, ie the shortest list from all paths?? This is a additional question
My question: How do I just return the shortest path with no cost, ie the shortest list from all paths?? This is a additional question from me!! Please provide code in prolog. Thanks!!

3.1 Finding a path Consider the plan of a house as shown in Fig. 1. Write a Prolog description of this plan that allows a Prolog program search for paths between locations indicated on the plan. For example, if one is Outside and wishes to find a path to the WC, then a possible answer can be: Outside Porch 1 Kitchen Leaving Room Corridor WC. Your program should Figure 1: Top view of a two bedroom house showing how different locations in and out of the house are connected. avoid loops and be as general as possible, in that, given any two locations representing an origin O and a destination D, it returns: - a path P from O to D, if it exists; - every possible path P from O to D, if there are more than one; - meaningful error messages, if the wrong input is provided for O and D. Comment the code submitted for this part to contain the name of the search algorithm that you selected to find the path. [40%]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
