1. Homepage
  2. Programming
  3. CS2910: Artificial Intelligence - Assessed Coursework 2: Uninformed Search

CS2910: Artificial Intelligence - Assessed Coursework 2: Uninformed Search

Engage in a Conversation
UKRoyal Holloway University of LondonRHULCS2910Artificial IntelligenceUninformed SearchProlog

CS2910 Assessed Coursework 2

CS2910 Assessed Coursework 2 v2.0 CourseNana.COM

1 Learning outcomes assessed

This assignment assesses knowledge and understanding of finding paths using uninformed search implemented in Prolog. In particular, the outcomes assessed are: • knowledge and understanding of uninformed search strategies such as depth-first search; • application of uninformed search strategies to search problems represented as trees and graphs; • implementation of uninformed search strategies in Prolog; • extensions of uninformed search strategies with a cost weighting. CourseNana.COM

2 Instructions

Submit this coursework using Moodle by clicking here. Your submission should consist of a cs2910.zip file, compressing a file named cs2910CW2.pl, containing all parts of the coursework. It is your responsibility to check that the submitted file: CourseNana.COM

  1. is named correctly;
  2. has no syntax errors;
  3. runs with SWI Prolog 7.6+;
  4. is not empty; and
  5. is not corrupted.

Warning: If any of the above conditions (1...5) is violated, your mark will be set to 0. You will be given an opportunity to resubmit for feedback purposes but the marks will not count for assessment. Submission after the deadline will be accepted but it will automatically be recorded as being late and is subject to College Regulations on late submissions. NOTE: All the work you submit should be solely your own work. Coursework submissions are routinely checked for this. Any assessment offence will be investigated subject to the College regulations. CourseNana.COM

3 Searching using Prolog

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 CourseNana.COM

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%] CourseNana.COM

3.2 Paths ending at a common destination

Define a Prolog program that searches bi-directionally from two origins O1 and O2 to meet up at a common destination D. It is up to you how you define that, perhaps by reusing parts of the program you developed for section 3.1, however this time you do not have to check that the input parameters are correct, simply assume they are. Your program should combine a path P1 from O1 to D, with a path P2 from O2 to D, if they exist, to produce a combined path P, showing how you reach meeting point D from O1 and O2 respectively. You are expected to produce all possible combinations P1 and P2 to construct P non-deterministically, if we ask for more answers. Test your program using Fig. 1 by asking different queries and see whether your work produces the expected outcomes. Maximum marks will be obtained for also providing a program that returns only the shortest paths P1 and P2 combined to produce P. [30%] CourseNana.COM

3.3 Paths with Costs

Rewrite the problem description for the program you defined in section 3.1, to include the individual cost C (an integer describing the distance in meters) between locations of the house as shown in Fig. 2. Once you have a new representation that takes individual cost between locations into account, rewrite also you search program to calculate the total cost of a path, so that when you return a path P as a solution, you also return Ctotal . Your new program should also return every path, if there is more than one, returning the cheap ones first, and then the more expensive ones, in rank order. Then use your new program to define how to meet up from two origins O1 and O2 to a destination D (as in 3.2), only if the cost Ctotal is the same from both O1 and O2 respectively. CourseNana.COM

Figure 2: Cost between locations. Test your program using Fig. 1 by asking different queries and see whether your work produces the expected outcomes. [30%] CourseNana.COM

Marking criteria

• Full marks will be given for implementations that address the requirements of all the tasks and their sub-tasks as specified in this document. • Marks will be allocated to the logic of the implementation strategies proposed as well as their implementation . • Marks will also be allocated in solutions which show understanding of Prolog unification, especially on the use of lists, the use of existing primitives that manipulate and generate lists (like append/3, findall/3 or setof/3), including the relevance of all these to the specific search requirements. • Code quality: indentation, comments, variable naming, use of ‘ ’ variables, and appropriate use of Prolog control operators (e.g. the cut operator (!)). • Your code should compile successfully for full marks. If part of your code does not compile, then wrap it in a comment of the form: CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
UK代写,Royal Holloway University of London代写,RHUL代写,CS2910代写,Artificial Intelligence代写,Uninformed Search代写,Prolog代写,UK代编,Royal Holloway University of London代编,RHUL代编,CS2910代编,Artificial Intelligence代编,Uninformed Search代编,Prolog代编,UK代考,Royal Holloway University of London代考,RHUL代考,CS2910代考,Artificial Intelligence代考,Uninformed Search代考,Prolog代考,UKhelp,Royal Holloway University of Londonhelp,RHULhelp,CS2910help,Artificial Intelligencehelp,Uninformed Searchhelp,Prologhelp,UK作业代写,Royal Holloway University of London作业代写,RHUL作业代写,CS2910作业代写,Artificial Intelligence作业代写,Uninformed Search作业代写,Prolog作业代写,UK编程代写,Royal Holloway University of London编程代写,RHUL编程代写,CS2910编程代写,Artificial Intelligence编程代写,Uninformed Search编程代写,Prolog编程代写,UKprogramming help,Royal Holloway University of Londonprogramming help,RHULprogramming help,CS2910programming help,Artificial Intelligenceprogramming help,Uninformed Searchprogramming help,Prologprogramming help,UKassignment help,Royal Holloway University of Londonassignment help,RHULassignment help,CS2910assignment help,Artificial Intelligenceassignment help,Uninformed Searchassignment help,Prologassignment help,UKsolution,Royal Holloway University of Londonsolution,RHULsolution,CS2910solution,Artificial Intelligencesolution,Uninformed Searchsolution,Prologsolution,