Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

FOL-Logic, Reasoning and Uncertainty , Exams of Artificial Intelligence

FOL- Information about logic, reasoning and uncertainty in first order logic

Typology: Exams

2017/2018

Uploaded on 04/09/2018

abhinay-paleti
abhinay-paleti 🇮🇳

1 document

1 / 108

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Logic, Reasoning, and Uncertainty
Logic, Reasoning, and Uncertainty
CSEP 573
© CSE AI Faculty
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download FOL-Logic, Reasoning and Uncertainty and more Exams Artificial Intelligence in PDF only on Docsity!

Logic, Reasoning, and UncertaintyLogic, Reasoning, and Uncertainty

CSEP 573

© CSE AI Faculty

What’s on our menu today?What’s on our menu today?

Propositional Logic

Resolution

WalkSAT

Reasoning with First-Order Logic

Unification

Forward/Backward Chaining

Resolution

Wumpus again

Uncertainty

Bayesian networks

Understanding ResolutionUnderstanding Resolution

IDEA: To show

KB

α

, use proof by

contradiction, i.e., show

KB

∧ ¬ α

unsatisfiable

KB is in

Conjunctive Normal Form (CNF):

KB is conjunction of clauses E.g., (A

B)

(B

C

D)

Literals

Clause

Generating new clausesGenerating new clauses

General Resolution inference rule (for CNF):

l^1

l^

k

m

1

m

n

l^1

li-

l

i+

l^

k

m

1

m

j-

m

j+

m

n

where

li

and

m

j^

are complementary

literals (

l^

i^

m

)j

E.g.,

P

1,

P

2,

P

2,

P

1,

Resolution exampleResolution example

Empty clause

Recall that KB is a

conjunction

of all these clauses

Is

P

1,

P

1,

satisfiable? No!

Therefore, KB

∧ ¬ α

is unsatisfiable, i.e.,

KB

α

You got a literal and its negation What does this mean?

KB

¬α

Back to Inference/Proof TechniquesBack to Inference/Proof Techniques

Two kinds (roughly):

Successive application of inference rules

Generate new sentences from old in a sound way

Proof = a sequence of inference rule applications

Use inference rules as

successor function in a

standard search algorithm

E.g., Resolution

Model checking

Done by checking satisfiability: the SAT problem

Recursive depth-first enumeration of models usingheuristics: DPLL algorithm

(sec. 7.6.1 in text)

Local search algorithms (sound but incomplete)

e.g., randomized hill-climbing (WalkSAT)

Why Satisfiability?Why Satisfiability?

Recall:

KB

α

iff

KB

α

is unsatisfiable

Thus, algorithms for satisfiability can be used for

inference by showing

KB

α

is unsatisfiable

BUT… showing a sentence issatisfiable (the SAT problem)

is NP-complete!

Finding a fast algorithm for SAT automatically yields fast algorithms

for hundreds of difficult (NP-

complete) problems

I really can’t get

¬

satisfaction

Satisfiability ExamplesSatisfiability Examples

E.g. 2-CNF sentences (2 literals per clause):(

A

B)

(A

B)

(A

B)

Satisfiable?Yes (e.g., A = true, B = false)(

A

B)

(A

B)

(A

B)

A

B)

Satisfiable?No

The

WalkSAT

algorithm

The

WalkSAT

algorithm

Greed

Randomness

Hard Satisfiability ProblemsHard Satisfiability Problems

Consider random 3-CNF sentences. e.g.,

D

B

C)

(B

A

C)

C

B

E)

(E

D

B)

(B

E

C)

m = number of clausesn = number of symbols •

Hard instances of SAT seem to cluster nearm/n = 4.3 (critical point)

Hard Satisfiability ProblemsHard Satisfiability Problems Median runtime for random 3-CNF sentences,

n = 50

What about me?What about me?

KB contains "physics" sentences for every single

square For every time step

t and every location [

x,y],

we need to add to the KB:

L

x,y

FacingRight

t^

Forward

t^

L

x+1,y

Rapid proliferation of sentences!

t+

t

Limitations of propositional logicLimitations of propositional logic

What we’d like is a way to talk aboutobjects and

groups of objects, and to

define relationships between them

What we’d like is a way to talk aboutobjects and

groups of objects, and to

define relationships between them

Enter…First-Order Logic

(aka “Predicate logic”)