in reply to Re: AI in Perl - proof of concept
in thread AI in Perl - proof of concept

Answering to your question #2, I think it shouldn't be a challenge for Perl. I've looked at the Prolog Tutorial and the syntax doesn't appear to be overly complex. I guess, prolog could be translated in comparable Perl code and then executed? Say, just like what Ovid did with his AI example, it should be possible to write a Prolog to Perl translator at the least.

In fact, there have already been some steps undertaken in this direction. Take a look at the Language::Prolog::Interpreter module. It's A simple interpreter which doesn't allow infix operators (except for C<:-> and C<,>, both of which are built in).

There's also these Language::Prolog::* modules. They do appear to be the first courageous step towards accomplishing what you are asking for?

Update:

Ahh, taking Ovid's lead, let me fix another grammatical error in your post:

1. In your Prolog code, why you did not wrote a question clause ?

Should be...

1. In your Prolog code, why did you not write a question clause ?

Err.. don't take me wrong, I'm not an English grammar wiz as well :). I simply write the way it sounds right ;-).

_____________________
# Under Construction