Nell/Prolog: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
* [http://sourceforge.net/projects/yieldprolog/ Yield Prolog]: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is [http://yieldprolog.svn.sourceforge.net/viewvc/yieldprolog/YieldProlog/source/prolog/compiler.P?annotate=918 some sort of module system] implemented.
* [http://sourceforge.net/projects/yieldprolog/ Yield Prolog]: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is [http://yieldprolog.svn.sourceforge.net/viewvc/yieldprolog/YieldProlog/source/prolog/compiler.P?annotate=918 some sort of module system] implemented.
** Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with.
** Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with.
** The DCG operator '-->' appears to be unimplemented.
* [http://wambook.sourceforge.net/ Warren's Abstract Machine] ([http://en.wikipedia.org/wiki/Warren_abstract_machine wiki]) -- underlying virtual machine for many early Prologs. Worth digging through to get an idea of how Prolog is implemented.
* [http://wambook.sourceforge.net/ Warren's Abstract Machine] ([http://en.wikipedia.org/wiki/Warren_abstract_machine wiki]) -- underlying virtual machine for many early Prologs. Worth digging through to get an idea of how Prolog is implemented.
* [http://pyke.sourceforge.net/ Pyke] is an implementation of Prolog ideas for Python. I'm not thrilled with this; the embedding doesn't seem very elegant. Here's a brute-force (ie, "the wrong way to do it") solution to the Towers of Hanoi puzzle in Pyke: http://pyke.hg.sourceforge.net/hgweb/pyke/pyke/file/cc6970acfcf1/examples/towers_of_hanoi/towers2.krb
* [http://pyke.sourceforge.net/ Pyke] is an implementation of Prolog ideas for Python. I'm not thrilled with this; the embedding doesn't seem very elegant. Here's a brute-force (ie, "the wrong way to do it") solution to the Towers of Hanoi puzzle in Pyke: http://pyke.hg.sourceforge.net/hgweb/pyke/pyke/file/cc6970acfcf1/examples/towers_of_hanoi/towers2.krb


== Truth Maintenance / Planners ==
== Truth Maintenance / Planners ==
[http://www.cis.temple.edu/~giorgio/cis587/readings/tms.html Problem Solving and Truth Maintenance Systems]: a reasonable overview.
* STRIPS
* STRIPS
* [http://www.csee.umbc.edu/~finin//pfc/ Pfc], "a package for forward chaining in Prolog". This supports truth maintenance as a nicely-integrated prolog library.
* A discussion of how [http://news.ycombinator.com/item?id=2877621 forward-chaining, backward-chaining, and live queries have been implemented in the Drools system] for Java.


== Storytelling ==
== Storytelling ==
* UNIVERSE
* UNIVERSE
** Lebowitz, Michael. “Creating Characters in a Story-Telling Universe.” Poetics 13: (1984) 171–194.
** Lebowitz, Michael. “Creating Characters in a Story-Telling Universe.” Poetics 13: (1984) 171–194.
*** [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.81.4794 Citeseerx] seems to have a [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.81.4794&rep=rep1&type=pdf scanned copy of this paper], although the title is slightly different and the scanning has introduced some typos.
** Lebowitz, Michael. “[http://classes.soe.ucsc.edu/cmps148/Winter10/readings/LebowitzUniversePoetics14.pdf Story-telling as planning and learning.]” Poetics 14: (1985) 483–502.
** Lebowitz, Michael. “[http://classes.soe.ucsc.edu/cmps148/Winter10/readings/LebowitzUniversePoetics14.pdf Story-telling as planning and learning.]” Poetics 14: (1985) 483–502.
** Lebowitz, Michael. “Planning Stories.” In Proceedings of the Ninth Annual Conference of the Cognitive Science Society, Seattle WA. 1987, 234–242.
** Lebowitz, Michael. “Planning Stories.” In Proceedings of the Ninth Annual Conference of the Cognitive Science Society, Seattle WA. 1987, 234–242.

Latest revision as of 23:45, 21 February 2012

CSA: I did a lot of research on Prolog and Prolog-related topics. The bottom line is that it's probably not directly relevant for our project: what we really need is an incremental planner or a truth maintenance system, not a backtracking solver. Prolog doesn't come with any magic bullets to answer the "now what goals have their preconditions satisfied" question, which is at the core of a UNIVERSE-style storytelling system.

Datalog might still be interesting as a data model for "avatar services".

Interesting Prologs

  • Prolog Syntax and Semantics from wikipedia.
  • Datalog
  • Logtalk (wiki) -- the object oriented features provide a good encapsulation mechanism for a prolog-style language. It also supports "event-driven programming"; I can't tell if that would help one construct a truth maintenance system (ie, track dependencies) or not.
  • JScriptLog: implementation of ISO-Standard PROLOG in JavaScript. Seems pretty capable, but the code is not the cleanest -- no attempt at using prototypes or object-orientation. Parser is apparently weak.
  • Yield Prolog: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is some sort of module system implemented.
    • Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with.
    • The DCG operator '-->' appears to be unimplemented.
  • Warren's Abstract Machine (wiki) -- underlying virtual machine for many early Prologs. Worth digging through to get an idea of how Prolog is implemented.
  • Pyke is an implementation of Prolog ideas for Python. I'm not thrilled with this; the embedding doesn't seem very elegant. Here's a brute-force (ie, "the wrong way to do it") solution to the Towers of Hanoi puzzle in Pyke: http://pyke.hg.sourceforge.net/hgweb/pyke/pyke/file/cc6970acfcf1/examples/towers_of_hanoi/towers2.krb

Truth Maintenance / Planners

Problem Solving and Truth Maintenance Systems: a reasonable overview.

Storytelling

  • UNIVERSE
    • Lebowitz, Michael. “Creating Characters in a Story-Telling Universe.” Poetics 13: (1984) 171–194.
    • Lebowitz, Michael. “Story-telling as planning and learning.” Poetics 14: (1985) 483–502.
    • Lebowitz, Michael. “Planning Stories.” In Proceedings of the Ninth Annual Conference of the Cognitive Science Society, Seattle WA. 1987, 234–242.
    • GrandTextAuto had a series of blog posts on UNIVERSE, comparing it to MINSTREL and getting some information directly from the author. (Be sure to click through to the five earlier linked posts on UNIVERSE.)

Natural Language Processing

Prolog and DCGs (Prolog's version of the Monad) are a pretty good way to tackle some natural language processing tasks.

Adventure