home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 2
/
AUCD2.iso
/
program
/
huprolog.arc
/
a
next >
Wrap
Text File
|
1995-02-08
|
3KB
|
103 lines
% THE UNDEVELOPED DATA IS IN "Tales".
episode :-
tab(15),
write('" ALL AT SEA. "'),nl,
tab(15),
write('-------------------------.'),nl,nl.
/*
In 1719, the year that "Robinson Crusoe" was first published, five
real-life shipwrecked mariners who had been marooned on distant islands
were rescued and brought back to Britain. From the clues below, can you
work out each man's name, his rank and ship, which sea it was lost in,
and in which year he was marooned ?.
1. Hugh Flint had served on a ship with a two-letter name.
2. Ironically, it was because he stayed with his ship that captain John
Moody wasn't drowned with his crew.
3. The ship whose first mate was marooned for three years wasn't the
Bristol Lass.
4. The Gryphon went down in a Caribbean hurricane.
5. Will Tweed of the Dog Star was shipwrecked before the able seaman but
after the man who survived the loss of his ship in the Timor Sea, who
wasn't Hugh Flint.
6. It was in 1713 that one man was shipwrecked in the Indian Ocean.
7. Both Ben Duncan, who was marooned on an island in the South Pacific,
and the man shipwrecked in 1704 were ship's officers, unlike the man
who survived the loss of the Alexander.
*/
group([ad1716,ad1713,ad1710,ad1707,ad1704]).
group([ben,hugh,john,tom,will]).
group([ab,captain,cook,mate1,mate2]).
group([alexander,bristollass,dogstar,gryphon,stsimeon]).
group([caribbean,indianocean,seaofjapan,southpacific,timorsea]).
c(captain,john).
c(ad1716,mate1).
c(gryphon,caribbean).
c(will,dogstar).
c(ad1713,indianocean).
c(ben,southpacific).
i(hugh,alexander).
i(hugh,gryphon).
i(ad1716,bristollass).
i(will,ab).
i(will,timorsea).
i(will,ad1716).
i(will,ad1713).
i(will,indianocean).
i(will,ad1704).
i(ab,ad1704).
i(ab,ad1707).
i(timorsea,ad1716).
i(ab,timorsea).
i(timorsea,hugh).
i(ben,ad1704).
i(ben,ab).
i(ben,alexander).
i(ben,cook).
i(ad1704,ab).
i(ad1704,cook).
i(ad1704,alexander).
i(alexander,captain).
i(alexander,mate1).
i(alexander,mate2).
% The following data has to be reconsidered due to an
% "Insufficient data." signal which will be evident where only
% the simple facts above are offered.
% Will Tweed was shipwrecked before the ab.
% The ab was NOT shipwrecked in 1716.
% Will Tweed was shipwrecked before the ab.
% Will Tweed was shipwrecked after the Timor Sea man.
% Hence Will was not shipwrecked in 1704, 1713 or 1716.
% Hence Will was shipwrecked in 1707 or 1710.
% The ab was shipwrecked in either 1707 or 1710, or 1713.
% The Timor Sea man was shipwrecked in 1704 or 1707.
% Constructions to deal with the newly developed data could take
% the form:
do :-
i(timorsea,ad1704), % Then c(timorsea,ad1707) obtains.
bar(c(will,ad1710)),
assert(c(will,ad1710)),
fail.
do :-
i(timorsea,ad1707), % Then c(timorsea,ad1704) obtains.
bar(c(will,ad1707)),
assert(c(will,ad1707)),
fail.