Is there a prolog clpb coding which can solve this puzzle involving knights, knave, and spies?

260 views Asked by At

There are three people (Alex, Brook and Cody), one of whom is a knight, one a knave, and one a spy.The knight always tells the truth, the knave always lies, and the spy can either lie or tell the truth. Alex says: "Cody is a knave." Brook says: "Alex is a knight." Cody says: "I am the spy." Who is the knight, who the knave, and who the spy? Solve this puzzle by prolog clpb

0

There are 0 answers