, 22 2020 . 17:59
+
TigerMoonz: swi-prolog .
5 8 , 4
( ). :
1) ( );
2)
;
3) , .
. , . state(____, ____) . state(0, 0), state(_,4) state(4,_).
( . ). !
%
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=420847&view=findpost&p=3842325
: