Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (deftemplate MAIN::person
- (slot name)
- (slot age)
- (multislot hobby)
- (slot town)
- (slot sex))
- (person (name "Jane")
- (age 25)
- (hobby fashion gardening)
- (town montrose)
- (sex female))
- (deffacts hobby_types "Hobby categories"
- (hobby_type gardening active)
- (hobby_type swinging active)
- (hobby_type reading inactive)
- (hobby_type fashion inactive)
- )
- (defrule compatible_hobbies
- (opposite_sex ?name1 ?name2)
- (person (name ?name1) (hobby ?hobby1))
- (person (name ?name2) (hobby ?hobby2))
- (hobby_type ?hobby1 ?type)
- (hobby_type ?hobby2 ?type)
- =>
- (assert (hobbies_match ?name1 ?name2))
- )
Add Comment
Please, Sign In to add comment