List as graph in prolog
问题 I'm trying to generate all possible 'ways' from one element in matrix to another, Main conditional says that Element in matrix can be connected with other only if elements share at least one corner so in that matrix [[1,2,3] [5,4,6] [8,9,7]] 1 can be only conected with 2,4,5 but 4 is conected with all elements. Is it possible to represent that list as graph without using attract? Or maybe I can find out any easier way to do it Thanks for all answers. Ok i set forth :-) Now with predicates I