These kinds of problems could be easily formulated using firstorder
predicate logic, which is originally an area of mathematical logic
but
heavily used in artificial intelligence. The problem solution usually
involves writing what is called "wellformed formulas" (wff's)
that
represent the facts in the puzzle. These wff's are then put in
a normalized
form where we can use them for a procedure known as "resolution" and
"substitution."
You start with the goal (in this case the goal is the predicate: "X" ate
the
apple) and then try to do the resolution by eliminating and merging
wff's
together in a chain manner, until you reach a contradiction, then
you
backtrack and try another path, until you finally eliminate all
wff's.
Along the way you do substitution of variables (including the variable "X"
above). If we reach the end point of the resolution, then we take
the
substituted value of X to be the solution (in this case the value
would be
"ADAM").
Of course doing resolution by hand is good for problems with a
few number of
wff's. For the Eden puzzle it's not practical to do it by hand.
A very small
program written in Prolog will solve it right away, no sweat, you
just need
to know a bit of Prolog to write it. For the solution I sent you
earlier, I
just used an adhoc technique, nothing formal there :)
Thanks again for the puzzles, I really enjoyed solving them :)
Regards,
Khaled
