Project 2
Spring 2016
Due: W 3/23 @ 11:59 PM
10 points
For example:
?- tree(T), preorder(T, L). T = [o, [r, [e, [g], [o]], [e, [g], [t]]], [o, [n, [w], [h]], [a, [y], [...]]]], L = [o, r, e, g, o, e, g, t, o|...].
For example:
?- dfs(a, g, Path). Path = [a, b, c, d, e, g] ; Path = [a, b, c, f, e, g] ; Path = [a, b, d, e, g] ; Path = [a, c, d, e, g] ; Path = [a, c, f, e, g] ; false.
?- criminal(west). true. ?- criminal(X). X = west.
% % Name % E-mail Address % Platform: Windows, Linux (cs-class), etc. % Prolog Environment: SWI-Prolog % % In accordance with the class policies and Georgetown's Honor Code, % I certify that, with the exceptions of the course materials and those % items noted below, I have neither given nor received any assistance % on this project. %
For all of the predicates, demonstrate their use in a transcript. Put everything in a zip file and upload it to Blackboard.
Copyright © 2019 Mark Maloof. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.