Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fuzzy facts in clips

I made a fuzzy template that will represent a student's knowledge in a certain domain. Problem is that upon declaring a student John as low, he will also be declared as med because low students are also med between 30 and 40.

How can I declare a student as being low, without being med?

Note that I know I can do something like (student (name John) (knowledge (20 0) (21 1) (22 0))) , but what if I want to declare him using the fuzzy value?

(deftemplate fz-knowledge
0 100
( (low (20 1) (40 0))
  (med (30 0) (50 1) (70 0))
  (high (60 0) (80 1))
))


(deftemplate student
(slot name)
(slot knowledge (type FUZZY-VALUE fz-knowledge))
)

(deffacts students
(student (name John) (knowledge low) )
)
like image 883
George Irimiciuc Avatar asked Apr 24 '14 10:04

George Irimiciuc


1 Answers

By having overlapping ranges it kind of makes sense. But maybe overlapping isn't what you want to do. What about:

(deftemplate fz-knowledge
0 100
( (low (20 1) (40 0))
  (high (60 0) (80 1))
  (med   NOT [ low OR high ] )
))

That way, you can clearly tell when a score is low, or high, and the loosy-goosy med just fills in the cracks.

like image 111
Gutblender Avatar answered Oct 22 '22 11:10

Gutblender