Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let string_Of_Opp l=
- String.concat ";" ( List.map (Format.sprintf "%c") l)
- let print_Tuple (e,g,h,l) =
- Printf.printf("( %s %d %d [%s] )") e g h (string_Of_Opp l)
- let rec aStar attente estBut opPoss hEtat n=
- List.map print_Tuple attente;
- print_newline ();
- match attente with
- |[]-> failwith "pas de but trouve"
- |(e,g,h,l)::reste -> if estBut e then
- (e,g,l,n+1,n+1+List.length reste)
- else
- begin
- let fils =creerFils e g opPoss hEtat l in
- let newWaitList=
- insererLesFils fils reste in
- aStar newWaitList estBut opPoss hEtat (n+1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement