18-19-KRR-MSc-CW2-prolog-kb+winograd.pdf - Coursework for...

  • No School
  • AA 1
  • 6

This preview shows page 1 - 3 out of 6 pages.

Coursework for COMP5450M Knowledge Representation and Reasoning Prolog Knowledge Base & Winograd Challenge Due 10am, Friday 7th December, 2018 This coursework counts for 25% of the total marks for this module. You may do this coursework in pairs . Part I: Solving a Planning Problem using Prolog For this question, you will complete the coding of a Prolog program, which uses Prolog’s search capabilities to find the solution to a well known puzzle. The puzzle goes as follows: Three frogs and three toads are lined up in the configuration illustrated in the Starting State figure below. The frogs are on the right and the toads on the left. By a series of valid amphibian moves you must transform the state to the Goal state, also illustrated below. But the frogs and toads can only move in accordance with the following specification: Only one amphibian (i.e. frog or toad) can move at a time. Frogs can only move to the left and toads can only move to the right. Each move is ether a crawl or a hop. A crawl is a move to an adjacent empty space. A hop is a move to an empty space that is two spaces away from the starting space, such that the space between the start and end of the hop is occupied by another amphibian. Frogs can only hop over toads and toads can only hop over frogs. Starting State Goal State To solve this puzzle, you should use the bb planner.pl Prolog program. In order to config- ure it to solve this particular problem you will need to define the predicates initial state/1 , goal state/1 and transition . 1
Image of page 1
Preliminaries As a starting point for answering this question, three program files are provided on the SWISH Prolog system. These are: bb planner.pl This Prolog program implements a simple breadth-first planner program. bb jugs.pl This is an example file, which illustrates the use of the bb planner to solve a simple puzzle. frog+toad template.pl This is a template for you answer file. You should copy it by selecting ”Save” from the File menu. Then rename it by entering a new name, which should be username frog+toad.pl where username is your actual university of leeds username. Then press the ‘Fork’ button on the right of the name entry box. Then press the ‘Fork Program’ button at the bottom of the dialogue window. Mark Scheme To answer the Frog and Toad puzzle question please complete the following steps: a) Before completing the program, you will first need to work out a representation for pos- sible states that the frogs and toads can be in during the movement sequence. Give a specification and brief explanation of the representation you have devised for these states.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 6 pages?

  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors