Logic Inference

Due:
11:00pm, December 3, 2021

Description

Write a program that does inference given a partially observed Wumpus World, the knowlege base, and a query. The Wumpus World file and query file must be input to the program as the first and second command line argument respectively. The program output must be in the SMT-LIB v2 format printed to standard out (like the previous assignment.)

A partially observed Wumpus World file has the following format: the first line is an integer representing the grid size and the remaining lines have two integers (representing the coordinate) and a string representing a condition from the set {Breeze, Stench, Glitter, Pit, Wumpus, Gold, NoBreeze, NoStench, NoGlitter, NoPit, NoWumpus, NoGold}. Multiple conditions for the same coordinate are specified on separate lines. Example:

4
2 1 Breeze
1 2 Stench
3 2 Breeze
2 2 NoBreeze

The query file has a single line in the same format described above. Example:

3 1 Pit

The SMT-LIB v2 output of the program should determine if the knowledge base entails the query. That is, when run with z3 the output should be sat or unsat.

You can run your file with z3 as follows:

    ~schwesin/bin/z3 <(./project4 <world file> <query file>)

where project4 is an executable file, <world file> is path to a Wumpus World file, and <query file> is a path to a query file.

Getting the Assignment

The starter code for the assignment is on the Linux server at the path:

/export/home/public/schwesin/csc447/projects/project4-handout

Turning in the Assignment

You must turn in the following files:

  1. project4.x
  2. README

The README file should be a plain ASCII text file (not a Word file, not an RTF file, not an HTML file) describing your design decisions. One or two English paragraphs should suffice. Spelling, grammar, capitalization and punctuation all count.

To submit the assignment, execute the command:

    make submit

from within the assignment directory.

Grading Criteria

Grading (out of 100 points):

Note: if your solution is based on pseudo-code from a source other than the textbook or the lecture slides, then you must cite the source of the pseudo-code. Otherwise, you will receive a grade of zero for this assignment.