, 25 2020 . 13:35
+
TigerMoonz: ! , " . " swi-prolog.
5 8 , 4
( ). :
1) ( );
2)
;
3) , .
. , . state(____, ____) . state(0, 0), state(_,4) state(4,_).
5 . . , .
% , ( )
solve(Start,Solve):- % Start - , Solve -
depth([],Start,Solve).
depth(P,X,[X|P]):-
goal(X). % ,
%
depth(P,X,Solve):-
next(X,X1),
not(member(X1,P)),
depth([X|P],X1,Solve).
https://forum.sources.ru/index.php?showtopic=420867&view=findpost&p=3842387
: