Hi There!

I'm Dan Schlegel, an Associate Professor in the Computer Science Department at SUNY Oswego

Prolog Challenge 2

In class we did an incomplete job modeling our Knights and Knaves problem. In this Prolog challenge you will finish modeling it and correct some issues we saw when we tested it. Recall that currently our output looks as follows.

Download a copy of the unfinished knights and knaves code from the Google Drive linked on Brightspace, and edit it as follows:

  1. Make the check for consistency recursive. Currently only the first item from the solutions is checked! After completing this, you should be left with two answers, that A could be either a knight or a knave.
  2. Write a ‘tell’ rule which nicely outputs the solution, as well as the consequences of the clues. These should be nice and consistent! Make it look pretty :).

Submit your completed program on Brightspace along with a short explanation of what you changed, and a comment with the correct output.