110 likes | 189 Views
Errors in Representing Knowledge. Errors with Constants, Variables, and Reliance on NL Errors with Specialization, Generalization, and Rules Other Errors. Letting NL dictate your representation. For Example: has John “has” a headache John “has” pride John “has” a son John “has” $50.
E N D
Errors in Representing Knowledge • Errors with Constants, Variables, and Reliance on NL • Errors with Specialization, Generalization, and Rules • Other Errors
Letting NL dictate your representation For Example: has • John “has” a headache • John “has” pride • John “has” a son • John “has” $50 (“has”#$John #$Headache) (“has”#$John #$Pride) (“has” #$John #$JohnsSon) (“has”#$John (#$Dollar-US 50))
At least 4 different senses: (#$bodilyDoer #$John #$JohnsHeadache) (#$feelsEmotion #$John #$Pride) (#$children #$John #$JohnsSon) (#$ownsWealth #$John (#$Dollar-US 50)) • John “has” a headache • John “has” pride • John “has” a son • John “has” $50
Relying on Constant Names • #$Coral - color, substance, or life form? • #$Turkey - nation, or bird? • Unless you’ve examined the assertions on the term, you don’t really know what it stands for.
Using Vague Constant Names • #$Coral- color, ocean floor feature, or life form? • #$Turkey- nation, or bird? When possible, disambiguate: • #$Coral-Color, #$CoralReef, #$CoralPolyp • #$Turkey, #$Turkey-Bird
Problems with Variables:Meaningless Variable Names Bad:?X, ?Y, ?Z, ?X1, ?X2, ?XX, ?XXX, etc. Good:?SUPER, ?SUB, ?EVNT, ?AGNT, etc. Readability is important! Where’s the error? (#$implies (#$and (#$startsAfterEndingOf ?X ?Y) (#$temporallySubsumes ?X ?Z)) (#$startsAfterEndingOf ?Y ?Z))
Problems with Variables:Meaningless Variable Names It’s easier to spot here, isn’t it? (#$implies (#$and (#$startsAfterEndingOf ?LATE ?EARLY) (#$temporallySubsumes ?LATE ?LATE-SUB)) (#$startsAfterEndingOf ?EARLY ?LATE-SUB))
Problems with Variables:Check them carefully! Typos are hard to spot and can have unintended effects! (#$implies (#$and (#$isa ?CIRC #$Circle) (#$radius ?CIRC ?RAD)) (#$evaluate ?AREA (#$TimesFn #$Pi-Number ?RAD ?RAD))) (#$areaOfObject ?CIRCLE ?AREA))
Problems with Variables:Typing. Variables aren’t typed by their names: (#$implies (#$and (#$inCont-Open ?RIVER ?CANYON) (#$inCont-Open ?BOAT ?CANYON)) (#$in-Floating ?BOAT ?RIVER)) These must be added: (#$isa ?RIVER #$River) (#$isa ?CANYON #$Canyon) (#$isa ?BOAT #$Watercraft)
Problems with Variables:Typing. Types implied by arg constraints on relations should NOT be added, as this redundancy violates modularity: (#$implies (#$and (#$isa ?PERS #$Person) (#$coworkers ?PERS ?CO)) (#$acquaintedWith ?PERS ?CO)) Instead: (#$implies (#$coworkers ?PERS ?CO) (#$acquaintedWith ?PERS ?CO))
Summary • Letting NL dictate your representation • Relying on Constant Names • Using Vague Constant Names • Problems with Variables • Meaningless variable names • Typos in naming variables • Variable Typing