[Prolog] What is it?
Well, i know i'm going to be learning Prolog sometime next year and i know its some kind of logic programming. I wanted to get a head start so i've downloaded SWI-Prolog but now i just need to know a few things:
- What is prolog used for? - Is it a script type of language or can you make executable files with it? - Any code/implementation examples would be great. I can't seem to find any "Prolog for dummies" kind of web pages around and i really just need a push to get me started past the newbie basics. Cheers :) |
I too have just started learning prolog.
It is...um....different. :) You don't type a sequence of instructions telling the program what to do, instead you give it a list of facts and rules. Prolog is apparently very useful for natural language processing, it has built in features to implement grammars for formal languages. I have been recommended this page, I haven't really gone through it yet, but it looks pretty helpful. Learn Prolog Now. |
Thanks CSflim thats awesome :)
My god, there's a lot to learn here *deep breath* lets go! |
Ditto what CSFilm said. Prolog basically queries databases and attempts to match rules (known as predicates). One powerful aspect of it is that it backtracks if there are multiple matches to rules; this makes it possible to implement things concisely, albeit ineffeciently. For example, one could have a sort predicate that just generates a permutation of the list to be sorted, checks if it's sorted, and repeats the process until it is, due to backtracking.
A good example of Prolog's functionality can be illustrated in an append predicate. If we have the code Quote:
Quote:
Quote:
Here is one tutorial that looks helpful. |
Thanks to you too Anomaly_ for the examples and opinions :) I think you're right about the non-intuitive thing. I've been working through the tutorial that CSflim linked to and its a pretty good one. I'll read a bit of the one you linked to too and go with the best one. Cheers :)
|
At my University people doing AI have to program in Prolog.
|
All times are GMT -8. The time now is 01:02 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project