home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_09 / 8n09129a < prev    next >
Text File  |  1990-07-28  |  786b  |  30 lines

  1. /********************************************
  2.  
  3.     CHEESE.C - a program to invoke the
  4.     cheese knowledge base
  5.  
  6. ********************************************/
  7.  
  8. #include <stdio.h>
  9. #include "pcxpro.h"
  10.  
  11. main()
  12.  
  13. {
  14.   int cf;          /* confidence factor for result */
  15.   char value[80];  /* contains the return string value
  16.            from the consultation */
  17.  
  18.   if(load_knowledge_base("cheese.kb")) 
  19.                     /* if success in loading */
  20.       solve_for("CHEESE",  
  21.                /* the goal for this consultation */
  22.         'B',   /* inference method, backward for this ex. */
  23.         value,    /* string for the returned result */
  24.         &cf);    /* confidence factor for result */
  25.  
  26.   printf("The cheese recommended for this consultation
  27.          is %s\n", value);
  28.  
  29. }
  30.