I run my first few programs in Prolog and got trapped in an experiment that I am trying to run. I initially did this on a mini map of several states of the USA, but I simplified it to the alphabet:
adj(a,b). adj(b,a). adj(b,c). adj(c,b). adj(c,d). na(X, Z) :- \+adj(X, Z).
When I request na (a, What). I don't get any answers (just not), but if I individually check na (a, d) it certainly naturally returns yes.
What is the explanation why this will happen? I was able to get other requests to work in different programs, so I wonder what key information I miss. Thank!
(\ +)/1 , " ". \+ na(a, What) , na(a, What) . na(a, What) , , , ( ) . (\ +)/1, , : , , , , . (\ +/1) , , . , ,
\+ na(a, What)
na(a, What)
na(X, Y) :- country(X), country(Y), \+ adj(X, Y).
/1 . - , , , . , : , , ( (\ +)/1, ). .
Source: https://habr.com/ru/post/1791257/More articles:how to get text inside html / text content? - javaCalling filter functions from a block processing function - pythonVIEW report triggers in Oracle - oracleIs there a way to import EDF files into R? - rEval () vs expression tree - ruby | fooobar.comCreating a point moving along a graph in MATLAB - graphScheduled tasks in Jetty - javaBinding and installing the python libtool module - pythonFailed to check persistent sessions in Django 1.1 - pythonUIApplication beginBackgroundTaskWithExpirationHandler question - iphoneAll Articles