You are on page 1of 6

MODULE - 4

1. Knowledge engineering is the process of constructing a knowledge base in


first-order logic¹. It involves investigating a particular domain, learning important
concepts of that domain, and generating a formal representation of the objects¹.
The person who performs this process is known as a knowledge engineer¹.

The knowledge engineering process can be summarized as follows¹:


i. Identify the task: The first step is to identify the task at hand. For example, in
the case of a digital circuit, you might examine its functionality or its structural
details¹.

ii. Assemble the relevant knowledge: In this step, you gather the relevant
knowledge required for the task. For digital circuits, this might include
understanding logic circuits, wires, gates, and their functionality¹.

iii. Decide on vocabulary: Next, you select functions, predicates, and constants
to represent the circuits, terminals, signals, and gates. This helps distinguish
between different objects and their relationships¹.

iv. Encode general knowledge about the domain: Here, you encode general
knowledge about the domain using rules and predicates. This allows you to
reason about specific instances within that domain¹.

v. Encode a description of the problem instance: Encode specific instances of


the problem you are trying to solve. For example, if you are building a
knowledge base for a digital circuit, you might encode specific circuit
configurations and their corresponding outputs.

vi. Pose queries to the inference procedure and get answers: Pose queries to
the inference procedure to obtain answers. The inference procedure uses the
encoded knowledge to reason about specific instances and provide answers
based on the rules and facts in the knowledge base.

vii. Debug the knowledge base: Debugging is an iterative process that involves
testing and refining your knowledge base. Identify and correct errors or
inconsistencies in your knowledge base during testing to ensure accurate
results.
Here are the key points about the Wumpus world:

- The Wumpus world is a simple world example used to illustrate the worth of a
knowledge-based agent and to represent knowledge representation.
- It was inspired by a video game called "Hunt the Wumpus" by Gregory Yob in
1973.
- The Wumpus world is a cave with 16 rooms connected by passageways¹.
- The cave contains various elements such as pits, a beast called Wumpus, and
a heap of gold.
- The goal of the agent in the Wumpus world is to find the gold and climb out of
the cave without falling into pits or being eaten by the Wumpus.
- The agent has limited resources, including a single arrow that can be used to
kill the Wumpus.
- The agent receives rewards for successfully finding the gold and penalties for
falling into pits or being eaten by the Wumpus.
- To navigate the cave, the agent relies on sensory information provided by its
environment.
- For example, it can perceive stench in rooms adjacent to the Wumpus, breeze
in rooms adjacent to pits, and glitter in rooms with gold.
- The Wumpus world problem is often used as an example in artificial intelligence
to demonstrate concepts such as search algorithms, planning, and decision-
making.
4. First-order Logic:
 First-order logic is another way of knowledge representation in artificial
intelligence. It is an extension of propositional logic.
 FOL is sufficiently expressive to represent the natural language statements in
a concise way.
 First-order logic is also known as Predicate logic or First-order predicate
logic.
 First-order logic (like natural language) does not only assume that the world
contains facts like propositional logic but also assumes the following things in
the world:
i. Objects: A, B, people, numbers, colors, wars, theories, squares, pits.
ii. Relations: It can be unary relation such as red, round, is adjacent, or n-
any relation such as the sister of, brother of, has color.
iii. Function: Father of, best friend, third inning of.

5. Atomic sentences:
 Atomic sentences are the most basic sentences of first-order logic. These
sentences are formed from a predicate symbol followed by a parenthesis with
a sequence of terms.
 We can represent atomic sentences as Predicate (term1, term2, ......, term n).
 Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).
Chinky is a cat: => cat (Chinky).
6. Complex Sentences:
 Complex sentences are made by combining atomic sentences using
connectives.
 First-order logic statements can be divided into two parts:
 Subject: The subject is the main part of the statement.
 Predicate: A predicate can be defined as a relation, which binds two atoms
together in a statement.
7. Quantifiers in First-order logic:
 In first-order logic, quantifiers are used to express the number of individuals in the
domain of discourse that satisfy an open formula.
 Quantifiers are the symbols that permit to determination or identification of
the range and scope of the variable in the logical expression.
There are two types of quantifiers:
i. Universal Quantifier, (for all, everyone, everything)
ii. Existential quantifier, (for some, at least one).

A. Universal Quantifier:
 Universal quantifier is a symbol of logical representation, which specifies that
the statement within its range is true for everything or every instance of a
particular thing.
 The Universal quantifier is represented by a symbol ∀, which resembles an
inverted A.
 If x is a variable, then ∀x is read as:
i. For all x
ii. For each x
iii. For every x.
B. Existential Quantifier:
 Existential quantifiers are the type of quantifiers, which express that the
statement within its scope is true for at least one instance of something.
 It is denoted by the logical operator ∃, which resembles an inverted E. When
it is used with a predicate variable then it is called an existential quantifier.
 If x is a variable, then the existential quantifier will be ∃x or ∃(x). And it will be
read as:
i. There exists a 'x.'
ii. For some 'x.'
iii. For at least one 'x.'
2. Unification: Unification is a concept used in proofs by resolution. It is a single
inference rule that operates on the conjunctive normal form or clausal form. In
simple terms, unification is the process of finding a substitution that makes two
expressions equal⁵.

3. Forward Chaining: Forward chaining is a reasoning method that starts with


known facts and applies inference rules in the forward direction to extract more
data until a goal is reached. It is a bottom-up approach that makes conclusions
based on known facts or data.

4. Backward Chaining: Backward chaining is a reasoning method that starts with


the goal and works backward, chaining through rules to find known facts that
support the goal. It is a top-down approach based on the modus ponens
inference rule.
8. Propositional logic:
- Propositional logic (PL) is the simplest form of logic where all the
statements are made by propositions.
- A proposition is a declarative statement which is either true or false.
- It is a technique of knowledge representation in logical and mathematical
form.
- Propositional logic is also called Boolean logic as it works on 0 and 1.
-Propositional logic consists of an object, relations or functions, and logical
connectives.
-The propositions and connectives are the basic elements of the
propositional logic.
Example:
a) It is Sunday.
b) The Sun rises from the West (False proposition)

There are two types of Propositions:


i. Atomic Proposition: Atomic propositions are simple propositions. It consists of
a single proposition symbol. These are the sentences which must be either
true or false.
a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.
ii. Compound proposition: Compound propositions are constructed by
combining simpler or atomic propositions, using parenthesis and logical
connectives.
a) "It is raining today, and the street is wet."
b) "Ankit is a doctor, and his clinic is in Mumbai."

You might also like