0% found this document useful (0 votes)
176 views32 pages

Topic - 6 (Logical Agents)

The document provides an overview of logical agents and propositional logic. It discusses the key components of a logical agent including its knowledge base, sensors, model of the world, reasoning and decision making, and effectors. It then describes propositional logic, focusing on its syntax including logical connectives, truth tables, and the concepts of validity, satisfiability, and unsatisfiability. The document is intended to provide background information on knowledge-based agents and propositional logic as it relates to the topic of artificial intelligence.

Uploaded by

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

Topic - 6 (Logical Agents)

The document provides an overview of logical agents and propositional logic. It discusses the key components of a logical agent including its knowledge base, sensors, model of the world, reasoning and decision making, and effectors. It then describes propositional logic, focusing on its syntax including logical connectives, truth tables, and the concepts of validity, satisfiability, and unsatisfiability. The document is intended to provide background information on knowledge-based agents and propositional logic as it relates to the topic of artificial intelligence.

Uploaded by

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

Spring 2016

CSE 412: Artificial Intelligence

Topic 6: Logical Agents


Topic Contents
Knowledge-Based Agents

Logic

Propositional Logic: A Very Simple Logic


Syntax
Semantics
A simple knowledge base
Inference
Equivalence, validity, and satisfiability
Architecture of a
Simple Intelligent Agent

Environment Agent

Sensors Model of World Prior Knowledge


(being updated) about the World

Reasoning &
Decisions Making

Effectors List of
Goals/Utility
Possible Actions

3
Knowledge Based Agent

Knowledge base:
A knowledge base (abbreviated KB or kb) is a special
kind of database for knowledge management.
A knowledge base is an information repository that
provides a means for information to be collected,
organized, shared, searched and utilized.
The part of an expert system that contains the facts
and rules needed to solve problems.
A collection of facts and rules for problem solving.

4
Knowledge Based Agent

The agent must be able to:


represent states, actions, etc.
incorporate new percepts
update internal representation of world
deduce hidden properties of world
deduce appropriate actions
One of the core problems in developing an
intelligent agent is knowledge representation:
how to represent knowledge
how to reason using that knowledge

5
Knowledge Bases (KB)

A knowledge base:
contains the domain-specific content for an agent
is a set of representations of facts about the world
is a set of sentences in a formal language

Building the KB:


learning: agent discovers what it knows
telling: agent is given what it knows (declarative)

6
Knowledge Bases (KB)

Main actions of intelligent agent:


TELL information to KB in the form of percept
ASK KB what to do in the form of action

Answers should follow from KB.


Agent should not make things up!

An inference engine is composed of domain-


independent algorithms that are used to
determine what follows from the knowledge
base.
7
Knowledge Bases (KB)

View of agent (levels of abstraction):


knowledge level:
what the agent knows at a high level
logic level:
level of sentence encoding
implementation level:
level that runs on the architecture,
detail of data structures and algorithms.

8
Algorithm

9
General Logic

The agent internally represents its


world/environment in its knowledge base.
Sentences are representations in some language.
Facts are claims about the world that are true/false.
The Sky is blue.
Sentences
The sun is shining
representation in agent
world/environment
Facts

10
General Logic

Sentences represent facts in the world.


Meaning connects sentences to their facts.
A sentence is true if what it represents is
actually the case in the current state of world.
Sentences Time flies.
representation in agent Meaning / Interpretation
world/environment
Facts

11
General Logic

Proper reasoning ensures that conclusions


inferred from the KB are consistent with reality.
That means they represent new facts that actually
follow from the original facts (represented by sentences
in the KB).
infer
Knowledge Conclusions
repr.
world
follows
Facts New Facts

12
General Logic

Computers don't know the meaning.


A mechanical inference procedure is needed that
derives conclusions without needing to know the
meaning of the sentences.
entails
infer
Knowledge
Sentences Conclusions
New Sentences
repr.
world
follows
Facts New Facts

13
Entailment

KB
Knowledge base KB entails sentence
if and only if is true in all worlds where KB is true

14
Entailment

KB
Knowledge base KB entails sentence
if and only if is true in all worlds where KB is true
For example:
KB: "sky is blue" = true, "sun is shining" = true
entails : "sky is blue and sun is shining" = true
represents a true fact
as long as facts represented in KB are true
if the sky was actually cloudy then KB isn't the true world state
then wouldn't represent a true fact
Entailment requires sentences in KB to be true.
15
Logical Inference

Inference procedure can:


generate new sentences entailed by KB
determine whether or not a given sentence
is entailed by KB (i.e. prove )

16
General Logic

Logics are formal languages for representing


information from which conclusions can be drawn.

17
General Logic

Logics are characterized by


what they commit to as "primitives".
Logic What Exists in World Knowledge States
Propositional facts true/false/unknown
First-Order facts, objects, relations true/false/unknown
Temporal facts, objects, true/false/unknown
relations, times
Probability Theory facts degree of belief 0..1
Fuzzy degree of truth degree of belief 0..1

18
Propositional Logic (PL) Basics

propositions: assertions about an aspect of a world


that can be assigned either a true or false value
e.g. SkyIsCloudy, JimIsHappy
True, False are propositions meaning true and false

19
Logical Connectives of PL

S negation (not)
S1S2 conjunction (and)
S1 and S2 are conjuncts
S1S2 disjunction (or)
S1 and S2 are disjuncts
S1S2 implication/conditional (if-then)
S1 is the antecedent/premise
S2 is the consequent/conclusion
S1S2 equivalence/biconditional (if and only if)

20
Syntax of PL

Models specify truth value for each proposition:


e.g. S1= true, S2= false
Rules for evaluating truth with respect to model m
S is true iff S is false
S1S2 is true iff S1 is true and S2 is true
S1S2 is true iff S1 is true or S2 is true
S1S2 is true iff S1 is true or S2 is true
is true iff S1 is false or S2 is true
is false iff S1 is false and S2 is false
S1S2 is true iff S1S2 is true and S2S1 is true
Operator Precedence: (highest) (lowest)
21
Truth Tables

A B C
false false false
false false true Given n symbols,
false true false 2n possible combinations of
false true true truth value assignments.
true false false
true false true here each row is an interpretation
true true false
true true true

22
Implication Truth Table

A B AB B A
false false true true
false true true true
true false false false
true true true true

AB is equivalent to B A

23
Validity

A B C A A
false false false true
false false true true A sentence is valid
false true false true if it's true in all interpretations:
false true true true P1 P1 P1P1 (tautologies)
true false false true
true false true true
(i.e. its entire column is true)
true true false true
true true true true

24
Satifiability

A B C A B
false false false true
false false true true A sentence is satisfiable
false true false false if it's true in some interpretations:
false true true false P1 P2 P2P1
true false false true
true false true true
(i.e. its column is true and false)
true true false true
true true true true

25
Unsatifiability

A B C C C
false false false false
false false true false A sentence is unsatisfiable
false true false false if it's true in no interpretations:
false true true false P1 P1 (inconsistent/contradiction)
true false false false
true false true false
(i.e. its entire column is false)
true true false false
true true true false

26
Inference Proof Methods

Model Checking:
truth table enumeration
sound and complete for propositional logic
heuristic search in model space
sound but incomplete
Application of Syntactic Operations
(i.e. Inference Rules):
sound generation of new sentences from old
could use inference rules as operators for search

27
Inference by Enumeration

LET: KB = AC, B C = AB
DOES: KB ?
A B C RECALL: The computer
false false false doesn't know the meaning
false false true
of the proposition symbols.
false true false
false true true
So all logically distinct cases
true false false
must be checked to prove that
true false true
true true false
a sentence can be derived
true true true from a KB.
28
Inference by Enumeration

LET: KB = AC, B C = AB
DOES: KB ?
A B C AC B C KB
false false false false true false Rows where all of
false false true true false false sentences in KB
false true false false true false are true are the
false true true true true true
models of KB
true false false true true true
true false true true false false
true true false true true true
true true true true true true
29
Inference by Enumeration

LET: KB = AC, B C = AB
DOES: KB ? YES!
A B C AC B C KB AB KB is entailed by KB,
false false false false true false false true if all models of KB
false false true true false false false true are models of ,
false true false false true false true true
i.e. all rows where
false true true true true true true true
true false false true true true true true
KB is true, is true
true false true true false false true true In other words:
true true false true true true true true KB is valid.
true true true true true true true true
30
Inference by Enumeration

Though complete for PL, the proofs using this


enumeration grow exponentially in length as the
number of symbols increases.

There must be a better way.


Natural deduction is an inference procedure
that uses sound inference rules to derive new
sentences from the KB and any previously
derived sentences until the conclusion sentence
is derived.
31
THANKS

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy