home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / prolog / 2435 < prev    next >
Encoding:
Text File  |  1993-01-24  |  939 b   |  24 lines

  1. Newsgroups: comp.lang.prolog
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!monet.uwaterloo.ca!jssloka
  3. From: jssloka@monet.uwaterloo.ca (Scott Sloka)
  4. Subject: Help: making a binary predicate reversibly equal
  5. Message-ID: <C1C63u.J6n@watserv1.uwaterloo.ca>
  6. Sender: news@watserv1.uwaterloo.ca
  7. Organization: University of Waterloo
  8. Date: Sun, 24 Jan 1993 02:11:53 GMT
  9. Lines: 13
  10.  
  11.  
  12. Howdy.  My name is Scott Sloka and I am an AI enthusiast at the University of
  13. Waterloo.  I have a list of facts such as: nextto(a,b) and I would like
  14. nextto(a,b) to be equivalent to nextto(b,a).  This does not work:
  15.  
  16. nextto(X,Y):-nextto(Y,X).
  17.  
  18. because an endless loop is set up.  I am just beginning Prolog programming
  19. because I am doing a project on abstraction and I would like to include this
  20. parameter switch equalization in my routines for some of my predicates.  Any
  21. pointers would be greatly appreciated.  Thanks in advance.
  22.  
  23.         -Scott
  24.