为什么程序不运行

为什么程序不运行

本文介绍了CLIPS基于规则的编程语言 - 为什么程序不运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!(deffacts init-facts (saleman s1 is city 1 3) (goal city 5 1 km 6) (city 1 3 km 3) (city 3 1 km 3) (city 1 4 km 4) (city 4 1 km 4) (city 1 5 km 2) (city 5 1 km 2) (city 3 2 km 6) (city 2 3 km 6) (city 5 4 km 7) (city 4 5 km 7) (city 5 2 km 8) (city 2 5 km 8) (city 4 2 km 4) (city 2 4 km 4) (city 5 3 km 3) (city 3 5 km 3) (passing 1 3 km 3 no) (passing 3 1 km 3 no) (passing 1 4 km 4 no) (passing 4 1 km 4 no) (passing 1 5 km 2 no) (passing 5 1 km 6 no) (passing 3 2 km 6 no) (passing 2 3 km 6 no) (passing 5 4 km 7 no) (passing 4 5 km 7 no) (passing 5 2 km 8 no) (passing 2 5 km 8 no) (passing 4 2 km 4 no) (passing 2 4 km 4 no) (passing 5 3 km 3 no) (passing 3 5 km 3 no))(defrule R1 ?x <- (saleman s1 is city ?s ?) ?y <- (passing ?w ?z ? ?x ?p) (city ?w ?z ? ?) (test (and (= ?s ?w) (eq ?p no))) => (set-strategy breadth) (retract ?x ?y) (assert (saleman s1 is city ?z ?s) (passing ?w ?z km ?x yes)))(defrule Goal (declare (salience 90)) (saleman s1 is city ?s ?e) (goal city ?w ?z) (test (and(= ?s ?w) (= ?e ?z))) => (printout t "The Saleman has arrived" crlf) (halt))推荐答案 这篇关于CLIPS基于规则的编程语言 - 为什么程序不运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-18 12:52