I think Katie Truong wrote:
> Dear Jess Support Team,
>  
> I started writing a program that develops a small knowledge system for health 
> assessment and longevity planning.  The health assessment system will evaluate a 
> persons current health status based on input values for predefined risk factors and 
> behavioral influences on longevity.  The program will ask the user a number of 
> questions about his vital statistics and lifestyle habits.  Based on the answers 
> provided, the system will predict the persons longevity.
>  
> I am having problems understanding how to translate my rules into jess codes.  
> Therefore, I would like to ask for your assistance in getting me started with this 
> part. I've attached my codes to this e-mail; also, I've made a list of the rules I 
> need to add to my program.  
>  
> Thank you for your help in advance!
> Katie Truong


It looks like you started with the Tax Forms Advisor from "Jess in
Action", but you removed a lot of code -- actually you removed too
much. If you're going to use this framework, then you need to leave
everything in the "ask" module intact.

In any case, the point of the framework you're adopting is that
there's a list of questions, some of which depend on the answers to
other questions; after all the relevant questions are asked, the
system makes some decisions based on the answers.

In the book, the requirements for and dependencies between the
questions are encoded in rules in the "interview" module, while the
rules that make the final decisions are in the "recommend" module.

If you're going to use the framework, then you need to do things the
same way. I'd recommend re-reading chapter 11 and working from there.
Now, it's an open question whether you need to use this framework or
not; if you always want to ask te same questions in the same order, it
would be simpler just to write code that asks them straightaway. Only
then, once you've written the code to ask the questions and gotten
things set up such that the working memory includes the answers in
some useable form, can you proceed to write the rules that encode the
decision table listed below. But once all the answers are in working
memory (and you've also chosen a representation for the results of the
decisions) writing those rules is easy.


>  
> Rule No.If 
> Then1relative_weight=normalval=yes2heart_disease_risk=below_averagehddanger=low3age=25_or_less
>  and gender=mthen base_longevity=724weight=110_or_less and frame=small and 
> gender=frelative_weight=normal5cholesteral=low and 
> fat=highheart_desease_risk=below_average6salt=highblood_pressure=above_average7relative_weight=obese
>  and heart_disease_risk=above_average and blook_pressure=above_average and 
> smoker=yesoutlook=bleak8race=black and 
> origin=mediterraneanrisk=high9personality=aggressivepersonality_type=type_a10alcohol_consumption=moderateadd=good11outlook=bleak
>  and risk=unknown and add=goodfactor=none12base_longevity=72 and 
> factor=nonelongevity=67_years
> 

---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to