in reply to Solving riddles with Perl
I don't know much about this sort of thing, but I do know there have been related discussions in the past, often involving AI::Perlog by Ovid or things otherwise related to Prolog. A search or Super Search may prove to be insightful.
In Section
Meditations