% % paths.pl % % Name: % % % Comments: % % % some "nice" prolog settings... see assignment 8's % description for the details on what these do % -- but it's not crucial to know the details of these Prolog internals :- set_prolog_flag( prompt_alternatives_on, groundness ). :- set_prolog_flag(toplevel_print_options, [quoted(true), portray(true), attributes(portray), max_depth(999), priority(699)]). % Here you'll want to define % genminpath( A, B, Graph, Path ) % for general graphs % Here is a graph with cycles graph1( [ [a,b], [b,c], [c,a], [c,d], [c,z], [z,a], [z,d] ] ) % You might check that the shortest path from a to d is % [ a, b, c, d ] % even though there is another (non-minimal) path, [a, b, c, z, d]