Starting from:

$30

MajorPP #3- first-order logic

This is a MinorPP whose purpose is just to get you started with Prolog.

After you watch the video tutorial on Prolog, then write a Prolog program that contains facts based on the first-order logic intended interpretation from the text for John and Richard.  (see Ch08, slide 28 or pp 292 in the text).

That is:

·         Richard is the King

·         Richard and John are brothers.

·         The Crown is on Richard's head.

·         Richard is a person.

·         John is a person.

·         If you are a King, then you are a person.

In comments at the top of your Prolog code, include two sample queries of your choice.  Describe what you are querying and the sample code I would type into the interpreter to run the query.



That's all.  If you understand the logic and the basics laid out in the tutorial video, don't be surprised if this is really easy.  I'm hoping it is.

Submission Instructions:

·         Submit your program in a single plain-text source file.

·         Do not submit screenshots.

·         Do not zip, tar, or otherwise archive the submission.

 

More products