ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy...

13
ITCS 6150 Intelligent Systems Lecture 12 Logical Agents Chapter 7

Transcript of ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy...

Page 1: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

ITCS 6150

Intelligent Systems

Lecture 12

Logical Agents

Chapter 7

Page 2: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Propositional Logic

We’re still emphasizing Propositional Logic

Very important question with this method

• Does knowledge base of propositional logic satisfy a

particular proposition?

– Can we generate some sequence of resolutions that prove

a proposition is possible?

Page 3: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Backtracking

Another way (representation) for searching

• Problem to solve is in CNF

– Is Marvin a Martian given --- M == 1 (true)?

▪ Marvin is green --- G=1

▪ Marvin is little --- L=1

▪ (little and green) implies Martian --- (L ^ G) => M

~(L^G) V M

~L V ~G V M = 1

– Proof by contradiction… are there true/false values for G, L, and M that are

consistent with knowledge base and Marvin not being a Martian?

▪ G ^ L ^ (~L V ~G V M) ^ ~M == 0?

Make sure you

understand this

logic

Page 4: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Searching for variable values

Want to find values such that:

• Randomly consider all true/false assignments to variables

until we exhaust them all or find match

– (G, L, M) = (1, 0, 0)… no

= (0, 1, 0)… no

= (0, 0, 0)… no

= (1, 1, 0)… no

• Alternatively…

G ^ L ^ (~L V ~G V M) ^ ~M == 0

Page 5: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Searching for variable values

• Search through possible assignments to (G, L, M) via depth first search

(0, 0, 0) to (0, 0, 1) to (0, 1, 0)…

– Each clause of CNF must be true

▪ Terminate consideration when clause evaluates to false

– Use heuristics to reduce repeated computation of propositions

▪ Early termination

▪ Unit clause heuristic

G

L

M

Page 6: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Control Strategies for Resolution Methods

Resolution Strategy Example:

Predicate Logic Statements:

R(x) – x can read, L(x) – x is literate, D(x) – x is dolphin, I(x)- x is intelligent.

Knowledge Base (KB):

Whoever can read is literate - (x)[R(x) → L(x)]

Dolphins are not literate - (x)[D(x) → L(x)]

Some dolphins are intelligent - (x)[D(x) I(x)]

We want to prove – Some who are intelligent cannot read.

α = (x)[I(x) R(x)]

We need to prove that KB {α} is unsatisfiable (false in every world)

Page 7: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Resolution Strategy example

KB {α} =

{(x)[R(x) → L(x)], (x)[D(x) → L(x)], (x)[D(x) I(x)], (x)[I(x) R(x)]} =

{R(x) L(x), D(y) L(y), D(A), I(A), I(z) R(z)}

I(z) R(z) I(A)

R(A) R(x) L(x)

L(A) D(y) L(y)

D(A) D(A)

NIL

Page 8: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Breadth-First strategy:

All of the first level resolvents are computed first, then the second level resolvents,

and so on. I-th level resolvent is one whose deepest parent is an (i-1)-th level resolvent

R(x) L(x) D(y) L(y) D(A) I(z) R(z)} I(A)

R(A)R(y) D(y)

R(A)

L(A)

NIL

Page 9: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Set of Support Strategy

At least one parent of each resolvent is selected from among the clauses resulting

from the negation of the goal or from their descendants. The strategy is complete.

R(A) R(x) L(x)

L(A) D(y) L(y)

D(A) D(A)

NIL

I(z) R(z) I(A)

Page 10: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

The Unit Preference Strategy

A modification of the set of support strategy in which, instead of filling out each level

in breadth-first fashion, we try to select a single-literal clause (called a unit) to be a parent

in a resolution. The strategy is complete.

R(A) R(x) L(x)

L(A) D(y) L(y)

D(A) D(A)

NIL

I(z) R(z) I(A)

Page 11: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

The Linear-Input Form Strategy

Each resolvent has at least one parent belonging to the base set.

This strategy in not complete.

Example of unsatisfiable set for which linear-input form refutation do not exist:

{Q(u) P(A), Q(w) P(w), Q(x) P(x), Q(y) P(y)} .

Problem: Follow this strategy for the base set:

R(x) L(x) D(y) L(y) D(A) I(z) R(z)} I(A)

Page 12: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

The Ancestry-Filtered Form Strategy

Each resolvent has a parent that is either in the base set or that is an ancestor of the

other parent. The strategy is complete.

Example:Q(x) P(x) Q(y) P(y)

P(x) Q(w) P(w)

Q(w) Q(u) P(A)

P(A)NIL

Page 13: ITCS 6150 Intelligent Systems · Control Strategies for Resolution Methods Resolution Strategy Example: ... A modification of the set of support strategy in which, instead of filling

Exercises

Use resolution refutation and RS method to prove that the following formula is tautology:

(1) (P→Q) → [(R P) → (R Q)]

(2) [(P → Q) → P] → P

(3) (P →P) → P

(4) (P → Q) → (Q → P)

Prove the validity of the following formulas using the method of resolution refutation:

(1) (x){[P(x) →P(A)] [P(x) → P(B)]}

(2) (z)[Q(z) →P(z)] →{(x)[Q(x) →P(A)] [Q(x) →P(B)]}

Find a linear input form refutation for the following unsatisfiable set of clauses:

P Q R, S T, T P, S, R, S U, U Q.