Professional Documents
Culture Documents
KBAI Lec2-Knowledge Represenation
KBAI Lec2-Knowledge Represenation
KBAI Lec2-Knowledge Represenation
Lecture 2
The Spirit and Pragmatics of KBS, Knowledge
Representations
3/17/2024 1
Recall: The KBAI behavior is driven by knowledge
❑ KBAI acts accurately on problem-solving only when it has knowledge or experience about the input problem
domain.
❑ The KB system actions are justified by sensing the environment (Taking input) and
using knowledge
❑ Earlier KB Components
1. knowledge base
• contains essential information about the problem domain
• often represented as facts and rules
2. inference engine
• mechanism to derive new knowledge from the knowledge
base and the information provided by the user
• often based on the use of rules
3. user interface
• interaction with end users
• development and maintenance of the knowledge base
3/17/2024 2
Recall: The KBAI behavior is driven by knowledge
• knowledge acquisition
• transfer of knowledge from humans to computers
• sometimes knowledge can be acquired directly from
the environment
• machine learning
• knowledge representation
• suitable for storing and processing knowledge in
computers
• inference
• mechanism that allows the generation of new
conclusions from existing knowledge in a computer
• explanation
• illustrates to the user how and why a particular
solution was generated
3/17/2024 3
Recall: The KBAI behavior is driven by knowledge
• Key issues:
• Representation of knowledge → knowledge base
• Reasoning processes → inference/reasoning
3/17/2024 4
Lecture Agenda
3/17/2024 5
1. knowledge
Two hypotheses:
3/17/2024 7
1. Knowledge Data Pyramids
3/17/2024 8
1. Knowledge Data Pyramid
3/17/2024 9
1. Knowledge Data Pyramid
Algorithms
+ Data Structures
Meta- = Programs
Knowledge
Data
Knowledge
Noise + Inference
= Expert System
Data Pyramid
Knowledge-Based Systems
3/17/2024 10
1. What is Knowledge Representation?
❑Knowledge Representation and Reasoning (KR, KRR) represents information from the real
world for a computer to understand and then utilize this knowledge to solve complex real-life
problems like communicating with human beings in natural language. Knowledge representation in
AI is not just about storing data in a database, it allows a machine to learn from that knowledge and
behave intelligently like a human being.
❑The different kinds of knowledge that need to be represented in AI are Objects, Events,
Performance, Facts, Meta-Knowledge , Knowledge-base
3/17/2024 11
2. Five Types of Knowledge
1. Declarative Knowledge –
▪ It includes concepts, facts, and objects and is expressed in a
declarative sentence. ( What instead of how)
2. Structural Knowledge
▪ It is a basic problem-solving knowledge that describes the
relationship between concepts and objects.
3. Procedural Knowledge
▪ This is responsible for knowing how to do something and
includes rules, strategies, procedures, etc.
4. Meta Knowledge
▪ Meta Knowledge defines knowledge about other types of
Knowledge.
5. Heuristic Knowledge
▪ This represents some expert knowledge in the field or
subject.
3/17/2024 12
2. Five Types of Knowledge Example
Procedural style:
3/17/2024 13
3. Cycle of Knowledge Representation
▪ Artificial intelligent Systems usually consist of various components to display their
intelligent behavior. Some of these components include:
1. Perception
2. Learning
3. Knowledge Representation & Reasoning
4. Planning
5. Execution
3/17/2024 14
3. Cycle of Knowledge Representation
1. Perception component retrieves data or information from the environment. Find out the source of the noises
and check if the AI was damaged by anything. Also, it defines how to respond when any sense has been
detected.
2. Learning Component learns from the captured data by the perception component. The goal is to build
computers that can be taught instead of programming them. Learning focuses on the process of self-
improvement. To learn new things, the system requires knowledge acquisition, inference, acquisition of
heuristics, faster searches, etc.
3. Knowledge Representation and Reasoning which shows the human-like intelligence in the machines.
Knowledge representation is all about understanding intelligence. Instead of trying to understand or build
brains from the bottom up, its goal is to understand and build intelligent behavior from the top down and focus
on what an agent needs to know to behave intelligently. Also, it defines how automated reasoning procedures
can make this knowledge available as needed.
4. Planning and Execution components depend on the analysis of knowledge representation and reasoning.
Planning includes giving an initial state, finding its preconditions and effects, and a sequence of actions to
achieve a state in which a particular goal holds.
5. The final stage is the execution of the entire process.
3/17/2024 15
4. Knowledge Representation Requirements
✓ Representational Accuracy
▪ It should represent all kinds of required knowledge.
✓ Inferential Adequacy (()الكفاية االستداللية
▪ It should be able to manipulate the representational structures to produce new
knowledge corresponding to the existing structure.
✓ Inferential Efficiency ()الكفاءة االستداللية
▪ The ability to direct the inferential knowledge mechanism in the most productive
directions by storing appropriate guides.
✓ Acquisitional efficiency
▪ The ability to acquire new knowledge easily using automatic methods.
3/17/2024 16
5. Knowledge Representation Approaches
1. Simple Relational Knowledge
✓ It is the simplest way of storing facts which uses the relational method.
✓ Here, all the facts about a set of objects are set out systematically in columns.
✓ Also, this approach of knowledge representation is famous in database systems where the relationship
between different entities is represented. Thus, there is little opportunity for inference.
Example:
This is an example of representing simple relational knowledge. Emp ID Name Age
100071 John 25
100056 Amanda 23
2. Inferential Knowledge 100042 Sam 27
• The inferential knowledge approach represents knowledge
in the form of formal logic. Thus, it can be used to derive more facts. Also, it guarantees correctness.
Example:
Statement 1: John is a cricketer.
Statement 2: All cricketers are athletes.
Then it can be represented as; Cricketer(John) ∀x = Cricketer (x) -> Athelete (x)s
3/17/2024 17
5. Knowledge Representation Approaches
3. Inheritable Knowledge
▪ In the inheritable knowledge approach, all data must be stored in a hierarchy of
classes and should be arranged in a generalized form or a hierarchal manner.
▪ The approach contains inheritable knowledge which shows a relation between
instance and class, and it is called instance relation.
▪ In this approach, objects and values are represented in Boxed nodes.
• Example:
3/17/2024 18
6. Formal Knowledge Representation
There are four techniques for representing knowledge such as:
1. Logical Representation:
Logic was originally developed as a language for mathematical reasoning, as a Need for semantics
shared by most researchers in knowledge representation
Logic definitions as mathematical definitions are exact and complete. E.g.: triangle: shape defined by three
points that are not on a straight line and that are connected by a line.
In time logic has become the dominant language as probability theory for uncertainty reasoning
3/17/2024 20
6. Formal Knowledge Representation Logical
Representation
Any language with sufficient expressive power can be used with emphasis on:
• What is represented ≡ content ⇒ Knowledge level (rather than symbol level )
• Statements must be interpreted in relationship to other statements (otherwise no knowledge )
• This implies: language should have a truth theory
• Not a single language, but a spectrum of languages (from simple, computationally tractable, to
complex, computationally intractable
3/17/2024 21
6. Formal Knowledge Representation Logical
Representation
• Tradeoff between expressive power and computational complexity. E.g.: First-order logic versus
(Finite) propositional logic (NP-complete problem)
• Advantages:
• Logical representation helps to perform logical reasoning.
• This representation is the basis for the programming languages.
• Disadvantages:
• Logical representations have some restrictions and are challenging to work with.
• This technique may not be very natural, and inference may not be very efficient.
3/17/2024 22
6. Formal Knowledge Representation Semantic
Network Representation
3/17/2024 23
6. Formal Knowledge Representation Semantic
Network Representation
❑Advantages:
❑Disadvantages:
3/17/2024 24
6. Formal Knowledge Representation Frame
• Frame Representation
• A frame is a record-like structure that consists of a collection of attributes and values to
describe an entity in the world.
• It consists of a collection of slots and slot values of any type and size. Slots have names and
values which are called facets.
• Advantages:
• It makes the programming easier by grouping the related data.
• Frame representation is easy to understand and visualize.
• It is very easy to add slots for new attributes and relations.
• Also, it is easy to include default data and search for missing values.
• Disadvantages:
• In frame system inference, the mechanism cannot be easily processed.
• The inference mechanism cannot be smoothly proceeded by frame representation.
• It has a very generalized approach.
3/17/2024 25
6. Formal Knowledge Representation Production
Rules
• Production Rules
▪ In production rules, the agent checks for the condition and if the condition exists then the
production rule fires, and corresponding action is carried out.
▪ The condition part of the rule determines which rule may be applied to a problem. Whereas,
the action part carries out the associated problem-solving steps.
▪ This complete process is called a recognize-act cycle.
3/17/2024 26
6. Formal Knowledge Representation Production
Rules
❑Advantages:
❑Disadvantages:
• It does not exhibit any learning capabilities and does not store the result of the problem for
future use.
• During the execution of the program, many rules may be active. Need Conflict resolution
methodology
.
3/17/2024 27
7. Which domains are worth building into an
expert system?
• Mike Greenwell’s classification of types of expertise, according to identifiable mental components of
the skill (with examples):[source: Greenwell (1988)]
3/17/2024 28
7. Which domains are worth building into an
expert system?
3/17/2024 29
7. Which domains are worth building into an
expert system?
3/17/2024 30
7. Which domains are worth building into an
expert system?
3/17/2024 31
7. Which domains are worth building into an
expert system?
3/17/2024 32
7. Which domains are worth building into an
expert system?
3/17/2024 33
7. Which domains are worth building into an
expert system?
3/17/2024 34
End of Lecture
End of Lecture
3/17/2024 35