6 ms·
A quick read of the comments here gives me the impression a lot of people are unfamiliar with what logic programming is, how it works, and what it might be used
by whiddershins 10y ago
A quick read of the comments here gives me the impression a lot of people are unfamiliar with what logic programming is, how it works, and what it might be used for.
I am among them. Really appreciate the post just for inspiring me to learn more about it. Anyone have a favorite go to resource?
- ced 10y agoRussell and Norvig's AI textbook has a good introduction, although maybe it'll go into more detail than you would like. Stanford has some classes on coursera, too.
- HillRat 10y agoYou may wish to check out the (free) books Logic, Programming and Prolog (http://www.ida.liu.se/~ulfni53/lpp/ http://www.ida.liu.se/~ulfni53/lpp/) or Learn Prolog Now! (http://learnprolognow.org http://learnprolognow.org). Personally, I find declarative logic programming to be a great tool in domain analysis -- it's a powerful technique to document and prototype domain rules. I've never used it as an actual business rules engine, but I always feel like I should explore Prolog/Datalog or answer-set programming as a possible solution.
- tobik 10y agoThe Reasoned Schemer by Daniel P. Friedman, William E. Byrd and Oleg Kiselyov https://mitpress.mit.edu/books/reasoned-schemer https://mitpress.mit.edu/books/reasoned-schemer It's from the author of miniKanren on which LogicJS is based. There are implementations for a lot of other languages (other JS implementation too) on http://minikanren.org/ http://minikanren.org/
- romaniv 10y agoWell, the classic logic programming language is Prolog, so learning it would be a good start. Here is something fairly lightweight on the subject: http://www.amzi.com/AdventureInProlog/advtop.php http://www.amzi.com/AdventureInProlog/advtop.php There was a great PDF that explained how unification and substitution of symbols worked in a concise and readable fashion, but I can't find it right now. Hm, maybe this one: http://www.cs.ubbcluj.ro/~gabis/plf/Doc/SWI-Prolog/AnIntroductionToProlog.pdf http://www.cs.ubbcluj.ro/~gabis/plf/Doc/SWI-Prolog/AnIntrodu...
- the_watcher 10y agoCould you describe a classic use case? I'm also interested in learning some logic programming, but it's hard for me to conceptualize a use case that isn't already covered by the languages I regularly use.
- romaniv 10y agoBack in the day the two common use cases were expert systems and natural language processing (which are somewhat related). In this day and age I would most likely use Prolog for rule-based simulations or high-level game AI.