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:
project4.x
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):
- 70 points — Specification
- 70 points — meets the specification
- 40 points — partially meets the specification
- 0 points — does not meet the specification
- 15 points — for a clear description in your README
- 15 — thorough discussion of design decisions; a few paragraphs of coherent English sentences should be fine
- 8 — vague or hard to understand; omits important details
- 0 — little to no effort, or submitted an RTF/DOC/PDF file instead of plain TXT
- 15 points — for code cleanliness
- 15 — code is mostly clean and well-commented
- 8 — code is sloppy and/or poorly commented in places
- 0 — little to no effort to organize and document code
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.