

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Department of Computer ScienceUniversity of San Francisco
Department of Computer Science — University of San Francisco – p. 1/
??
-^ Logic provides one answer to the question of
how
to say things.
-^ It does not tell us
what
to say.
-^ Typically, this is the hard part. •^ We want to give our agent enough knowledge to solve all of theproblems we are interested in. •^ The process of building a knowledge base is referred to as^ knowledge engineering
◦^ Many of the same principles as software engineering.
Department of Computer Science — University of San Francisco – p. 2/
??
-^ The knowledge engineering process typically consists of thefollowing steps. 1. Determine the queries and types of facts that are
available/allowed ◦^ For example, will the agent need to select actions ormake conclusions, or just answer questions from ahuman user? ◦^ Will we ask existential queries, or just universal queries?
◦^ Interview experts and find out how the domain works.
constants ◦^ This vocabulary is called an
ontology
◦^ Formally represent the knowledge gathered in step 2. ◦^ This may require revisiting step 3.
◦^ This may require returning to steps 3 and 4.
Department of Computer Science — University of San Fra
-^ An ontology is a vocabulary that describes all of the objects ofinterest in the domain and the relations between them.
◦^ All of the relevant knowledge about a problem we areinterested in.
-^ Ontolgies allow knowledge about a domain to be sharedbetween agents (including humans). •^ This can allow knowledge to be reused more easily. •^ Allows an agent to perform inference with its current knowledge.
Department of Computer Science — University of San Francisco – p. 4/
??
-^ An ontology consists of:
◦^ A set of
concepts
or classes
◦^ P rof essor
(Brooks
x P rof essor
(x)
U SF Employee
(x)
-^ Instances of these classes. •^ Relations between classes of objects, sometimes called
slots
or^ properties
or roles
◦^ Salary
(Brooks,
, N ame
(Brooks,
“Chris
-^ Restrictions on slots (sometimes called
facets
x, y P rof essor
(x)
∧^ Salary
(x, y
y <
$1000 Department of Computer Science — University of San Francisco – p. 5/
??
-^ Classes are a primary focus of ontology design. •^ In many ways, this looks like object-oriented design. •^ We have classes and subclasses, and properties of classesthat look like data members. •^ However, slots have richer semantics than data members. •^ A slot may attach to several classes at once. •^ We can specify constraints on the values in a slotâ ˘
A ´Zs range.
-^ Slots can exist without being assigned to a class.
Department of Computer Science — University of San Fra
-^ Logic is a very powerful representation language, but it can bedifficult for humans to work with. •^ In addition, the lack of structure between sentences in a KB canmake inference difficult. •^ A
semantic network
is a way to graphically represent and
reason about some logical concepts.
Department of Computer Science — University of San Francisco – p. 7/
??
-^ SisterOf
(M ary, John
-^ F emale
(M ary
xF emale
(x)
P erson
(x)
-^ M ale
(John
xM ale
(x)
P erson
(x)
xP erson
(x)
M ammal
(x)
xP erson
(x)
Def aultN umberOf Legs
(x,
-^ legs
(John,
Department of Computer Science — University of San Francisco – p. 8/
??
-^ Inference becomes easy in a semantic net; to answer questionsabout John, we follow the labeled edges emanating from the^ John
node. ◦^ This is the same sort of inference done by modern OOlanguages to resolve inheritance.
-^ Strengths: Knowledge is easily visualized, relationshipsbetween objects are clearer. •^ Weaknesses: only binary relations, no negation, disjunction, orexistential quantifiers.
◦^ We can extend semantic nets to include these features, butwe lose the transparency. ◦^ Instead, use a semantic net to model class/slot relations,and FOL (or something similar) to model rules.
Department of Computer Science — University of San Fra
-^ Protege is a Java-based graphical tool for constructingontologies. •^ Has a rich set of plugins for performing inference andvisualizing data. •^ Can export data in RDF and OWL for use with the SemanticWeb.
Department of Computer Science — University of San Francisco – p. 10/
??
-^ Let’s make a simple ontology to describe the USF CSdepartment. •^ We begin by asking
competency questions
questions weâ ˘
A ´Zd like our KB to be able to answer.
◦^ Who is taking CS662? ◦^ Which professors teach classes on Monday? ◦^ How many students are taking both CS662 and CS601? ◦^ What classes should one take before taking CS662? ◦^ Which professors assign the most work?
Department of Computer Science — University of San Francisco – p. 11/
??
-^ As with OO design, we can work top-down, bottom-up, or in acombination of the two. •^ Letâ ˘
A ´Zs start by making a Person class.
-^ We can then subclass that to make Professors and Students. •^ Students have GradStudent and UndergradStudent subclasses. •^ Letâ ˘
A ´Zs also make a separate class representing courses.
Department of Computer Science — University of San Fran