samples/basic/tutorial/diagnose_2.kb
Rules can refer to facts whose values are acquired from other rules. We can illustrate that point by adding to the diagnostic sample we've already built.
The application determines what the problem is, but doesn't tell the user what to do about it. We can add a set of rules that recommend an action for the user to take, based on what the problem is.
conditions |
value |
problem = "Screen saver" |
"Move mouse" |
problem = "Monitor turned off" |
"Turn monitor on" |
problem = "Dirty rollers" |
"Clean rollers" |
problem = "No mouse pad" |
"Get a mouse pad" |
problem = "Broken mouse" |
"Buy new mouse" |
text <p>The problem is: %problem%</p>
<p>To fix it: %action%</p>
|
|
Copyright ©1995-2006 Amzi!
inc. All Rights Reserved. Privacy Policy.
Amzi!, KnowledgeWright and WebLS are registered
trademarks and Adventure in Prolog, Logic Server, Logic Explorer, Adventure
in Prolog and Subscription Plus are trademarks of Amzi! inc.