Knights, Knaves, and Monks - Puzzle Solver
You are on the Island of Knights, Knaves, and Monks. Knights always tell the truth, knaves always lie, and monks may say anything at all. You encounter between 3 and 7 islanders, and fewer than half of them are Monks. The islanders make some statements about each other. Can you deduce what identity combinations are possible for this group?
Below is a puzzle solver. Enter a logical paraphrase of the islanders's statements and it will output the set of possible islander roles. Here is how you input a puzzle:
On line 1, the number of islanders. On each subsequent line, a claim of the form I: S signifying that islander I made statement S.
An islander I is one of A, B, C, D, E, F, G. A role R is one of K, M, V (i.e. Knight, Monk, knaVe). A number N is an integer between 0 and the number of islanders. Create statements S from islanders, roles, and other statements using the following syntax:
Find the code at https://github.com/tenedor/kmv-solver.