Download Knowledge Representation using Structured Objects: Semantic Nets and Frames and more Slides Introduction to Computing in PDF only on Docsity!
CS613 INTRODUCTION TO
ARTIFICIAL INTELLIGENCE
Lecture 8
Knowledge Representation
Common Knowledge Representations
- Production Rules
- Semantic Nets
- Schemata and Frames
- Formal Logic
Prolog
- Prolog was developed for AI applications.
- It specifies rules as Horn clauses, a subset of predicate logic.
- Example male( albert ). male( edward ). female( alice ). female( victoria ). parents( edward , victoria , albert ). parents( alice , victoria , albert ). sisterof( X , Y ) : - female( X ) , parents( X , M , F ) , parents( Y , M , F ).
Prolog Expert System
% Automotive Diagnostic Expert System
defect_may_be(drained_battery) :- user_says(starter_was_ok, yes), user_says(starter_is_ok, no).
defect_may_be(wrong_gear) :- user_says(starter_was_ok, no).
defect_may_be(fuel_system) :- user_says(starter_was_ok, yes), user_says(fuel_is_ok, no).
Semantic nets
- Originally developed by Quillian as a model for human memory
- knowledge is represented as a collection of concepts, represented by nodes (shown as boxes in the diagram), connected together by relationships, represented by arcs (shown as arrows in the diagram).
- Nodes represent objects, concepts, situations
- Edges represent relationships
- certain arcs - particularly isa arcs - allow inheritance of properties.
Semantic nets
- Developments of the semantic nets idea:
- psychological research into whether human memory really was organised in this way.
- used in the knowledge bases in certain expert systems: e.g. PROSPECTOR.
- special-purpose languages have been written to express knowledge in semantic nets.
Semantic Nets
- Relationships
- Frequently used: IS-A, A-KIND-OF, PART-OF
- Can be specified by the designer
- Attributes
- Can be added to the nodes
- Advantages
- Easy to encode and understand
- Disadvantages
- May become large and lead to enormous searches
Semantic Networks
- The ISA (is-a) or AKO (a- kind-of) relation is often used to link instances to classes, classes to superclasses
- Some links (e.g. hasPart) are inherited along ISA paths.
- The semantics of a semantic net can be relatively informal or very formal - often defined at the implementation level
isa
isa
isa isa
Robin
Bird
Animal
Rusty Red
hasPart
Wing
For example, the following:
Inference by Inheritance
- One of the main kinds of reasoning
done in a semantic net is the
inheritance of values along the
subclass and instance links.
- Semantic networks differ in how they
handle the case of inheriting multiple
different values.
- All possible values are inherited, or
- Only the “lowest” value or values are inherited
Conflicting inherited values
Semantic nets
- Problems with semantic nets
- logical inadequacy - vagueness about what types and tokens really mean.
- heuristic inadequacy – finding a specific piece of information could be chronically inefficient.
- trying to establish negation is likely to lead to a combinatorial explosion.
- "spreading activation" search is very inefficient, because it is not knowledge- guided.
Semantic nets
- Attempted improvements
- building search heuristics into the
network.
- more sophisticated logical structure,
involving partitioning.
- these improvements meant that the
formalism’s original simplicity was
lost.