Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i need to convert this AT algorithm

Status
Not open for further replies.

Manasir

Technical User
Oct 10, 2002
9
0
0
AU
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(n)=min{g(n)/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.


 
i need to convert this Tree algorithms AT to program in prolog language.
The alogrithms is:

1-g(Root)=0;
open={Root};
closed={};

2- select an n belong to open:g(n)=min{g(n)/n belong to 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.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top