我为专家系统编写了这条规则:
(defrule wild chicory
(attribute (name habitat) (value sea montain grassland unknown))
=>
(assert (plant "Cichorium_Intybus"))
)
但是,我不希望栖息地的价值与我给出的所有价值相匹配,而只与至少一个价值相匹配。我想知道我应该怎么做。我可以这样做:
(defrule wild chicory
(or (attribute (name habitat) (value sea))
(attribute (name habitat) (value mountain))
(attribute (name habitat) (value grassland))
(attribute (name habitat) (value unknow))
)
=>
(assert (plant "Cichorium_Intybus"))
)
但我想知道是否有更好的解决方案。谢谢