🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2410

Help: making a binary predicate reversibly equal

#2410
From: Scott Sloka
Date: Sun, 24 Jan 1993 02:11
13 lines
962 bytes
Howdy.  My name is Scott Sloka and I am an AI enthusiast at the University of
Waterloo.  I have a list of facts such as: nextto(a,b) and I would like
nextto(a,b) to be equivalent to nextto(b,a).  This does not work:

nextto(X,Y):-nextto(Y,X).

because an endless loop is set up.  I am just beginning Prolog programming
because I am doing a project on abstraction and I would like to include this
parameter switch equalization in my routines for some of my predicates.  Any
pointers would be greatly appreciated.  Thanks in advance.

		-Scott
Technical Details
Message-ID: <C1C63u.J6n@watserv1.uwaterloo.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!monet.uwaterloo.ca!jssloka

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!monet.uwaterloo.ca!jssloka
From: jssloka@monet.uwaterloo.ca (Scott Sloka)
Subject: Help: making a binary predicate reversibly equal
Message-ID: <C1C63u.J6n@watserv1.uwaterloo.ca>
Sender: news@watserv1.uwaterloo.ca
Organization: University of Waterloo
Date: Sun, 24 Jan 1993 02:11:53 GMT
Lines: 13