proj1 - Project 1 Using SNARK for an Ontology of Household...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 1 Using SNARK for an Ontology of Household Items CSE 4/563, Knowledge Representation Due Tuesday, October 12, 2010 Professor Stuart C. Shapiro September 21, 2010 1 Introduction 1.1 Ontologies In philosophy, “ontology” is the study of what there is. In AI, there have been many definitions of “ontology”, but simply put, an “ontology” is a taxonomy of the terms in some domain of knowledge, possibly along with other domain rules relating the terms. In this project you will create an ontology of items typically found in a home, represent the ontology in the language of SNARK [1], and use SNARK to answer some questions about the ontology. 1.2 SNARK SNARK (SRI’s New Automated Reasoning Kit) [1] may be used as a KRR system by performing the following steps. (See also [2].) 1. Run Common Lisp on timberlake.cse.buffalo.edu or on nickelback.cse.buffalo.edu . 2. Load the ask / query SNARK interface and SNARK itself, by entering the Lisp command :ld /projects/shapiro/CSE563/ask 3. Change the Common Lisp listener’s package to snark-user by entering the Lisp command :pa snark-user 4. Load a knowledge base. 5. Ask the system questions. The first Lisp form in the knowledge base file must be (initialize) . This must be followed by assertions in the format (assert wfp ) , where wfp is a quoted form in the syntax required by SNARK. This is a CLIF- like syntax using the connectives not , and , or , implies , and iff . “Various synonyms are accepted” [1], in- cluding => for implies . Then prove may be called, or, as an alternative, the query or ask function from /projects/shapiro/CSE563/ask.cl may be used. Note that if you use prove you must evaluate (new-row-context) between successive calls to prove . For an example knowledge base (KB) file, see /projects/shapiro/CSE563/Examples/SNARK/CarPoolWorld.cl . 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
An example run of a propositional CarPoolWorld system using SNARK and the query front end follows. Most of the output produced by the loading of snark has been deleted. cl-user(1): :ld /projects/shapiro/CSE563/Examples/SNARK/CarPoolWorld ... To start using SNARK, change the package to snark-user. Then use (initialize), (assert <wfp>), and (prove <wfp>). ; Running SNARK from . .. Ask if ‘‘Tom is the driver or Betty is the driver’’ is logically entailed by the KB. (True.) (ask ’(or TomIsTheDriver BettyIsTheDriver)) = True Ask if ‘‘Betty is the driver implies that Betty is not the passenger’’ is logically entailed. (True.) (ask ’(=> BettyIsTheDriver (not BettyIsThePassenger))) = True Ask if ‘‘Tom drives Betty and Tom is the passenger’’ is logically entailed. (False.) (ask ’(and TomDrivesBetty TomIsThePassenger)) = False Ask if ‘‘Betty drives Tom’’ is logically entailed by the KB. (Unknown.) (ask ’BettyDrivesTom) = Unknown Notice that (ask wfp ) can return True , False , or Unknown . It returns True if wfp is logically entailed by the KB, False if (not wfp ) is logically entailed by the KB, and Unknown if there are models that satisfy KB
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

proj1 - Project 1 Using SNARK for an Ontology of Household...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online