Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: AI in Perl - proof of concept

by vladb (Vicar)
on Jul 13, 2002 at 15:45 UTC ( #181490=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2019-07-20 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?