Sistemas expertos
Sistemas expertos
Ejemplo de un sistema experto en clips:;;;======================================================
;;; Mini-micro Sistema Experto
;;;
;;; Diagnostico de fallassimples en un auto
;;;
;;; Para correr, hacer: load, reset y run
;;;======================================================;;****************
;;* DEFFUNCTIONS *
;;****************
(deffunction pregunta (?pregunta $?respuestas-posibles)(printout t ?pregunta)
(bind ?respuesta (read))
(if (lexemep ?respuesta)
then (bind ?respuesta (lowcase ?respuesta)))(while (not (member ?respuesta ?respuestas-posibles)) do
(printout t ?pregunta)
(bind ?respuesta (read))
(if(lexemep ?respuesta)
then (bind ?respuesta (lowcase ?respuesta))))
?respuesta)
(deffunction si-o-no-p (?pregunta)(bind ?respuesta (pregunta ?pregunta si no s n))
(if (or (eq ?respuesta si) (eq ?respuesta s))
then TRUE
elseFALSE))
;;****************
;;* DEFTEMPLATES *
;;****************
(deftemplate auto(slot arranca (type SYMBOL)
(allowed-values si no nose)
(default nose))
(slot funciona (type SYMBOL)...
Regístrate para leer el documento completo.