Thursday, September 24, 2009

Demo crypto.pro Lab 2


DEMO.


Welcome to SWI-Prolog (Multi-threaded, Version 5.6.24)
Copyright (c) 1990-2006 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

?- consult('crypto.pro').
% gv.pro compiled 0.00 sec, 2,544 bytes
% crypto.pro compiled 0.00 sec, 5,528 bytes

Yes
?- eCryptoP.

Yes
?- gRNumber(N).

N = 2 ;

No
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- gRProblem.

Yes
?- demo.
Crypto Problem: Numbers = { 10, 5, 0, 14, 14} Goal = 8
Crypto Problem: Numbers = { 2, 0, 11, 1, 8} Goal = 13
Crypto Problem: Numbers = { 6, 0, 5, 1, 7} Goal = 0
Crypto Problem: Numbers = { 8, 8, 6, 4, 14} Goal = 3
Crypto Problem: Numbers = { 12, 2, 8, 10, 6} Goal = 4
Crypto Problem: Numbers = { 13, 11, 13, 11, 10} Goal = 12
Crypto Problem: Numbers = { 4, 9, 5, 11, 1} Goal = 7
Crypto Problem: Numbers = { 13, 8, 12, 15, 3} Goal = 13
Crypto Problem: Numbers = { 6, 5, 12, 0, 2} Goal = 3
Crypto Problem: Numbers = { 6, 9, 13, 0, 2} Goal = 14

No
?- halt.