Download presentation
Presentation is loading. Please wait.
1
Copyright © 2002 Cycorp Writing Efficient CycL Part 1 Part One –Simpler is Better –Use Rule Macro Predicates –Create Simplifying Vocabulary Part Two –Factor out Commonality –Existence is Expensive –Exceptions are Exceptional –State Negations Explicitly –Generalize -- Don’t List –Use #$different
2
Copyright © 2002 Cycorp Writing Efficient CycL Part 1 Simpler is Better Use Rule Macro Predicates Create Simplifying Vocabulary
3
Copyright © 2002 Cycorp Simpler is Better Modularity leads to generality and reuse If it looks too complicated, it is BETTER WORSE GAFs Binary Horn rules Small rule s Rules Non-binary Non-horn rules 1 gargantuan rule
4
Copyright © 2002 Cycorp GAFs are better than rules BETTER WORSE GAFs Binary Horn rules Small rule s Rules Non-binary Non-horn rules 1 gargantuan rule Example: #$hasDiet (#$hasDiet #$koala #$eucalyptus) (#$hasDiet #$cow #$grass) (#$hasDiet #$vampireBats #$blood) (#$hasDiet #$venusFlytrap #$fly-Insect) Rule Macro Predicates = Rules + GAFs 99.9% of KB should be GAFs
5
Copyright © 2002 Cycorp Binary is better than non-binary BETTER WORSE GAFs Binary Horn rules Small rule s Rules Non-binary Non-horn rules 1 gargantuan rule Avoid gratuitously ternary or quaternary predicates: (graduationDate ?PRSN ?DGREETYP ?DATE) (graduationEvent ?PRSN ?EVENT) (dateOfEvent ?EVENT ?DATE) (degreeTypeOfGraduationEvent ?EVENT ?DGREETYP)
6
Copyright © 2002 Cycorp Horn-rules are better than non-horn rules BETTER WORSE GAFs Binary Horn rules Small rule s Rules Non-binary Non-horn rules 1 gargantuan rule Horn Rule: (#$implies (#$isa ?ANIMAL #$Bird) (#$thereExists ?WING (#$and (#$isa ?WING #$Wing-AnimalBodyPart) (#$anatomicalParts ?ANIMAL #$Wing- AnimalBodyPart))))) Consequent of Non-horn Rule: (#$or (#$objectHasColor #$Rover #$TanColor) (#$objectHasColor #$Rover #$BlackColor)) If all of this is true, then
7
Copyright © 2002 Cycorp Several small rules are better than one gargantuan rule BETTER WORSE GAFs Binary Horn rules Small rule s Rules Non-binary Non-horn rules 1 gargantuan rule 1 Gargantuan Rule: – way too complex to be correct – will never get used – large memory requirement – likely does not say what was intended – cannot be generalized
8
Copyright © 2002 Cycorp Writing Efficient CycL Part 1 Simpler is Better Use Rule Macro Predicates Create Simplifying Vocabulary
9
Copyright © 2002 Cycorp Simpler is better (#$genlPreds #$brothers #$siblings) is better than (#$implies (#$brothers ?AGT ?BRO) (#$siblings ?AGT ?BRO)) genlPreds Rule Macro Predicates helper function macros ProgrammingOE
10
Copyright © 2002 Cycorp Reason with the vocabulary itself Instead of this: (eats Cheetah Wildebeest) (implies (and (isa ?EAT Eating) (isa ?CH1 Cheetah) (isa ?WIL1 Wildebeest) (doer ?EAT ?CH1) (objectActedOn ?WIL1) (hasAttributes ?WIL1 Deceased)) (eats Cheetah Antelope) (implies (and (isa ?EAT Eating) (isa ?CH1 Cheetah)... Do this: (animalTypeEatsAnimalType Cheetah Wildebeest) (implies (animalTypeEatsAnimalType ?ANM1 ?ANM2) (hasAttributes ?ANM2 Deceased)) (animalTypeEatsAnimalType Cheetah Antelope) One rule applies to all animal types
11
Copyright © 2002 Cycorp Reason with the vocabulary itself (cont.) Entering a lot of rich knowledge in a new domain? add some abstractions as new vocabulary define new vocabulary in ways that link it up to other existing vocabulary Now you can tersely write the things you need to say.
12
Copyright © 2002 Cycorp Add Rule Macro Predicates Simple vocabulary for the sake of being simple is not worth it. Add Rule Macro Predicates. An extreme example of operating with too little vocabulary: 0 (#$SuccessorFn 0) (#$SuccessorFn (#$SuccessorFn 0)) (#$SuccessorFn (#$SuccessorFn (#$SuccessorFn 0))) (#$SuccessorFn (#$SuccessorFn (#$SuccessorFn (#$SuccessorFn 0))))...
13
Copyright © 2002 Cycorp Writing Efficient CycL Part 1 Simpler is Better Use Rule Macro Predicates Create Simplifying Vocabulary
14
Copyright © 2002 Cycorp Some False Ideas Erroneous Mindset “vocabulary is expensive” “complex assertions are cheap” –Physics Envy –Maxwell’s Equations of KR
15
Copyright © 2002 Cycorp New Vocabulary Will Not Make Rules Less Reusable The same kinds of tools that help you find #$Dog will help you find your new vocabulary The meaning of #$Dog is only defined by how it’s linked up to other things in the system -- all new vocabulary must be linked up properly All truly large-scale, reusable, interesting knowledge bases are going to be big For all large-scale knowledge bases, you must have tools
16
Copyright © 2002 Cycorp OE vs KE vs SME’s and Their Vocabulary OE: make it so that a KE can create vocabulary KE: understand enough about the logic so that they can create vocabulary SME: use the vocabulary –Should be able to say everything that they need to say with the available vocabulary
17
Copyright © 2002 Cycorp The Rule of 10 Simplifying many assertions is reason enough to create new vocabulary (#$isa ?MAL #$MalePerson) is better than (#$and (#$isa ?MAL #$Person) (#$hasGender ?MAL #$Masculine))
18
Copyright © 2002 Cycorp Why Simplify Vocabulary? Cyc is not a frame system: –Adding new vocabulary is NOT expensive –Creating collections is NOT expensive –Creating predicates is NOT expensive –Creating functions is NOT expensive –Creating microtheories is NOT expensive Reasoning with overly complicated rules is expensive Reasoning with overused vocabulary is hard to focus
19
Copyright © 2002 Cycorp Summary Slide Simpler is Better Use Rule Macro Predicates Create Simplifying Vocabulary
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.