Compare commits

..

No commits in common. "6d8273617cbea2ba9e16e9b7dfc450f23b239395" and "025860fc8fed2dcbe2648017cfac2a4a59ca3c8f" have entirely different histories.

View file

@ -57,6 +57,7 @@ initial_state([ [f, g, a],
initial_state([ [e, f, g],
[d,vide,h],
[c, b, a] ]). % h2=24, f*=30
initial_state([ [a, b, c],
[g,vide,d],
[h, f, e]]). % etat non connexe avec l'etat final (PAS DE SOLUTION)
@ -179,8 +180,8 @@ delete(N,X,[Y|L], [Y|R]) :-
%*************
heuristique(U,H) :-
% heuristique1(U, H). % au debut on utilise l'heuristique 1
heuristique2(U, H). % ensuite utilisez plutot l'heuristique 2
heuristique1(U, H). % au debut on utilise l'heuristique 1
% heuristique2(U, H). % ensuite utilisez plutot l'heuristique 2
%****************
@ -206,7 +207,7 @@ diff(_,_) :- true.
heuristique1(U,H) :-
findall(X,
(final_state(Fin), coordonnees([L,C], U, X),
(final_state(Fin), coordonnees([L,C], U, X)
coordonnees([L,C], Fin, Y), diff(X,Y)),
Count),
length(Count, H).