Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CLIPS Program - rules
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ChucklesWK  
View profile  
 More options Jul 26 2012, 12:07 am
From: ChucklesWK <wkluckh...@gmail.com>
Date: Wed, 25 Jul 2012 21:07:42 -0700 (PDT)
Local: Thurs, Jul 26 2012 12:07 am
Subject: CLIPS Program - rules

I am unable to figure out why these won't fire from one rule to the next.
 Can anyone help me?

(deftemplate choices "attributes to like or dislike"

(slot groceries (type STRING))

(slot prepackaged (type STRING))

(slot meat (type STRING))

(slot bulk (type STRING))

)

(defrule startrule "first rule to fire"

(initial-fact)

=>

  (printout t crlf)

  (printout t "What is the main item that you are looking to purchase?"
crlf)

  (printout t "Is the main item that you purchasing meat, dairy, produce,
cereal, or international food?" calf)

  (printout t "(type meat, dairy, produce, cereal, or international)" crlf)

  (bind ?answer1 (readline))

  (assert (choices (groceries ?answer1)) )

  (assert (secondquestion))

)

(defrule secondquestion "get meat type"

?temp <- (secondquestion)

(choices (groceries "meat") )

=>

  (retract ?temp)

  (printout t crlf)

  (printout t "Do you want your meat to be organic, kosher, or neither?"
crlf)

  (printout t "(type organic, kosher, neither)" crlf)

  (bind ?answer2 (readline))

  (assert (choices (meat ?answer2))

  (assert (thirdquestion))

)

(defrule thirdquestion "get bulk answer"

?temp <- (thirdquestion)

(choices (meat "organic") )

=>

  (retract ?temp)

  (printout t crlf)

  (printout t "Do you want to purchase your meat from an butcher or
prepackaged?" crlf)

  (printout t "(type butcher or prepackaged)" crlf)

  (bind ?answer3 (readline))

  (assert (choices (prepackaged ?answer3))

  (assert (fourthquestion))

)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Artem Novikov  
View profile   Translate to Translated (View Original)
 More options Jul 26 2012, 3:38 am
From: Artem Novikov <noviko...@gmail.com>
Date: Thu, 26 Jul 2012 00:38:31 -0700 (PDT)
Local: Thurs, Jul 26 2012 3:38 am
Subject: Re: CLIPS Program - rules

Typo here:

(assert (choices (meat ?answer2))

add  ')':

(assert (choices (meat ?answer2)))

четверг, 26 июля 2012 г., 12:07:42 UTC+8 пользователь ChucklesWK написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »