Introduction to Prolog
- Due:
- 5:00am, Wednesday October 23, 2024
Description
Write a Prolog file named p1.pl
specifying the following
facts and rules:
- Dio is a vampire.
- Jonathan plays rugby.
- All vampires are nocturnal.
- Tarkus likes anyone who is nocturnal.
- George likes anyone who is nocturnal or plays rugby.
Then, ask the following queries:
- Does George like Dio?
- Who does Tarkus like?
- Who does George like?
For the second part, copy and paste the interaction with
the Prolog interpreter to a file named answers.txt
.
Turning in the Assignment
To submit your assignment, create a zip file named p1.zip
of a
DIRECTORY named p1
containing the following files:
p1.pl
answers.txt
Then submit that file to the appropriate folder on D2L.