Top Banner
Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1
13

Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

Mar 31, 2015

Download

Documents

Deshawn Clayson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

1

Artificial Intelligence in the 21st Century

S. Lucci / D. Kopec

Chapter 5:Logic in Artificial Intelligence

Page 2: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

A Typical Wumpus World

Page 3: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

Logic in general

Page 4: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

What is a logic?

A formal language Syntax – what expressions are legal Semantics – what legal expressions mean Proof system – a way of manipulating syntactic

expressions to get other syntactic expressions (which will tell us something new)

Why proofs? Two kinds of inferences an agent might want to make: Multiple percepts conclusions about the world Current state & operator properties of next state

Page 5: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

Entailment

Page 6: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

Types of logic

Page 7: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

7

5.1 – Logic & Representation

Induction puzzles Logic puzzles solved via identification and

subsequent elimination of perhaps a series of obvious cases

A well known example of an induction puzzle is “The King’s Wise Men”

Page 8: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

8

The King’s Wise Men

Three men facing each other are blindfolded and each is wearing either a blue or white hat

Page 9: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

9

The King’s Wise Men / cont. King tells the three men that each has either a

blue or white hat and at least one is blue Whoever guesses their hat color first will be

the king’s next wise man Predicate logic can be used to solve this

puzzle Allows each state to be denoted by a

distinct expression Predicate WM_I( ) denotes that wise man I

has a hat of some color

Page 10: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

10

The King’s Wise Men / cont.

Table 5.1: The seven distinct cases for The King’s Wise Men Problem.

( WM_1(B) ∧ WM_2(W) ∧ WM_3(W) ) (1)

( WM_1(W) ∧ WM_2(B) ∧ WM_3(W) ) (2)

( WM_1(W) ∧ WM_2(W) ∧ WM_3(B) ) (3)

 ( WM_1(B) ∧ WM_2(B) ∧ WM_3(W) ) (4)

( WM_1(W) ∧ WM_2(B) ∧ WM_3(B) ) (5)

( WM_1(B) ∧ WM_2(W) ∧ WM_3(B) ) (6)

 ( WM_1(B) ∧ WM_2(B) ∧ WM_3(B) ) (7)

Page 11: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

11

5.2 – Propositional Logic

With propositional logic, wise man one having a blue hat can be represented with the variable p If wise man one has a white hat, then a different

variable, such as q, must be used

Although propositional logic is less expressive than predicate logic, it is easier to work with and is a convenient place to begin our discussion of logic

Page 12: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

12

5.2.1 – Propositional Logic - Basics

A statement (or logical expression) in propositional logic is similar to a sentence used in the English language

It is a sentence that can be categorized with a truth value of true or false

Lower-case letters from the middle of the alphabet such as p, q, and r are used to denote propositional logic variables These variables are the primitives, or basic building

blocks in this logic

Page 13: Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.

13

Basics / cont.

Table 5.2: Compound expressions formed by using logical connectives