0% found this document useful (0 votes)
5 views

real time Chapter 4

Uploaded by

eyuadu3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

real time Chapter 4

Uploaded by

eyuadu3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

1

DEBRE TABOR UNIVERSITY


FACULTY OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE

Artificial Intelligence (CoSc4142)


2

Chapter Four

Knowledge and Reasoning


Knowledge: What and
3
Why?
 Knowledge includes facts about the real world entities and the
relationship between them.

Why Knowledge is important?


 We are living in complex environment where there are:
• Many actors, prosumers, strong competitors, and high turn over
 It enables to:
• Automate reasoning , Discover new facts, Deduce new facts that
follow from the KB, and Answer users queries
• Make quality decisions - select courses of actions, etc.
Knowledge Base Agent
4

 Knowledge base agent is an agent that perform action using the


knowledge it has and reason about their action using its inference
procedure.
 Consists of two parts:
 knowledge base: contains the domain-specific knowledge that
the agent has of its environment. This can consist of facts, but
also rules that describe the structure of the environment.

Inference engine: It consists of algorithms that take the contents
of the knowledge base and infer (i.e. deduce) new knowledge
Con’t…
5

 Knowledge base is a set of representation of facts and


their relation ships called rules about the world
 Each fact/rules are called sentences which is represented
using a language called knowledge representation
Con’t…
 Declarative approach to building an agent (or other system):
6

 Tell it what it needs to know (Knowledge base)


 Ask what it knows
 Answers should follow from the KB

 The agent must be able to:


 Represent states of the world, actions, etc.
 Incorporate new percepts (facts and rules)
 Deduce hidden properties of the world
 Deduce appropriate actions
 Update internal representations of the world
Logical Agents
7

 Logic is the study of principles of reasoning and


arguments towards the truth of a given conclusion given
premises.
 Logic in AI is the key idea for KB design, KB
representation and inferencing (reasoning).
 Logic is formal languages use for representing
information so that conclusions can be drawn.
 Logic is the systematic study of the general conditions of
Con’t…
 A logic consists of a syntax and some semantics.
8

 The syntax defines what an allowable sentence is in the language,


whereas the semantics defines the meaning of the sentences.
 There are many different logics. For example, integer arithmetic is a
logic. The syntax of integer arithmetic states that the following are all
legal sentences:
1+4=x
x–4>2
x2 – 2x = 0
 whereas the following are illegal sentences:
1+*2=
x2 + y > {}
Entailment
9

 The idea that a sentence follows logically from another


sentence.
 α╞ β (i.e, the sentence α entails the sentence β; (or)
the sentence β logically follows from sentence α)
 The formal definition of entailment is this: α ╞ β if and
only if, in every model in which α is true, β is also true.

It can be written as, α ╞ β if and only if m(α) = m


Models
10

 The semantics of a logic define the truth (or otherwise) of


sentences in possible worlds.
 A world is an assignment of values to variables.

For example: we can say that the integer arithmetic


sentence “x + y = 4” is true in the world where x = 2 and
y = 2.
- Logicians often refer to models rather than worlds, but
the meaning is the same: an assignment of values to
Con’t…
11

For example: The model {x = 2, y = 2} is a model of the


sentence

“x + y = 4”.
 In addition, the model {x = 1, y = 3} is also a model of
the sentence “x + y = 4”. In fact, because there are an
infinite number of integers, there are an infinite number
of models of this sentence.
Propositional(Boolean) Logic
12

 Proposition is statement which is either true or false


but not both at any time.
 A statement is a sentence which is either true or false.
 PL uses declarative sentences only
 PL doesn’t involve quantifiers.
 Not all sentences are statement (interrogatives,
imperatives and exclamatory)
Con’t…
13

 Preposition can be conditional or unconditional


 Examples
 Socrates is mortal (unconditional)
 If the winter is severe, students will not succeed.

(conditional)
 All are the same if their color is black (conditional)

 In propositional logic, symbols represent the whole


preposition.
 Examples:
 M = Socrates is mortal
 W = winter is sever
Con’t…
14

 Preposition symbols can be combined using


Boolean connectives to generate new
preposition with complex meaning
 Symbols involved in PL:
 Logical constants (TRUE and FALSE)
 Preposition symbols (also called atomic symbols) like

M, W, S
 Logical connectives

 (negation),
 (conjunction),
 (disjunction),
 (bi-implication or equivalence),
Con’t…
15

 A simple language useful for showing key ideas and


definitions
 User defines a set of propositional symbols, like P and Q.
 User defines the semantics of each propositional
symbol:
 P means “It is hot”
 Q means “It is humid”
 R means “It is raining”
Con’t…
16

 A sentence (well formed formula) is defined as


follows:
 A symbol is a sentence
 If S is a sentence, then S is a sentence
 If S is a sentence, then (S) is a sentence
 If S and T are sentences, then (S  T), (S  T), (S 
T), and (S ↔ T) are sentences
 A sentence results from a finite number of
Examples of PL sentences
17

 (P  Q)  R
“If it is hot and humid, then it is raining”
 Q  P, “If it is humid, then it is hot”
 Q , “It is humid.”
 A better way:
Ho = “It is hot”

Hu = “It is humid”
Some terms
18

 The meaning or semantics of a sentence determines its


interpretation.
 Given the truth values of all symbols in a sentence, it can
be “evaluated” to determine its truth value (True or
False).
 A model for a KB is a “possible world” (assignment of
truth values to propositional symbols) in which each
Truth tables I
19
Truth tables II
20
Knowledge Representation and
reasoning
21

 Knowledge Representation: express knowledge


explicitly in a computer-tractable way such that the agent
can reason out.
 Parts of KR language:
 Syntax of a language: describes the possible
configuration to form sentences.
E.g. if x & y denote numbers, then x > y is a sentence
about numbers
Con’t…
22

 Semantics: determines the facts in the world to which the


sentences refer.
E.g. x > y is false when y is greater than x and true
otherwise

Reasoning: is the process of constructing new sentences from


existing facts in the KB.
 Proper reasoning ensures that the new configuration
represent facts that actually follow from the facts in the KB.
Knowledge-based Systems and
Knowledge
23

What is a knowledge-based system?


 A system which is built around a knowledge
base. i.e. a collection of knowledge, taken from a
human, and stored in such a way that the system
can reason with it.

What is knowledge?
 Knowledge is the sort of information that people
Con’t...
24

 Knowledge includes:
 facts, concepts, procedures, models, heuristics,
examples.
 Knowledge may be:
 specific or general
 exact or fuzzy
 procedural or declarative
25

THANK YOU
Q&A
?

You might also like