90 likes | 109 Views
Using Definite Knowledge. Notes for Ch.3 of Poole et al. CSCE 580 Marco Valtorta. Definite Clause Language. A database language A question-answering system A programming language A representation and reasoning systems (RRS). Definite Clauses as RRS.
E N D
Using Definite Knowledge Notes for Ch.3 of Poole et al. CSCE 580 Marco Valtorta
Definite Clause Language • A database language • A question-answering system • A programming language • A representation and reasoning systems (RRS)
Definite Clauses as RRS • Which concepts and individuals to represent? • At what level of detail? • Is each clause true in the intended interpretation? • If so, a sound proof procedure will generate only answers that are true in the intended interpretation! • Do the rules for the predicates cover all cases?
House Wiring (elect.pl) • Review Fig. 3.1 (same as 1.3) • Level of detail (abstraction) influenced by goals of modeling and available information • Determine whether light are on or off • Voltage and frequency are irrelevant • Common-sense level: we may ignore Kirkhoff’s law
Individuals and Relations • Wires, switches, lights, outlets, circuit breakers. • Relationships represented by predicates: • light(L)---L is a light • lit(L)---L, a light, is lit • live(W)---W, a wire, has current • up(S)---S, a switch, is up • down(S) • ok(E)---E, a circuit breaker or a light, is not blown • connected_to(X,Y)---current (if present at Y) would flow to X.
Axiomatize! • Write what is true in the intended interpretation, using constant and predicate names. • Start with facts. • light(l1)---l1 is a light • down(s1)---switch s1 is down • ok(l2)---l2 is not blown • There is a “light” predicate but no “switch” predicate. Why? • Because we distinguish lights when we define “lit” • Because switches cannot be broken
Keep axiomatizing! • Rules, e.g.: • connected_to(w0,w1) <- up(s2) • Is this true in the intended interpretation? Check it! • Check what? The figure! • connected_to(w5, outside). • Should connected_to be transitive? Symmetric? Reflexive? • Maybe, but it is not in elect.pl!
More Rules for House Wiring • lit(L) <- light(L) & ok(L) & live(L). • A recursive definition: • live(Y) <- connected_to(Y,Z) ^ live(Z). • live(outside).
Is this axiomatization good? • Every clause is true in the intended interpretation. • Some “true” facts are not represented at all. • Some are impossible to represent in definite clause logic without introducing new predicates or constants, e.g.: • “If a light is ok and live and it is not lit, then it is blown” requires a negated atom in the body of a clause!