Forward and Backward Chaining: - Horn Form
Forward and Backward Chaining: - Horn Form
chaining
Horn Form (restricted)
KB = conjunction of Horn clauses
Horn clause =
proposition symbol; or
(conjunction of symbols) symbol
E.g., C (B A) (C D B)
IAGA 2005/2006
217
Forward chaining
Idea: fire any rule whose premises are satisfied in the
KB,
add its conclusion to the KB, until query is found
IAGA 2005/2006
218
219
IAGA 2005/2006
220
IAGA 2005/2006
221
IAGA 2005/2006
222
IAGA 2005/2006
223
IAGA 2005/2006
224
IAGA 2005/2006
225
IAGA 2005/2006
226
IAGA 2005/2006
227
Proof of completeness
4. Hence m is a model of KB
5. If KB q, q is true in every model of KB,
including m
IAGA 2005/2006
228
Backward chaining
Idea: work backwards from the query q:
to prove q by BC,
check if q is known already, or
prove by BC all premises of some rule concluding q
IAGA 2005/2006
229
IAGA 2005/2006
230
IAGA 2005/2006
231
IAGA 2005/2006
232
IAGA 2005/2006
233
IAGA 2005/2006
234
IAGA 2005/2006
235
IAGA 2005/2006
236
10
IAGA 2005/2006
237
IAGA 2005/2006
238
11
IAGA 2005/2006
239
IAGA 2005/2006
240
12
Efficient propositional
inference
Two families of efficient algorithms for propositional
inference:
Complete backtracking search algorithms
DPLL algorithm (Davis, Putnam, Logemann,
Loveland)
Incomplete local search algorithms
WalkSAT algorithm
IAGA 2005/2006
241
IAGA 2005/2006
242
13
IAGA 2005/2006
243
IAGA 2005/2006
244
14
IAGA 2005/2006
245
246
15
IAGA 2005/2006
247
248
16
IAGA 2005/2006
249
IAGA 2005/2006
250
17
Expressiveness limitation of
propositional logic
KB contains "physics" sentences for every single
square
For every time t and every location [x,y],
L FacingRightt Forwardt tLx+1,y
t x,y
Rapid proliferation of clauses
IAGA 2005/2006
251
Summary
Logical agents apply inference to a knowledge base to derive
new information and make decisions
Basic concepts of logic:
IAGA 2005/2006
252
18