Sunday, April 15, 2007

Japanese IQ Puzzle

I found an "IQ Puzzle" at, and, being bored and a geek wrote up a solution:

Let D,F,M,P,S,T represent the Daughter, Father, Mother, Policeman, Son, and Thief (respectively). Then the initial state is:


I worked out a solution (as follows). I haven't had a chance to write up a state-space search version to see if there are any shallower solutions, but its still pretty fun. My wife and I really enjoyed this one.

(P,T) ->
(P) <-
(P,S) ->
(P,T) <-
(F,S) ->
(F) <-
(M,F) ->
(M) <-
(P,T) ->
(F) <-

No comments: