i need to convert this AT algorithms to program in prolog language.
The alogrithms is:
1-g(Root)=0;
open={Root};
closed={};
2- select an n ª open:g
=min{g
/n ª open} call it N
if N=Gool then path(Root,N) is minimum Exit
If no open nodes exit, then stop with failure
Insert N into closed
Generate all succerssor S of N
Insert them into open
Calculate g(S)=g(N)+ cost(N,S)
Go back to stop 2
Please help me.
The alogrithms is:
1-g(Root)=0;
open={Root};
closed={};
2- select an n ª open:g
if N=Gool then path(Root,N) is minimum Exit
If no open nodes exit, then stop with failure
Insert N into closed
Generate all succerssor S of N
Insert them into open
Calculate g(S)=g(N)+ cost(N,S)
Go back to stop 2
Please help me.