The knowledge base called countries.pl
contains a number of facts about
European countries, capitals, rivers and seas. You can view it
by doing showlib countries.pl
from Prolog.
I hope the meaning is clear. In the facts for
has_capital
, the first name is always that of a country, the second of
a town (or city). In those for is_on
, the first name is a town, and
the second is either a river or a sea.
linked_to
is about rivers and seas: there is one fact for each
river that flows into another river or a sea. next_to
tells you which
seas (not rivers) are next to one another.
borders
is like next_to
, but is about countries, not seas. It
tells you which countries share a common border.
Finally, on_sea
tells you which countries adjoin a given sea.