unit4_knowledge_rep
unit4_knowledge_rep
Chapter 4:
Artificial Intelligence (UCS411)
Chapter Content
• Ontologies, foundations of knowledge representation and
reasoning
• Representing and reasoning about objects, relations, events,
actions, time, and space;
• Predicate logic, situation calculus, description logics
• Reasoning with defaults, reasoning about knowledge,
• Sample applications.
• In this example, there is one decision-maker whose actions are justified by sensing
the environment and using knowledge.
• But, if we remove the knowledge part here, it will not be able to display any
intelligent behavior.
Syntax
It decides how we can construct legal sentences in logic.
It determines which symbol we can use in knowledge representation.
Also, how to write those symbols.
Semantics
Semantics are the rules by which we can interpret the sentence in the logic.
It assigns a meaning to each sentence.
It is of two types
• Propositional Logic
• Predicate Logic
Propositional Logic
• It is the simplest form
• We write in terms of statements (Proposition)
• The outcome of these proposition is either True or False (1 or 0)
• Example: 2 is a prime number(T)
27 is a prime number (F)
• Also it is called Boolean logic
• Represented by Cap letter.
• For example: K= 2 is a prime number(T)
L= 27 is a prime number (F)
Logical Connectives
Example
It is hot
It is humid
It is raining
Write down the proposition logic for
1. If it is humid then it is hot
2. If it is hot and humid then it is not raining
Solution
Take A= It is hot
B = It is humid.
C= It is raining.
1. B → A
2. (A ∧ B) → ¬ C
Statements which are questions, commands, or opinions are not propositions such as
• Where is Ram?
• How do you do?
• What is your name?
• x is greater than 10.
Predicates
• Predicates is nothing but relations between 2 objects
• Example: Simba likes orange
• LIKES (Simba, Orange);
• In more general forms LIKES(X,Y);
Example
Example 1: All man play cricket.
It can be converted into FOL as ∀x : man(x) → play (x, cricket).
Example 2: Some boys are intelligent. ∃x: boys(x) ∧ intelligent(x)
Connectives
Advanatages
• Logical representation help to perform logical reasoning
• This representation is the basis for the programming languages
Disadvantage
• 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.
Statements:
Jerry is a cat.
Jerry is a mammal.
Jerry is owned by Priya.
Jerry is white colored.
All Mammals are animal.
Solutions
1 Tom is a cat.
2 Tom caught a bird.
3 Tom is owned by John.
4 Tom is ginger in colour.
5 Cats like cream.
6 The cat sat on the mat.
7 A cat is a mammal.
8 A bird is an animal.
9 All mammals are animals.
10 Mammals have fur.
Example
class Book {
Person author;
String title;
int price;
}
Slots and the corresponding slot-values are inherited through the class hierarchy
Advantages
1 It makes the programming easier by grouping the related data.
2 Frame representation is easy to understand and visualize.
3 It is very easy to add slots for new attributes and relations.
4 Also, it is easy to include default data and search for missing
values.
Disadvantages
1 In frame system, inference mechanism cannot be easily
processed.
2 It has a very generalized approach.
Example
IF (at station AND train arrives) THEN action (get into the train)
IF (on the train AND empty seat) THEN action (sit down).
IF (on train AND unpaid) THEN action (pay charges).
IF (train arrives at destination) THEN action (get down from the train).
Advantages
1 The production rules are expressed in natural language.
2 The production rules are highly modular, so we can easily
remove, add or modify an individual rule.
Disadvantages
1 Production rule system does not exhibit any learning
capabilities, as it does not store the result of the problem for
the future uses.
2 During the execution of the program, many rules may be active
hence rule-based production systems are inefficient.
Definition of Ontology
A defined model that organizes structured and unstructured
information through entities, their properties, and the way they
relate to one another.
Benefits of Ontologies
Ontologies can allow your organization to:
• Manage content more effectively;
• Maximize findability and discoverability of information;
• Increase the reuse of “hidden” and unknown information;