Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I recently used a pile of logic programming in a game design AI research project (<a href="http://www.youtube.com/watch?v=0BcF1d8I1CE" rel="nofollow noreferrer">teaser video</a>!), but at least half of my logic-heavy project was functional or imperative Scala code implementing a basic game engine. <strong>The point of programming</strong>, if I may claim such a thing, <strong>is to bring the machine's understanding of what you want into sync with your own</strong> -- and most of syncing is <em>requires</em> giving the <em>imperative</em> details, at some level, of how you want something done. Those silly machine are always so literal...</p> <p>Logic programming, whether it be the traditional, deductive, prolog-style stuff, or the more exotic inductive logic programming or answer set programming flavors, gives massive leverage for some flavors of problems at the cost of being able to easily communicate imperative knowledge (which is always needed <em>somewhere</em> in real-world apps). Sometimes the concerns of an interactive application make even the slightest hits to your productivity in expressing imperative knowledge unacceptable. Writing an entire game engine in a logic programming style will always be a bad idea (likewise for trying it using perl-compatible regular expressions which have the same computational power). In a hybrid language (or in one that lets you embed a logic interpreter easily) you can have the best of both worlds (I used <a href="https://java.net/projects/jtrolog" rel="nofollow noreferrer">jTrolog</a> to embed Prolog in my Scala engine, forming a multi-paradigm voltron of sorts).</p> <p>I think logic programming could certainly stand to be more popular and well understood, but, in some sense, pure-logic programming can't do much better than SQL or regexes in terms of "catching on" because its magic comes from taking away your imperative expressiveness (keeping you from getting lost in unimportant details, ideally). This explanation applies almost equally to functional programming. I love logic programming, but only because I have a choice about when to use it. The best way forward seems to be hybrid languages that present that choice in a consistent, well-designed manner.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload