Compare commits
No commits in common. "6d8273617cbea2ba9e16e9b7dfc450f23b239395" and "025860fc8fed2dcbe2648017cfac2a4a59ca3c8f" have entirely different histories.
6d8273617c
...
025860fc8f
1 changed files with 4 additions and 3 deletions
|
@ -57,6 +57,7 @@ initial_state([ [f, g, a],
|
||||||
initial_state([ [e, f, g],
|
initial_state([ [e, f, g],
|
||||||
[d,vide,h],
|
[d,vide,h],
|
||||||
[c, b, a] ]). % h2=24, f*=30
|
[c, b, a] ]). % h2=24, f*=30
|
||||||
|
|
||||||
initial_state([ [a, b, c],
|
initial_state([ [a, b, c],
|
||||||
[g,vide,d],
|
[g,vide,d],
|
||||||
[h, f, e]]). % etat non connexe avec l'etat final (PAS DE SOLUTION)
|
[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) :-
|
heuristique(U,H) :-
|
||||||
% heuristique1(U, H). % au debut on utilise l'heuristique 1
|
heuristique1(U, H). % au debut on utilise l'heuristique 1
|
||||||
heuristique2(U, H). % ensuite utilisez plutot l'heuristique 2
|
% heuristique2(U, H). % ensuite utilisez plutot l'heuristique 2
|
||||||
|
|
||||||
|
|
||||||
%****************
|
%****************
|
||||||
|
@ -206,7 +207,7 @@ diff(_,_) :- true.
|
||||||
|
|
||||||
heuristique1(U,H) :-
|
heuristique1(U,H) :-
|
||||||
findall(X,
|
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)),
|
coordonnees([L,C], Fin, Y), diff(X,Y)),
|
||||||
Count),
|
Count),
|
||||||
length(Count, H).
|
length(Count, H).
|
||||||
|
|
Loading…
Reference in a new issue