You are on page 1of 11

Saquib Ali

Artificial Intelligence Notes


Module-II
Representations and Mappings: 1. Tacit knowledge is the knowledge which exists within
In order to solve complex problems encountered in artificial a human being. It does correspond to informal or
intelligence, one needs both a large amount of knowledge implicit type of knowledge. It is quite difficult to
and some mechanism for manipulating that knowledge to articulate formally and is also difficult to
create solutions. communicate and share.
Knowledge and Representation are two distinct entities. 2. Explicit knowledge is the knowledge which exists
They play central but distinguishable roles in intelligent outside a human being. It corresponds to formal type
system. of knowledge. It is easier to articulate compared to
tacit knowledge and is easier to share, store or even
Knowledge: Knowledge is a description of the world. It process.
determines a system’s competence by what it knows.
Types of knowledge:
Representation: Representation is the way knowledge is 1. Declarative Knowledge:
encoded. It defines a system’s performance in doing o Declarative knowledge is to know about something.
something. o It includes concepts, facts, and objects.
Different types of knowledge require different kinds of o It is also called descriptive knowledge and
representation. expressed in declarative sentences.
o It is simpler than procedural language.
The knowledge Representation models/mechanisms are
often based on: 2. Procedural Knowledge
 Logic o It is also known as imperative knowledge.
 Rules o Procedural knowledge is a type of knowledge which
 Frames is responsible for knowing how to do something.
 Semantic Net o It can be directly applied to any task.
o It includes rules, strategies, procedures, agendas,
A variety of ways of representing knowledge have been etc.
exploited in AI programs. o Procedural knowledge depends on the task on which
it can be applied.
There are two different kinds of entities, we are dealing with.
1. Facts: Truth in some relevant world. Things we want to 3. Meta-knowledge:
represent. o Knowledge about the other types of knowledge is
2. Representation of facts in some chosen formalism. called Meta-knowledge.
Things we will actually be able to manipulate.
4. Heuristic knowledge:
These entities are structured at two levels: o Heuristic knowledge is representing knowledge of
1. The knowledge level, at which facts are described. some experts in a filed or subject.
2. The symbol level, at which representation of objects are o Heuristic knowledge is rules of thumb based on
defined in terms of symbols that can be manipulated by previous experiences, awareness of approaches, and
programs. which are good to work but not guaranteed.

5. Structural knowledge:
o Structural knowledge is basic knowledge to
problem-solving.
o It describes relationships between various concepts
such as kind of, part of, and grouping of something.
o It describes the relationship that exists between
concepts or objects.

AI knowledge cycle:
An Artificial intelligence system has the following
components for displaying intelligent behavior:
Categories of knowledge: o Perception
Knowledge can be categorized into two major types: o Learning
 Tacit knowledge o Knowledge Representation and Reasoning
 Explicit knowledge o Planning
o Execution
Saquib Ali
Artificial Intelligence Notes
Module-II
Example:

Approaches to knowledge representation:


There are mainly four approaches to knowledge
representation

1. Simple relational knowledge:


o It is the simplest way of storing facts which uses the 3. Inferential knowledge:
relational method, and each fact about a set of the object o Inferential knowledge approach represents
is set out systematically in columns. knowledge in the form of formal logics.
o This approach of knowledge representation is famous in o This approach can be used to derive more facts.
database systems where the relationship between o It guaranteed correctness.
different entities is represented.
o This approach has little opportunity for inference. Example: Let's suppose there are two statements:
a. Marcus is a man
Example: The following is the simple relational b. All men are mortal
knowledge representation. Then it can represent as;

Player Weight Age man(Marcus)


∀x = man (x) ----------> mortal (x)s
Player1 65 23 c.
4. Procedural knowledge:
Player2 58 18 o Procedural knowledge approach uses small
programs and codes which describes how to do
Player3 75 24 specific things, and how to proceed.
o In this approach, one important rule is used which
is If-Then rule.
2. Inheritable knowledge: o In this knowledge, we can use various coding
o In the inheritable knowledge approach, all data must languages such as LISP language and Prolog
be stored into a hierarchy of classes. language.
o All classes should be arranged in a generalized form o We can easily represent heuristic or domain-specific
or a hierarchal manner. knowledge using this approach.
o In this approach, we apply inheritance property. o But it is not necessary that we can represent all
o Elements inherit values from other members of a cases in this approach.
class.
o This approach contains inheritable knowledge Requirements for knowledge Representation system:
which shows a relation between instance and class, A good knowledge representation system must possess the
and it is called instance relation. following properties.
o Every individual frame can represent the collection
of attributes and its value. 1. Representational Accuracy:
o In this approach, objects and values are represented KR system should have the ability to represent all
in Boxed nodes. kind of required knowledge.
o We use Arrows which point from objects to their
values.
Saquib Ali
Artificial Intelligence Notes
Module-II
2. Inferential Adequacy:  In propositional logic, inference rules are used to
KR system should have ability to manipulate the derive new propositions from existing ones.
representational structures to produce new  Propositional logic is a limited form of logic that only
knowledge corresponding to existing structure. deals with propositions that are either true or false.
3. Inferential Efficiency:
The ability to direct the inferential knowledge
mechanism into the most productive directions by Syntax of Propositional Logic:
storing appropriate guides. Syntax of propositional logic refers to the formal rules for
4. Acquisitional efficiency- The ability to acquire the constructing statements in propositional logic. Propositional
new knowledge easily using automatic methods. logic deals with the study of propositions, which are
declarative statements that are either true or false. The
Propositional Logic: syntax of propositional logic consists of two main
Propositional logic is a fundamental component of artificial components: atomic propositions and compound
intelligence (AI). It is a branch of mathematical logic that propositions.
deals with propositions and logical reasoning. Propositions
are statements that can be true or false. In AI, propositional Atomic Propositions:
logic is used to represent and reason about knowledge Atomic propositions are simple statements that cannot be
systematically and formally. It provides a simple yet broken down into simpler statements. They are the building
powerful way of expressing and manipulating logical blocks of propositional logic. An atomic proposition can be
relationships between propositions. represented by a letter or symbol, such as p, q, r, or s. For

For example, consider the statement "All humans are example, the following are atomic propositions:
mortal." This can be represented in propositional logic as a p: The sky is blue. q: The grass is green. r: 2+2=4. s: The
proposition, say P. Similarly, the statement "Socrates is a Earth orbits the Sun.
human" can be represented as another proposition, say Q.
The logical relationship between P and Q can be represented Compound Propositions
using logical connectives, such as "and," "or," and "not." Compound propositions are formed by combining atomic
For instance, the proposition "All humans are mortal, and propositions using logical operators. There are several
Socrates is a human" can be represented as P ∧ Q. logical operators in propositional logic, including negation,
conjunction, disjunction, implication, and equivalence.
Propositional logic is also used in AI to reason about the
relationships between propositions. Given a set of Example:
propositions, we can use logical inference rules to derive  "It is raining today, and state it is wet."
new propositions. For example, if we know that P ∧ Q is  "Ankit is a doctor, and his clinic is in Mumbai."
true, and we also know that P → R, we can infer that Q →
R is also true. Logical Connectives
Here are some basic facts about propositional logic in When connecting two simpler assertions or logically
AI: expressing a statement, logical connectives are used. Using
logical connectives, we can build compound propositions.
 Propositional logic is a formal language that uses symbols The following list of connectives includes the main five:
to represent propositions and logical connectives to
combine them. The symbols used in propositional logic Negation
include letters such as p, q, and r, which represent The negation of a proposition p is denoted by ¬p and is read
propositions, and logical connectives such as "not p". For example: ¬p: The sky is not blue.
as ∧ (conjunction), ∨ (disjunction), and ¬ (negation),
which are used to combine propositions. Conjunction
 An statement is a proposition if it is either true or false. The conjunction of two propositions p and q is denoted by p
Examples of propositions include "2+2=4," and "The sky ∧ q and is read as "p and q's". The conjunction is true only if
is blue." both p and q are true. For example: p ∧ q`: The sky is blue
 Logical connectives are used to combine propositions to and the grass is green.
form more complex statements.
 Truth tables are used to represent the truth values of Disjunction
propositions and the logical connectives that combine The disjunction of two propositions p and q is denoted by p
them. ∨ q and is read as "p or q". The disjunction is true if at least
Saquib Ali
Artificial Intelligence Notes
Module-II
one of p and q is true. For example: p ∨ q: The sky is blue or
the grass is green.

Implication
The implication of two propositions p and q is denoted by p
→ q and is read as "if p then q". The implication is false
only if p is true

Biconditional
A sentence such as P⇔ Q is a Biconditional sentence,
example I will eat lunch if and only if my mood improves.
P= I will eat lunch, Q= if my mood improves, it can be
represented as P ⇔ Q.

Summarized table for Propositional Logic Connectives


Connective Name Meaning Example

¬p ("not p") means "it is


¬ Negation "Not"
not the case that p"

p ∧ q ("p and q") means


∧ Conjunction "And"
"both p and q are true"

p ∨ q ("p or q") means


∨ Disjunction "Or" "either p or q is true (or
both)"

p ⊕ q ("p xor q")


Exclusive "Exclusive
⊕ means "either p or q is
First Order Logic/ Predicate Logic:
Disjunction Or"
true, but not both"  In artificial intelligence, first-order logic is another
method of knowledge representation. It's a variant of
p → q ("if p then q")
propositional logic.
→ Implication "If...then" means "if p is true, then
 FOL has enough expressiveness to convey natural
q must be true"
language statements succinctly.
 Predicate logic or First-order predicate logic are
p ↔ q ("p iff q") means
Bi- "If and other names for first-order logic. First-order logic is a
↔ "p is true if and only if q
implication only if" sophisticated language that makes it easier to build
is true"
information about objects and to articulate
relationships between them.
 Like propositional logic, first-order logic (like natural
Truth Table:
In propositional logic, we need to know the truth values of language) implies that the world contains facts, but it
propositions in all possible scenarios. We can combine all also assumes the following things in the world.
the possible combination with logical connectives, and the 1. Objects: A, B, people, numbers, colors, squares,
representation of these combinations in a tabular format is pits, wars, theories, wumpus, ......
called Truth table. Following are the truth table for all 2. Relations: It can be unary relation such as: red,
logical connectives: round, is adjacent, or n-any relation such
as: the sister of, brother of, has color, comes
between
3. Function: Father of, best friend, third inning of,
end of, ......
 First-order logic also has two main parts as a natural
language:
1. Syntax
2. Semantics
Saquib Ali
Artificial Intelligence Notes
Module-II
Syntax of First-Order logic:
In first-order logic, the syntax of FOL determines which set
of symbols represents a logical expression. Symbols are the
core syntactic constituents of first-order logic. In FOL, we
use short-hand notation to write statements.
Basic Elements of First-order logic:

The basic elements of FOL syntax are as follows: Example


Constant 1, 2, A, John, Mumbai, cat,.... 1. All birds fly.
The predicate in this question is "fly(bird)."
Variables x, y, z, a, b,.... Because all birds are able to fly, it will be portrayed
as follows.
Predicates Brother, Father, >,.... ∀x bird(x) →fly(x).
2. Every man respects his parent.
Functions sqrt, LeftLegOf, .... The predicate in this question is "respect(x, y),"
where x=man, and y= parent.
Connectives ∧, v, ¬, ⇒, ⇔ Because there is every man so will use ∀, and it will
be portrayed as follows:
Equality == ∀x man(x) → respects (x, parent).
3. Some boys play cricket.
Quantifier ∀, ∃ In this question, the predicate is "play(x, y), " where
x= boys, and y= game. Because there are some boys
Atomic sentences: so we will use ∃, and it will be portrayed as:
 Atomic sentences are the most fundamental first-order ∃x boys(x) → play(x, cricket).
logic sentences. These sentences are made up of a 4. Not all students like both Mathematics and
predicate symbol, a parenthesis, and a series of terms. Science.
 Predicate can be used to represent atomic The predicate in this question is "like(x, y)," where
sentences (term1, term2, ......, term n). x= student, and y= subject. Because there are not
 Predicate logic or First-order predicate logic are other all students, so we will use ∀ with negation, so
names for first-order logic. First-order logic is a following portray for this:
sophisticated language that makes it easier to build ¬∀ (x) [ student(x) → like(x, Mathematics) ∧
information about objects and to articulate relationships like(x, Science)].
between them. 5. Only one student failed in Mathematics.
The predicate in this question is "failed(x, y),"
Example: Ravi and Ajay are brothers: => where x= student, and y= subject. Because there
Brothers(Ravi, Ajay). is only one student who failed in Mathematics, so
Chinky is a cat: => cat (Chinky). we will use following portray for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀
Complex Sentences: (y) [¬(x==y) ∧ student(y) → ¬failed (x,
 Connectives are used to join atomic sentences to Mathematics)].
form complex sentences.
Resolution in FOL:
The following are two types of first-order logic
statements: Resolution is a method of theorem proof that involves
 Subject: The major component of the sentence is the constructing refutation proofs, or proofs by contradictions. It
subject. was created in 1965 by a mathematician named John Alan
 Predicate: A predicate is a relationship that ties two Robinson.
atoms together in a sentence.
Consider the following statement: "x is an integer." It When several statements are supplied and we need to prove
has two parts: the first component, x, is the statement's a conclusion from those claims, we employ resolution. In
subject, and the second half, "is an integer," is a predicate. proofs by resolutions, unification is a crucial idea.
Resolution is a single inference rule that can work on either
the conjunctive normal form or the clausal form
efficiently.
Saquib Ali
Artificial Intelligence Notes
Module-II
Clause: A clause is a disjunction of literals (an atomic  Move negation (¬)inwards and rewrite
sentence). It's sometimes referred to as a unit clause. 1. ∀x ¬ food(x) V likes(John, x)
2. food(Apple) Λ food(vegetables)
Conjunctive Normal Form (CNF): Conjunctive normal 3. ∀x ∀y ¬ eats(x, y) V killed(x) V food(y)
form (CNF) is a sentence that is represented as a 4. eats (Anil, Peanuts) Λ alive(Anil)
conjunction of clauses. 5. ∀x ¬ eats(Anil, x) V eats(Harry, x)
6. ∀x ¬killed(x) ] V alive(x)
Steps for Resolution: 7. ∀x ¬ alive(x) V ¬ killed(x)
1. Conversion of facts into first-order logic 8. likes(John, Peanuts).
2. Convert FOL statements into CNF  Rename variables or standardize variables
3. Negate the statement which needs to prove (proof 1. ∀x ¬ food(x) V likes(John, x)
by contradiction) 2. food(Apple) Λ food(vegetables)
4. Draw resolution graph (unification) 3. ∀y ∀z ¬ eats(y, z) V killed(y) V food(z)
4. eats (Anil, Peanuts) Λ alive(Anil)
Example: 5. ∀x ¬ eats(Anil, x) V eats(Harry, x)
 Anything anyone eats and not killed is food. 6. ∀x ¬killed(x) ] V alive(x)
 Anil eats peanuts and still alive 7. ∀x ¬ alive(x) V ¬ killed(x)
 Harry eats everything that Anil eats. 8. likes(John, Peanuts).
 John likes all kind of food.  Eliminate existential instantiation quantifier by
 Apple and vegetable are food elimination.
 Prove by resolution that: We will eliminate existential quantifiers in this step,
 John likes peanuts. which is referred to as Skolemization. However,
because there is no existential quantifier in this
Step-1: Conversion of Facts into FOL example problem, all of the assertions in this phase
We'll start by converting all of the given propositions to will be the same
first-order logic.  Drop Universal quantifiers. We'll remove all
universal quantifiers ∃ in this phase because none of
the statements are implicitly quantified, therefore
we don't need them
1. ¬ food(x) V likes(John, x)
2. food(Apple)
3. food(vegetables)
4. ¬ eats(y, z) V killed(y) V food(z)
5. eats (Anil, Peanuts)
6. alive(Anil)
7. ¬ eats(Anil, w) V eats(Harry, w)
8. killed(g) V alive(g)
9. ¬ alive(k) V ¬ killed(k)
10. likes(John, Peanuts).
[ Note: Statements "food(Apple) Λ
food(vegetables)" and "eats (Anil,
Peanuts) Λ alive(Anil)" can be written in
Step-2: Conversion of FOL into CNF two independent statements. ]
Converting FOL to CNF is essential in first-order logic  Distribute conjunction ∧ over disjunction ¬. This
resolution because CNF makes resolution proofs easier. step will not make any change in this problem.

 Eliminate all implication (→) and rewrite: Step 3: Reverse the statement that needs to be proven.
1. ∀x ¬ food(x) V likes(John, x) We will use negation to write the conclusion assertions in
2. food(Apple) Λ food(vegetables) this statement, which will be written as "likes" (John,
3. ∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y) Peanuts)
4. eats (Anil, Peanuts) Λ alive(Anil)
5. ∀x ¬ eats(Anil, x) V eats(Harry, x)
6. ∀x¬ [¬ killed(x) ] V alive(x)
7. ∀x ¬ alive(x) V ¬ killed(x)
8. likes(John, Peanuts).
Saquib Ali
Artificial Intelligence Notes
Module-II
can be accomplished. knowledge about
something.

Alternate Procedural knowledge is Declarative


name also termed as imperative knowledge is also
knowledge. termed as
functional
knowledge

Basis Procedural knowledge Declarative


revolves around the knowledge
"How" of the concept. revolves
around the "What"
of the concept.

Commun Procedural knowledge is Declarative


ication difficult to communicate. knowledge is
easily
As a result, the conclusion's negation has been demonstrated communicable.
to constitute a total contradiction with the given collection
of truths.
Orientati Procedural knowledge is Declarative
Step 4: Create a graph of resolution:
on process-oriented. knowledge is data-
In this stage, we'll use a resolution tree and substitution to
oriented.
solve the problem. It will be as follows for the aforesaid
problem:
Validatio Validation is not very Validation is quite
Explanation of Resolution graph: n easy in procedural easy in declarative
 First step: ¬likes(John, Peanuts) , and likes(John, knowledge. knowledge.
x) get resolved(canceled) by substitution of
{Peanuts/x}, and we are left with ¬ food(Peanuts)
 Second step: ¬ food(Peanuts) , and food(z) get Debuggin Debugging is not very Debugging is quite
resolved (canceled) by substitution of { Peanuts/z}, g easy in procedural easy in declarative
and we are left with¬ eats(y, Peanuts) V killed(y) . knowledge. knowledge.
 Third step: ¬ eats(y, Peanuts) and eats (Anil,
Peanuts) get resolved by substitution {Anil/y}, and
we are left with Killed(Anil). Use Procedural knowledge is Declarative
 Fourth step: Killed(Anil) and ¬ killed(k) get less commonly used. knowledge is more
resolve by substitution {Anil/k}, and we are left general.
with ¬ alive(Anil) .
 Last step:¬ alive(Anil) and alive(Anil) get resolve
Represen Procedural knowledge is Declarative
Difference between Procedural Knowledge and Declarative tation represented by a set of knowledge is
Knowledge rules. represented by
production
systems.
Declarative
Key Procedural Knowledge
Knowledge
logic programming
Meaning Procedural knowledge Declarative Logic programming is a type of programming in which
provides the knowledge knowledge programmers define the rules of the program in the form of
of how a particular task provides the basic logical statements. logic programming is based on a
declarative programming paradigm, meaning that the
Saquib Ali
Artificial Intelligence Notes
Module-II
programmer declares what the program should do, rather o Hypothesis knowledge cannot be expressed with
than how it should do it. This makes logic programming monotonic reasoning, which means facts should be
programs more human-readable and easier to understand. true.
o Since we can only derive conclusions from the old
Reasoning: proofs, so new knowledge from the real world
The reasoning is the mental process of deriving logical cannot be added.
conclusion and making predictions from available
knowledge, facts, and beliefs. Or we can say, ―Reasoning is a Non Monotonic Reasoning
way to infer facts from existing data.‖ It is a general process o In Non-monotonic reasoning, some conclusions may
of thinking rationally, to find valid conclusions. be invalidated if we add some more information to
our knowledge base.
Types of Reasoning: o Logic will be said as non-monotonic if some
In artificial intelligence, reasoning can be divided into the conclusions can be invalidated by adding more
following categories: knowledge into our knowledge base.
o Deductive reasoning o Non-monotonic reasoning deals with incomplete and
uncertain models.
o Inductive reasoning
o ―Human perceptions for various things in daily life,
o Abductive reasoning ―is a general example of nonmonotonic reasoning.
o Common Sense Reasoning Example:
o Monotonic Reasoning Let suppose the knowledge base contains the following
o Non-monotonic Reasoning
knowledge:
o Birds can fly
o Penguins cannot fly
Monotonic Reasoning
o Pitty is a bird
o In monotonic reasoning, once the conclusion is
taken, then it will remain the same even if we add So from the above sentences, we can conclude that Pitty can
some other information to existing information in fly.
our knowledge base. In monotonic reasoning, adding However, if we add one another sentence into knowledge
knowledge does not decrease the set of prepositions base ―Pitty is a penguin‖, which concludes ―Pitty cannot
that can be derived. fly‖, so it invalidates the above conclusion.
o To solve monotonic problems, we can derive the
valid conclusion from the available facts only, and it Advantages of Non-monotonic reasoning:
o For real-world systems such as Robot navigation, we
will not be affected by new facts.
o Monotonic reasoning is not useful for the real-time
can use non-monotonic reasoning.
o In Non-monotonic reasoning, we can choose
systems, as in real time, facts get changed, so we
cannot use monotonic reasoning. probabilistic facts or can make assumptions.
o Monotonic reasoning is used in conventional
reasoning systems, and a logic-based system is Disadvantages of Non-monotonic Reasoning:
o in non-monotonic reasoning, the old facts may be
monotonic.
o Any theorem proving is an example of monotonic
invalidated by adding new sentences.
o It cannot be used for theorem proving.
reasoning.
Example:
o Earth revolves around the Sun.
Bayes Theorem:
It is a true fact, and it cannot be changed even if we add The Bayes theorem is a mathematical calculation of the
another sentence in knowledge base like, ―The moon conditional probability of an event A occurring after event
revolves around the earth‖ Or ―Earth is not round,‖ etc. B. Here, event B, having taken place already, is the
condition. Thus, the Bayes theorem predicts the occurrence
of an event when another similar event has already taken
Advantages of Monotonic Reasoning:
o In monotonic reasoning, each old proof will always
place. Also, the occurrence of these two events is
remain valid. independent of each other.
o If we deduce some facts from available facts, then it
will remain valid for always.

Disadvantages of Monotonic Reasoning:


o We cannot represent the real world scenarios using
Monotonic reasoning.
Saquib Ali
Artificial Intelligence Notes
Module-II
Bayes theorem is also called Bayesian inference.
This conditional probability measure is applied widely
in statistics, finance, machine learning, philosophy, sports,
medicines, law, and engineering. It is also used for deriving
reverse probabilities—when the conditional probability of
an event is already known.  P(A|B) is the probability of event A occurring after event B.
 P(B|A) is the probability of event B occurring after event A.
Key Features:  P(A) is the probability of event A occurring.
 Bayes theorem is statistical inference. It is used to  P(B) is the probability of event B occurring.
find the conditional probability of an event
occurring when a similar event has already Example:
occurred. Let us look at how the Bayes theorem probability calculator
 Thomas Bayes gave the Bayes law in the 18th works. Assume that there are two investment options, A
century. Bayes was a British clergyman, statistician, and B. Then, the probability of generating positive returns
and philosopher, from A is 74%, and the probability of generating positive
 To determine the conditional probability of event A returns from B is 45%. Also, the possibility of investment B
occurring after the completion of event B, the providing a positive return when investment A also provides
following formula is used: a positive return is 13%.
P (A│B) = [P(B│A) P(A)] / P(B). Based on the given data, determine the probability of
investment A providing a positive return when investment B
Bayes Theorem of Probability also provides a positive return.
The Bayes theorem definition (Bayes rule) is a probability Solution:
measure proposed by British statistician Thomas Bayes. His Given: P (A) = 0.74
findings were compiled in an essay, ―Towards Solving a P (B) = 0.45
Problem in the Doctrine of Chances.‖ In 1763, it is used P (B│A) = 0.13
for predictive modeling—correlating available data with a
model for gauging the posterior distribution—when
likelihood and prior distribution are known.
P (A│B) = [(0.13 × 0.74) / 0.45] = 0.21
The different terms associated with the Bayes theorem are Thus, the probability of generating positive returns from
as follows: investment A when investment B also generates positive
returns is 0.21.
 Conditional Probability – When the happening of
an event A depends on the occurrence of another Semantic Network:
event B, it is known as conditional probability. Semantic networks are alternative of predicate logic for
 Posterior Probability – The conditional probability knowledge representation. In Semantic networks, we can
of an event happening based on new information or represent our knowledge in the form of graphical networks.
prior probability is known as posterior probability. This network consists of nodes representing objects and arcs
which describe the relationship between those objects.
 Prior Probability – It is the probability of an
Semantic networks can categorize the object in different
event’s occurrence based on previous information.
forms and can also link those objects.
 Joint Probability – The chances of two or more
Example:
events taking place simultaneously is their joint
Statements:
probability.
a. Jerry is a cat.
 Random Variables – The continuous range of b. Jerry is a mammal
values denoting the outcome of random experiments c. Jerry is owned by Priya.
are the random variables. d. Jerry is brown colored.
e. All Mammals are animal.
Formula:
The Bayes theorem determines the probability of an event A
occurring based on the probability of the occurrence of
event B—provided both events occur independently. The
following Bayes theorem formula represents it:
Saquib Ali
Artificial Intelligence Notes
Module-II
values. A frame is also known as slot-filter knowledge
representation in artificial intelligence.
Frames are derived from semantic networks and later
evolved into our modern-day classes and objects. A single
frame is not much useful. Frames system consist of a
collection of frames which are connected. In the frame,
knowledge about an object or event can be stored together in
the knowledge base. The frame is a type of technology
which is widely used in various applications including
Natural language processing and machine visions.

In the above diagram, we have represented the different type Example: Let's take an example of a frame for a book
of knowledge in the form of nodes and arcs. Each object is
connected with another object by some relation. Slots Filters

Disadvantages Semantic: Title Artificial Intelligence


1. Semantic networks take more computational time at
runtime as we need to traverse the complete
network tree to answer some questions. It might be Genre Computer Science
possible in the worst case scenario that after
traversing the entire tree, we find that the solution Author Peter Norvig
does not exist in this network.
2. Semantic networks try to model human-like Edition Third Edition
memory (Which has 1015 neurons and links) to
store the information, but in practice, it is not Year 1996
possible to build such a vast semantic network.
3. These types of representations are inadequate as Page 1152
they do not have any equivalent quantifier, e.g., for
all, for some, none, etc. Advantages of frame representation:
4. Semantic networks do not have any standard 1. The frame knowledge representation makes the
definition for the link names. programming easier by grouping the related data.
5. These networks are not intelligent and depend on 2. The frame representation is comparably flexible and
the creator of the system. used by many applications in AI.
3. It is very easy to add slots for new attribute and
Advantages of Semantic network: relations.
1. Semantic networks are a natural representation of 4. It is easy to include default data and to search for
knowledge. missing values.
2. Semantic networks convey meaning in a transparent 5. Frame representation is easy to understand and
manner. visualize.
3. These networks are simple and easily
understandable. Disadvantages of frame representation:
Frame: 1. In frame system inference mechanism is not be
A frame is a record like structure which consists of a easily processed.
collection of attributes and its values to describe an entity in 2. Inference mechanism cannot be smoothly proceeded
the world. Frames are the AI data structure which divides by frame representation.
knowledge into substructures by representing stereotypes 3. Frame representation has a much generalized
situations. It consists of a collection of slots and slot values. approach.
These slots may be of any type and sizes. Slots have names Scripts:
and values which are called facets. A script is a structured representation describing a
Facets: The various aspects of a slot is known as Facets. stereotyped sequence of events in a particular context.
Facets are features of frames which enable us to put Scripts are used in natural language understanding systems
constraints on the frames. Example: IF-NEEDED facts are to organize a knowledge base in terms of the situations that
called when data of any particular slot is needed. A frame the system should understand. Scripts use a frame-like
may consist of any number of slots, and a slot may include structure to represent the commonly occurring experience
any number of facets and facets may have any number of
Saquib Ali
Artificial Intelligence Notes
Module-II
like going to the movies eating in a restaurant, shopping in a In 1977, Roger C. Schank has developed a Conceptual
supermarket, or visiting an ophthalmologist. Dependency structure. The Conceptual Dependency is
Thus, a script is a structure that prescribes a set of used to represent knowledge of Artificial Intelligence. It
circumstances that could be expected to follow on from one should be powerful enough to represent these concepts in
another. the sentence of natural language. It states that different
sentence which has the same meaning should have some
Components of a script: unique representation. There are 5 types of states in
Entry Condition: these are basic condition which must be Conceptual Dependency:
fulfilled before events in the script can occur. 1. Entities
Results: condition that will be true after event in script 2. Actions
occurred. 3. Conceptual cases
Props: slots representing objects involved in events. 4. Conceptual dependencies
Roles: these are the actions that the individual participants 5. Conceptual tense
perform
Track: variations on the script. Different track may share Goals of Conceptual Dependency:
components of the same scripts.
1. It captures the implicit concept of a sentence and makes it
Scenes: the sequence of events that occur.
explicit.
2. It helps in drawing inferences from sentences.
Example:-Script for going to the bank to withdraw 3. For any two or more sentences that are identical in
money. meaning. It should be only one representation of meaning.
SCRIPT: Withdraw money 4. It provides a means of representation which are language
TRACK: Bank independent.
PROPS: Money 5. It develops language conversion packages.
Counter
Form
Token
Roles: P= Customer
E= Employee
C= Cashier
Entry conditions: P has no or less money.
The bank is open.

Results: P has more money.


Scene 1: Entering
P PTRANS P into the Bank
P ATTEND eyes to E
P MOVE P to E

Scene 2: Filling form


P MTRANS signal to E
E ATRANS form to P
P PROPEL form for writing
P ATRANS form to P
E ATRANS form to P

Scene 3: Withdrawing money


P ATTEND eyes to counter
P PTRANS P to queue at the counter
P PTRANS token to C
C ATRANS money to P
Scene 4: Exiting the bank
P PTRANS P to out of bank

Conceptual Dependency:

You might also like