Pergunta

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) )
)
Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top