You are on page 1of 5

Chapter 5

Knowledge and reasoning

Introduction: knowledge is a general term. What we know (knowledge) helps us to do


things. Have knowledge base as central component. Knowledge is description of the real world
scenario which includes facts about the real world entities and the relationship between them.
Knowledge is a progression with hierarchy that starts with data (the data is with limited usage).
By organizing and analyzing the data, information is created. The evaluation and interpretation
of information creates knowledge. Understanding all the principles embodied in knowledge
becomes wisdom.
Types of knowledge:
There two types of knowledge.
Tacit Explicit
Is found in the mind of domain experts, hence it A kind of knowledge which is easy to describe.
is very difficult to articulate and represent such Mostly found in written documents and on
knowledge. various web pages as well.
Is procedural kind of knowledge (difficult to Describing facts, objects, tasks and methods
explain in words the domain experts
themselves).
Is mental and motor skill kind of knowledge
(doing and showing)
All procedural knowledge are tacit All declarative knowledge is explicit
Procedural knowledge is tied to do something. knowledge; it is knowledge that can be and has
been articulated.
Declarative knowledge is tied to describing

1. Agents that Reason Logically


Agents that reason logically are called knowledge based agents. Knowledge base agents reason
logically by the help of syntax inside the agents head. This syntax contains all the possible
logical relationship among facts in real world scenario. The logical relationship among facts
helps agents to reason logically.

Agents can be seen as knowing about their world, and reasoning about their possible courses of
action are Knowledge based agents. Knowledge based agents (KBA) begin with some
knowledge of the world and of its actions. KBA uses logical reasoning to maintain a description
of the world as new percepts arrive. Learn new facts/knowledge that is inferred and unseen by
current percepts and deduce a course of actions that will achieve its goals.

AI Page 1
2. Knowledge Representation
Knowledge is a collection of facts from some domain. We need a representation of facts that can
be manipulated by a program.
How do we represent what we know? If Knowledge is general description of real world scenario,
how it can be represented? Knowledge is represented using formal representation methods such
as logics, frames, rules, semantic networks and many others. Knowledge representation concerns
with the way knowledge is encoded. We represent knowledge; because knowledge based
systems (KBSs) are useless without the ability to represent knowledge.

Problem solving requires large amount of knowledge and some mechanism for manipulating
that knowledge. Good knowledge representation enables fast and accurate access to
knowledge and understanding of the content.
KR models / methods are often done based on:

Logic: A formal system for describing states of affairs consisting of syntax and semantics. There
are numerous logics available, examples are, fuzzy logic and probability logic. Normal natural
language is not sufficient and is hard to represent knowledge. Because it will not be easily
understood by the AI programs to infer conclusion.

Syntax: describes how to make formal sentences. Syntax specifies the symbols in the language
about how they can be combined to form sentences. The facts about the world are represented as
sentences in logic.
Semantics: deals with what the sentences will actually mean. Describes the relationship between
the sentences and the state of affairs. Semantics specifies how to assign a truth value to a
sentence based on its meaning in the world. It specifies what facts a sentence refers to. A fact is
a claim about the world, and it may be true or false.

These cannot be expressed in propositional logic as a finite and logically valid argument
(formula).

First order logic has quantifiers


We need languages: that allow us to describe properties (predicates) of objects
Frames: (Fixed part and slot).

Rules: (if then else) and

Semantic networks :( Hierarchical relationship of data objects)

Framework of knowledge representation:

To collect facts of knowledge, we need first to formulate a description in our language


(informally) and then represent it in formal language called logic so that computers can

AI Page 2
understand, hence easy for reasoning. Therefore AI algorithms can use the logic to compute
answer for reasoning.

The tasks in knowledge representation are:


1. The informal formalism of the problem takes place first.
2. It is then represented formally and the computer produces an output.
3. This output can then be represented in an informally described solution that user
understands or checks for consistency with tasks of domain experts.

3. Building a Knowledge Base:


Knowledge Acquisition subsystem:

This is the subsystem of any knowledge base/ expert system to help experts in build knowledge
bases. However, collecting knowledge, needed to solve problems and build the knowledge base,
is the biggest bottleneck in building expert systems.

A good knowledge representation enables fast and accurate access to knowledge and
understanding of the content.
A knowledge representation system should have following properties.
 Representational Adequacy: The ability to represent all kinds of knowledge that are
needed in that domain.
 Acquisitioned Efficiency: The ability to acquire new knowledge using automatic
methods wherever possible rather than reliance on human intervention.
N.B: To date no single system can optimizes all of the above properties.

The fundamental goal of knowledge representation is to facilitate inference (conclusions)


from knowledge base. Some of the issues that should be considered during knowledge
representation are.

4. First Order Logic (FOL)


Basically there are many kinds of logical representations of facts and rules. The common ones
are propositional logic which contains rules and facts in the form of statements that can be
evaluated into true/false/ or unknown. Propositional logic is weak for knowledge representation.
The main problem with propositional logic is, it lacks knowledge representational adequacy. We
cannot represent all form of knowledge in propositional logic, hence not advisable to represent
general knowledge.

AI Page 3
First order logic (FOL), is more general knowledge representation which incorporates all the
properties of propositional logic, besides it has quantifiers to describe the objects and their
relationships. The two known quantifiers in FOL are universal quantifier which is denoted by
the symbol, to mean for all and existential quantifier denoted by the symbol ϶ to mean
“there exists” These quantifiers represent the domain of the given variables, whether the
..

variables are general (universal) or specific (existential).

In logic, there are atomic and complex sentences. Atomic sentence is the smallest unit of
sentence with no connectors and with negation.

Besides, complex sentences are sentences with connectors or negation. The possible connectors
in FOL are:

The conjunction AND

Disjoint OR

Bi-implication or if and only if <-->

Implication or if 

Inference Rules:
Modus ponens (Implication elimination): This inference mechanism gives reasoning by
elimination of implication.

AB, A (read as A implies B, given A is true)

A implies B given A is a true, the conclusion is dependent on the unknown B. B determines this
sentence to be true or false. Therefore the conclusion is B. A is true, but B is unknown, it can be
true or false. Hence for the conclusion to be true or false depends on value of B.

Unit resolution:

AU B (read as A or B, given B is false and value of A is unknown, it can be true or false)


A

Unit resolution deals with the idea that, A or B, given B is false; the conclusion for this reasoning
depends on the unknown value which is A in this case.

Unit resolution and modus ponens are derived from the Boolean and many other inference
mechanisms ground themselves on truth values of the Boolean rules.
AI Page 4
P Q -P -Q PɅQ PUQ PQ QP P<-> Q

T T F F T T T T T

T F F T F T F T F

F T T F F T T F F

F F T T F F T T T

Exercise: Use First order logic to prove that my cat, fida, is a nice cat, given that all cats are
nice.
If we are given a set of Boolean formulas of the form F1ɅF2Ʌ…..FkG is valid, and then the negation
of this statement is deadly invalid no matter what values we give to the variables.

More examples on FOL:

Everyone loves mother

   x ϶y loves (x, y) Ʌ mother(y, x)


And this sentence can also be described as:
   x loves(x, mother(x))
The two statements are semantically the same but grammatically different.

Some rules of FOL


Use Common mistake (Do not use)
Use Implication  With universal quantifier,  Using Ʌ with is common mistake
Use AND ,Ʌ, with existential quantifier ϶ Using implication  with existential
quantifier is a common mistake
If negation is pushed into universal quantifier it changes into existential quantifier϶ And
vice versa.

AI Page 5

You might also like