22.23 The murderer: Question
Exercise: The murderer
At the beginning, we saw that the murderer was someone who:
We have codified all of this information, except for one last detail: That of saying that the murderer X is a person who had a motive and access to perpetrating the crime.
Write a Prolog rule which says this. Then use the rule to find out who the murderer is.
You will have to compile the program before asking the question that tells us who the murderer is. It may be that the Prolog system complains that there is a "syntax error". If so, go through the program and try to find out what was wrong. Then try to compile again.
Click to see an answer.
Up: 22 A Murder Mystery
Next: 23 Blocksworld