Recent from talks
Nothing was collected or created yet.
Planner (programming language)
View on WikipediaThis article includes a list of general references, but it lacks sufficient corresponding inline citations. (May 2017) |
| Planner | |
|---|---|
| Paradigm | Multi-paradigm: logic, procedural |
| Designed by | Carl Hewitt |
| First appeared | 1969 |
| Major implementations | |
| Micro-planner, Pico-Planner, Popler, PICO-PLANNER | |
| Dialects | |
| QA4, Conniver, QLISP, Ether | |
| Influenced | |
| Prolog, Smalltalk | |
Planner (often seen in publications as "PLANNER" although it is not an acronym) is a programming language designed by Carl Hewitt at MIT, and first published in 1969. First, subsets such as Micro-Planner and Pico-Planner were implemented, and then essentially the whole language was implemented as Popler by Julian Davies at the University of Edinburgh in the POP-2 programming language.[1] Derivations such as QA4, Conniver, QLISP and Ether (see scientific community metaphor) were important tools in artificial intelligence research in the 1970s, which influenced commercial developments such as Knowledge Engineering Environment (KEE) and Automated Reasoning Tool (ART).
Procedural approach versus logical approach
[edit]The two major paradigms for constructing semantic software systems were procedural and logical. The procedural paradigm was epitomized by Lisp[2] which featured recursive procedures that operated on list structures.
The logical paradigm was epitomized by uniform proof procedure resolution-based derivation (proof) finders.[3] According to the logical paradigm it was “cheating” to incorporate procedural knowledge.[4]
Procedural embedding of knowledge
[edit]Planner was invented for the purposes of the procedural embedding of knowledge[5] and was a rejection of the resolution uniform proof procedure paradigm,[6] which
- Converted everything to clausal form. Converting all information to clausal form is problematic because it hides the underlying structure of the information.
- Then used resolution to attempt to obtain a proof by contradiction by adding the clausal form of the negation of the theorem to be proved. Using only resolution as the rule of inference is problematical because it hides the underlying structure of proofs. Also, using proof by contradiction is problematical because the axiomatizations of all practical domains of knowledge are inconsistent in practice.
Planner was a kind of hybrid between the procedural and logical paradigms because it combined programmability with logical reasoning. Planner featured a procedural interpretation of logical sentences where an implication of the form (P implies Q) can be procedurally interpreted in the following ways using pattern-directed invocation:
- Forward chaining (antecedently):
- If assert P, assert Q
- If assert not Q, assert not P
- Backward chaining (consequently)
- If goal Q, goal P
- If goal not P, goal not Q
In this respect, the development of Planner was influenced by natural deductive logical systems (especially the one by Frederic Fitch [1952]).
Micro-planner implementation
[edit]A subset called Micro-Planner was implemented by Gerry Sussman, Eugene Charniak and Terry Winograd[7] and was used in Winograd's natural-language understanding program SHRDLU, Eugene Charniak's story understanding work, Thorne McCarty's work on legal reasoning, and some other projects. This generated a great deal of excitement in the field of AI. It also generated controversy because it proposed an alternative to the logic approach that had been one of the mainstay paradigms for AI.
At SRI International, Jeff Rulifson, Jan Derksen, and Richard Waldinger developed QA4 which built on the constructs in Planner and introduced a context mechanism to provide modularity for expressions in the database. Earl Sacerdoti and Rene Reboh developed QLISP, an extension of QA4 embedded in INTERLISP, providing Planner-like reasoning embedded in a procedural language and developed in its rich programming environment. QLISP was used by Richard Waldinger and Karl Levitt for program verification, by Earl Sacerdoti for planning and execution monitoring, by Jean-Claude Latombe for computer-aided design, by Nachum Dershowitz for program synthesis, by Richard Fikes for deductive retrieval, and by Steven Coles for an early expert system that guided use of an econometric model.
Computers were expensive. They had only a single slow processor and their memories were very small by comparison with today. So Planner adopted some efficiency expedients including the following:
- Backtracking[8] was adopted to economize on the use of time and storage by working on and storing only one possibility at a time in exploring alternatives.
- A unique name assumption was adopted to save space and time by assuming that different names referred to different objects. For example, names like Peking (previous PRC capital name) and Beijing (current PRC capital transliteration) were assumed to refer to different objects.
- A closed-world assumption could be implemented by conditionally testing whether an attempt to prove a goal exhaustively failed. Later this capability was given the misleading name "negation as failure" because for a goal G it was possible to say: "if attempting to achieve G exhaustively fails then assert (Not G)."
The genesis of Prolog
[edit]Gerry Sussman, Eugene Charniak, Seymour Papert and Terry Winograd visited the University of Edinburgh in 1971, spreading the news about Micro-Planner and SHRDLU and casting doubt on the resolution uniform proof procedure approach that had been the mainstay of the Edinburgh Logicists. At the University of Edinburgh, Bruce Anderson implemented a subset of Micro-Planner called PICO-PLANNER,[9] and Julian Davies (1973) implemented essentially all of Planner.
According to Donald MacKenzie, Pat Hayes recalled the impact of a visit from Papert to Edinburgh, which had become the "heart of artificial intelligence's Logicland," according to Papert's MIT colleague, Carl Hewitt. Papert eloquently voiced his critique of the resolution approach dominant at Edinburgh "…and at least one person upped sticks and left because of Papert."[10]
The above developments generated tension among the Logicists at Edinburgh. These tensions were exacerbated when the UK Science Research Council commissioned Sir James Lighthill to write a report on the AI research situation in the UK. The resulting report [Lighthill 1973; McCarthy 1973] was highly critical although SHRDLU was favorably mentioned.
Pat Hayes visited Stanford where he learned about Planner. When he returned to Edinburgh, he tried to influence his friend Bob Kowalski to take Planner into account in their joint work on automated theorem proving. "Resolution theorem-proving was demoted from a hot topic to a relic of the misguided past. Bob Kowalski doggedly stuck to his faith in the potential of resolution theorem proving. He carefully studied Planner.”.[11] Kowalski [1988] states "I can recall trying to convince Hewitt that Planner was similar to SL-resolution." But Planner was invented for the purposes of the procedural embedding of knowledge and was a rejection of the resolution uniform proof procedure paradigm. Colmerauer and Roussel recalled their reaction to learning about Planner in the following way:
"While attending an IJCAI convention in September ‘71 with Jean Trudel, we met Robert Kowalski again and heard a lecture by Terry Winograd on natural language processing. The fact that he did not use a unified formalism left us puzzled. It was at this time that we learned of the existence of Carl Hewitt’s programming language, Planner. The lack of formalization of this language, our ignorance of Lisp and, above all, the fact that we were absolutely devoted to logic meant that this work had little influence on our later research."[12]
In the fall of 1972, Philippe Roussel implemented a language called Prolog (an abbreviation for PROgrammation en LOGique – French for "programming in logic"). Prolog programs are generically of the following form (which is a special case of the backward-chaining in Planner):
- When goal Q, goal P1 and ... and goal Pn
Prolog duplicated the following aspects of Micro-Planner:
- Pattern directed invocation of procedures from goals (i.e. backward chaining)
- An indexed data base of pattern-directed procedures and ground sentences.
- Giving up on the completeness paradigm that had characterized previous work on theorem proving and replacing it with the programming language procedural embedding of knowledge paradigm.
Prolog also duplicated the following capabilities of Micro-Planner which were pragmatically useful for the computers of the era because they saved space and time:
- Backtracking control structure
- Unique Name Assumption by which different names are assumed to refer to distinct entities, e.g., Peking and Beijing are assumed to be different.
- Reification of Failure. The way that Planner established that something was provable was to successfully attempt it as a goal and the way that it establish that something was unprovable was to attempt it as a goal and explicitly fail. Of course the other possibility is that the attempt to prove the goal runs forever and never returns any value. Planner also had a (not expression) construct which succeeded if expression failed, which gave rise to the “Negation as Failure” terminology in Planner.
Use of the Unique Name Assumption and Negation as Failure became more questionable when attention turned to Open Systems.[13]
The following capabilities of Micro-Planner were omitted from Prolog:
- Pattern-directed invocation of procedural plans from assertions (i.e., forward chaining)
- Logical negation, e.g., (not (human Socrates)).
Prolog did not include negation in part because it raises implementation issues. Consider for example if negation were included in the following Prolog program:
- not Q.
- Q :- P.
The above program would be unable to prove not P even though it follows by the rules of mathematical logic. This is an illustration of the fact that Prolog (like Planner) is intended to be a programming language and so does not (by itself) prove many of the logical consequences that follow from a declarative reading of its programs.
The work on Prolog was valuable in that it was much simpler than Planner. However, as the need arose for greater expressive power in the language, Prolog began to include many of the capabilities of Planner that were left out of the original version of Prolog.
References
[edit]- ^ Carl Hewitt Middle History of Logic Programming: Resolution, Planner, Prolog and the Japanese Fifth Generation Project ArXiv 2009. arXiv:0904.3036
- ^ McCarthy et al. 1962
- ^ Robinson 1965
- ^ Green 1969
- ^ Hewitt 1971
- ^ Robinson 1965
- ^ Sussman, Charniak, and Winograd 1971
- ^ Golomb and Baumert 1965
- ^ Anderson 1972
- ^ MacKenzie 2001 p 82.
- ^ Bruynooghe, Pereira, Siekmann, and van Emden [2004]
- ^ Colmerauer and Roussel 1996
- ^ Hewitt and de Jong 1983, Hewitt 1985, Hewitt and Inman 1991
Bibliography
[edit]- Bruce Anderson. Documentation for LIB PICO-PLANNER School of Artificial Intelligence, Edinburgh University. 1972
- Bruce Baumgart. Micro-Planner Alternate Reference Manual Stanford AI Lab Operating Note No. 67, April 1972.
- Coles, Steven (1975), "The Application of Artificial Intelligence to Heuristic Modeling", 2nd US-Japan Computer Conference.
- Fikes, Richard (1975), Deductive Retrieval Mechanisms for State Description Models, IJCAI.
- Fitch, Frederic (1952), Symbolic Logic: an Introduction, New York: Ronald Press.
- Green, Cordell (1969), "Application of Theorem Proving to Problem Solving", IJCAI.
- Hewitt, Carl (1969). "PLANNER: A Language for Proving Theorems in Robots". IJCAI. CiteSeerX 10.1.1.80.756.
- Hewitt, Carl (1971), "Procedural Embedding of Knowledge In Planner", IJCAI.
- Carl Hewitt. "The Challenge of Open Systems" Byte Magazine. April 1985
- Carl Hewitt and Jeff Inman. "DAI Betwixt and Between: From ‘Intelligent Agents’ to Open Systems Science" IEEE Transactions on Systems, Man, and Cybernetics. Nov/Dec 1991.
- Carl Hewitt and Gul Agha. "Guarded Horn clause languages: are they deductive and Logical?" International Conference on Fifth Generation Computer Systems, Ohmsha 1988. Tokyo. Also in Artificial Intelligence at MIT, Vol. 2. MIT Press 1991.
- Hewitt, Carl (March 2006), The repeated demise of logic programming and why it will be reincarnated – What Went Wrong and Why: Lessons from AI Research and Applications (PDF), Technical Report, AAAI Press, archived from the original (PDF) on 2017-12-10.
- William Kornfeld and Carl Hewitt. The Scientific Community Metaphor MIT AI Memo 641. January 1981.
- Bill Kornfeld and Carl Hewitt. "The Scientific Community Metaphor" IEEE Transactions on Systems, Man, and Cybernetics. January 1981.
- Bill Kornfeld. "The Use of Parallelism to Implement a Heuristic Search" IJCAI 1981.
- Bill Kornfeld. "Parallelism in Problem Solving" MIT EECS Doctoral Dissertation. August 1981.
- Bill Kornfeld. "Combinatorially Implosive Algorithms" CACM. 1982
- Robert Kowalski. "The Limitations of Logic" Proceedings of the 1986 ACM fourteenth annual conference on Computer science.
- Robert Kowalski. "The Early Years of Logic Programming" CACM January 1988.
- Latombe, Jean-Claude (1976), "Artificial Intelligence in Computer-Aided Design", CAD Systems, North-Holland.
- McCarthy, John; Abrahams, Paul; Edwards, Daniel; Hart, Timothy; Levin, Michael (1962), Lisp 1.5 Programmer's Manual, MIT Computation Center and Research Laboratory of Electronics.
- Robinson, John Alan (1965), "A Machine-Oriented Logic Based on the Resolution Principle", Communications of the ACM, 12: 23–41, doi:10.1145/321250.321253.
- Gerry Sussman and Terry Winograd. Micro-planner Reference Manual AI Memo No, 203, MIT Project MAC, July 1970.
- Terry Winograd. Procedures as a Representation for Data in a Computer Program for Understanding Natural Language MIT AI TR-235. January 1971.
- Gerry Sussman, Terry Winograd and Eugene Charniak. Micro-Planner Reference Manual (Update) AI Memo 203A, MIT AI Lab, December 1971.
- Carl Hewitt. Description and Theoretical Analysis (Using Schemata) of Planner, A Language for Proving Theorems and Manipulating Models in a Robot AI Memo No. 251, MIT Project MAC, April 1972.
- Eugene Charniak. Toward a Model of Children's Story Comprehension MIT AI TR-266. December 1972.
- Julian Davies. Popler 1.6 Reference Manual University of Edinburgh, TPU Report No. 1, May 1973.
- Jeff Rulifson, Jan Derksen, and Richard Waldinger. "QA4, A Procedural Calculus for Intuitive Reasoning" SRI AI Center Technical Note 73, November 1973.
- Scott Fahlman. "A Planning System for Robot Construction Tasks" MIT AI TR-283. June 1973
- James Lighthill. "Artificial Intelligence: A General Survey Artificial Intelligence: a paper symposium." UK Science Research Council. 1973.
- John McCarthy. "Review of ‘Artificial Intelligence: A General Survey Artificial Intelligence: a paper symposium." UK Science Research Council. 1973.
- Robert Kowalski "Predicate Logic as Programming Language" Memo 70, Department of Artificial Intelligence, Edinburgh University. 1973
- Pat Hayes. Computation and Deduction Mathematical Foundations of Computer Science: Proceedings of Symposium and Summer School, Štrbské Pleso, High Tatras, Czechoslovakia, September 3–8, 1973.
- Carl Hewitt, Peter Bishop and Richard Steiger. "A Universal Modular Actor Formalism for Artificial Intelligence" IJCAI 1973.
- L. Thorne McCarty. "Reflections on TAXMAN: An Experiment on Artificial Intelligence and Legal Reasoning" Harvard Law Review. Vol. 90, No. 5, March 1977
- Drew McDermott and Gerry Sussman. The Conniver Reference Manual MIT AI Memo 259A. January 1974.
- Earl Sacerdoti, et al., "QLISP A Language for the Interactive Development of Complex Systems" AFIPS. 1976
- Sacerdoti, Earl (1977), A Structure for Plans and Behavior, Elsevier North-Holland.
- Waldinger, Richard; Levitt, Karl (1974), Reasoning About Programs Artificial Intelligence.
External links
[edit]- Alain Colmerauer's and Philippe Roussel's 1992 account of the birth of Prolog at the Wayback Machine (archived July 27, 2003)
Planner (programming language)
View on GrokipediaOverview and Design Principles
Language Overview
Planner is a procedural programming language designed for artificial intelligence applications, with a focus on theorem proving and problem-solving in robotic systems. Developed by Carl Hewitt at the MIT Artificial Intelligence Laboratory, it enables the manipulation of models and the drawing of conclusions as the state of the world changes through assertions and withdrawals of statements.[5] Key characteristics of Planner include pattern-directed invocation of procedures, which allows indirect function calls based on the form of data rather than explicit names, goal-directed execution for establishing and satisfying objectives, and support for non-deterministic computation via backtracking mechanisms. These features facilitate a hierarchical control structure that enhances deductive efficiency in complex problem-solving scenarios.[5] First described in 1967 in A.I. Memo 137 as part of Hewitt's work at MIT's Project MAC, Planner marked a paradigm shift from traditional sequential programming paradigms, such as those in pure LISP, toward reactive and knowledge-based processing that integrates procedural and deductive elements. The language's first implementations appeared around 1971 in the form of subsets like Micro-Planner, providing practical tools for AI research.[5][6] Planner's innovative approach to procedural knowledge representation influenced subsequent languages, including Prolog.[7]Core Design Goals
Planner was designed to address the limitations of traditional procedural programming languages in artificial intelligence, which often imposed rigid control flows that hindered the flexible representation and manipulation of knowledge in complex problem-solving scenarios. By integrating declarative and imperative elements, Planner aimed to enable modular knowledge structures that could be easily manipulated and extended, allowing AI systems to handle diverse tasks such as theorem proving and robotic manipulation more intuitively. This motivation stemmed from the need for a language that could support both data and control aspects in a unified framework, moving beyond the constraints of purely sequential execution. Carl Hewitt's vision for Planner emphasized decentralized control mechanisms, laying groundwork for actor-based computation where autonomous components could interact dynamically without centralized orchestration. This approach anticipated key ideas in concurrent programming by treating knowledge and processes as distributed entities capable of independent operation, influencing later developments in the actor model.[8] Developed amid the 1960s AI research boom at MIT's Project MAC, Planner sought to create systems resilient to the complexities of real-world inference. Among its core goals, Planner facilitated theorem proving through procedural attachments, where antecedents and consequents could invoke executable code tied directly to logical statements, rather than relying solely on formal logic systems. It also prioritized the easy extension of knowledge bases by allowing incremental addition of declarative facts and imperative procedures without disrupting existing structures. Furthermore, to manage uncertainty in search processes, the language incorporated backtracking as a fundamental mechanism, enabling systematic exploration of alternative paths upon failure. In contrast to earlier AI methods that separated data from procedures, Planner embedded procedural knowledge directly into data structures via pattern-directed mechanisms, fostering a more natural and intuitive paradigm for AI programming that blurred the lines between representation and computation. This design choice aimed to make knowledge bases not just passive stores but active, executable components of the system.Historical Development
Origins at MIT AI Lab
Planner was developed by Carl Hewitt in the late 1960s as a PhD project at the MIT Artificial Intelligence Laboratory, where he sought to develop a framework for automated reasoning and problem-solving in robotic systems. The initial concepts were outlined in Hewitt's AI Memo 137 from July 1967.[1] This work built upon Hewitt's doctoral research, culminating in his PhD awarded in 1971.[9] Hewitt's seminal presentation of the language at the First International Joint Conference on Artificial Intelligence (IJCAI) in 1969 marked its formal introduction to the AI community.[5] The development occurred amid the vibrant AI research environment of MIT's Project MAC in the late 1960s, a pioneering initiative launched in 1963 to advance machine-aided cognition and multi-user computing.[10] This institutional context fostered innovations like MacLISP, a dialect of Lisp tailored for AI applications and emerging around the same period, which provided the foundational implementation substrate for Planner as an embedded extension.[11] Concurrent efforts, such as Terry Winograd's early work on natural language understanding that later evolved into the SHRDLU system, contributed to the lab's emphasis on integrating procedural knowledge representation—ideas that indirectly shaped the motivational backdrop for Planner's design.[10] Hewitt led the effort as the primary architect, drawing on his background in computer science under mentors like Marvin Minsky and Seymour Papert.[9] Early collaborations involved key MIT researchers, including Terry Winograd, who co-implemented subsets of the language and tested its primitives in practical AI scenarios.[12] Initial prototypes of Planner consisted of hand-coded experiments focused on theorem proving and planning tasks, demonstrating the language's primitives for goal-directed search and pattern matching in simple robotic model manipulations around 1970.[5] These early tests highlighted the need for procedural embedding of knowledge to handle non-monotonic reasoning, inspiring further refinements in subsequent work.[5]Evolution and Key Milestones
The development of Planner began with Carl Hewitt's seminal paper introducing the language as a tool for theorem proving and model manipulation in robotic systems, published in the proceedings of the first International Joint Conference on Artificial Intelligence in 1969. This initial formulation established core primitives for goal-directed computation and pattern-directed invocation, enabling early applications in AI problem-solving at the MIT AI Lab. Subsequent refinements emerged from practical use in theorem proving and planning tasks, where users identified needs for more flexible knowledge integration to handle dynamic environments beyond basic goal satisfaction.[13] By 1971, Hewitt addressed these limitations through advancements in procedural embedding of knowledge, allowing for more sophisticated representation and manipulation of complex structures within Planner programs. This evolution incorporated feedback from AI demonstrations, such as robotic path planning and model updating, shifting the language from simple goal achievement to robust support for hierarchical control and extensible procedures in real-world simulations. The changes enhanced Planner's applicability in MIT's experimental setups, where it facilitated interactive theorem application and backtracking in robotic contexts.[13] Hewitt's 1972 technical report (AI Memo 258) provided a comprehensive description of Planner's syntax and semantics, formalizing its theoretical foundations using schemata for analysis.[14] This dissemination solidified the language's framework, promoting its adoption in MIT demos for robotic planning tasks like object manipulation and environmental modeling. However, challenges with efficiency in managing large knowledge bases prompted explorations into streamlined variants, optimizing performance for broader AI applications without altering core concepts.Fundamental Concepts
Procedural Versus Logical Approaches
In the late 1960s and early 1970s, artificial intelligence research featured prominent logical approaches to knowledge representation and problem-solving, exemplified by resolution-based theorem proving systems. These systems, such as QA4, emphasized declarative rules expressed in first-order logic, where knowledge was represented as static facts and inference rules, and solutions were derived through uniform deduction processes like resolution to achieve proofs by contradiction or model generation.[15][16] This paradigm prioritized mathematical rigor and compositionality, treating all knowledge uniformly without procedural distinctions, but it often struggled with scalability for complex, real-world problems due to exhaustive search spaces.[17] In contrast, Planner adopted a procedural approach, embedding knowledge directly into executable procedures attached to pattern-matching structures, which allowed for dynamic control flow and side effects during computation.[18] Rather than relying solely on declarative inference, Planner's design subordinated its deductive mechanisms to a hierarchical control structure, enabling procedures to manipulate models, generate subgoals, and integrate new information on the fly.[16] This procedural embedding treated intellectual structures—like descriptions or proofs—as active processes, such as recognition or deduction procedures, fostering a more imperative style suited to theorem proving in robotic contexts.[16] The procedural paradigm in Planner offered key advantages over purely logical methods, particularly in handling incomplete or fragmentary information through mechanisms like backtracking, which supported exploratory search without rigid uniformity.[16] It excelled in modeling real-world actions requiring side effects, such as database modifications during planning, and improved efficiency for lengthy computations by avoiding the "blowing up" of search spaces common in resolution systems.[18] However, drawbacks included reduced compositionality, as procedures could introduce unintended side effects, complicating verification and debugging compared to the declarative purity of logical approaches.[16] This choice reflected the broader 1970s debate in the AI community between logic-based and procedural paradigms, where Planner advocated for a hybrid embedding of knowledge to balance deductive power with practical flexibility, shifting focus from toy problems to intellectually capable systems.[19]Pattern-Directed Invocation
Pattern-directed invocation is a central mechanism in the Planner programming language, where procedures, referred to as actors, are selected and executed reactively based on pattern matching against incoming goals or assertions. In this system, actors are stored in an indexed database and associated with pattern expressions that serve as triggers; when a goal is processed, the system scans the database to find matching patterns, binds variables through a unification-like matching algorithm, and invokes the corresponding actor to generate subgoals or assertions. This approach embeds procedural knowledge directly into logical structures, allowing the control flow to emerge from data patterns rather than explicit sequencing.[20] The key components of pattern-directed invocation include pattern expressions composed of literals (specific constants) and variables (denoted by question marks or similar placeholders), which define the conditions for matching. The matching algorithm performs substitution to unify the goal's structure with the pattern, ensuring consistent bindings across variables; for instance, a pattern like(THGOAL ?P) would match any goal of the form (THGOAL <some-proposition>), binding ?P to that proposition. This unification process is analogous to that in logic programming but oriented toward procedural activation rather than purely declarative inference.[20]
A representative example of pattern-directed invocation appears in theorem proving tasks, where a goal such as (THGOAL (MORTAL SOCRATES)) triggers an actor with the pattern (THGOAL (?X MORTAL)). This actor might then invoke subgoals like (THGOAL (?X HUMAN)) and apply rules such as "all humans are mortal," propagating bindings to assert or further subgoal as needed. Such invocation enables systematic exploration of proof spaces by chaining pattern matches.[20]
The benefits of this mechanism include the modular addition of knowledge, as new actors can be defined and indexed without altering the existing control structure, facilitating incremental system extension.[20]
Goal-Directed Computation and Backtracking
In Planner, goals are formalized as expressions that the system attempts to satisfy, typically through the primitive THGOAL (or GOAL in the original formulation), which initiates a search for supporting facts or derivations.[5] A goal such as(THGOAL (PART FINGER PERSON)) queries the database for matching assertions or invokes applicable theorems to establish the relation, often by reducing the primary goal to a set of subgoals.[6] Satisfaction occurs either by primitive actions—direct database matches or assertions—or by recursively generating subgoals, as in theorem consequents that propose further THGOAL invocations, such as (THGOAL (PART $?Y PERSON)) where $?Y binds to "FINGER" to prove the hierarchy.[5] For specialized cases like theorem proving, THGOAL extends to forms such as THGOAL for deductive goals, ensuring hierarchical decomposition until base cases are reached.[21]
The backtracking mechanism in Planner employs a depth-first search strategy to explore the goal tree, automatically retrying alternatives upon failure to recover from dead ends.[6] When a subgoal fails—due to no matching database entry or unsuccessful derivation—the system retracts to the most recent choice point, unbinds variables, and restores the state as if the failed path never occurred, using a trail to record and undo variable bindings and side effects like assertions.[5] This trail maintains a stack of bindings and modifications (e.g., via explicit markers like THSETQ or event times for actions), enabling efficient restoration without manual intervention, though data changes require programmer-specified undo primitives in some cases.[21] Failure propagation continues up the goal hierarchy until success or exhaustion of options, promoting exhaustive yet orderly exploration.[22]
Planner's computation model is inherently non-deterministic, with choice points arising whenever multiple procedures match a goal pattern, creating branches in the search tree for parallel exploration via sequential trials.[6] These points, set implicitly by THGOAL or explicit disjunctions, allow the system to select and commit to one alternative temporarily, deferring others until backtracking demands retry. This relies on pattern matching to identify candidate procedures from a theorem base, directing invocation toward goal satisfaction.[5] The model supports and-or goal structures, where conjunctions sequence subgoals and disjunctions branch on alternatives, fostering flexible problem-solving without explicit recursion.[21]
The basic algorithm for goal reduction and invocation in Planner proceeds as follows:
To satisfy a goal G:
1. Attempt to match G against the database; if a match exists, succeed and return bindings.
2. If no match, scan theorems for consequent patterns that match G; select the first (or recommended) matching theorem T.
3. Bind variables from the match and invoke T's antecedent actions, which may generate subgoals S1, S2, ..., Sn.
4. Recursively satisfy each Si in sequence (conjunction); on success of all, assert T's consequent and succeed.
5. On failure of any Si, backtrack: unbind variables via trail, restore state, and try the next matching theorem or alternative in T.
6. If no alternatives remain, propagate failure to the parent goal.
To satisfy a goal G:
1. Attempt to match G against the database; if a match exists, succeed and return bindings.
2. If no match, scan theorems for consequent patterns that match G; select the first (or recommended) matching theorem T.
3. Bind variables from the match and invoke T's antecedent actions, which may generate subgoals S1, S2, ..., Sn.
4. Recursively satisfy each Si in sequence (conjunction); on success of all, assert T's consequent and succeed.
5. On failure of any Si, backtrack: unbind variables via trail, restore state, and try the next matching theorem or alternative in T.
6. If no alternatives remain, propagate failure to the parent goal.
Implementations and Variants
Micro-Planner Implementation
Micro-Planner represents a practical subset of the original Planner language, implemented in MacLISP by Gerald Jay Sussman, Terry Winograd, and Eugene Charniak at the MIT Artificial Intelligence Laboratory between 1970 and 1971. This implementation provided an accessible system for exploring Planner's goal-directed paradigm within the Lisp environment, serving as the primary reference for early applications in theorem proving and problem solving. Unlike the more ambitious full Planner design, Micro-Planner focused on core primitives to ensure efficiency and ease of use on contemporary hardware.[3] The syntax of Micro-Planner emphasizes pattern-directed procedures and goal invocation, building directly on Lisp's list-processing capabilities. Theorem procedures, which define how to achieve specific goals, are specified using the form(DEFTHEO <pattern> <body>), where <pattern> is a template that matches incoming goals via unification, and <body> contains the sequence of actions or subgoals to execute upon a match. For instance, goals are pursued through the primitive (THGOAL <expr>), which attempts to satisfy the expression <expr> by searching a database of assertions or invoking matching theorem procedures; success binds variables in the pattern and executes the body, while failure triggers backtracking. Other forms include (THASSERT <expr>) for adding facts to the database and (THPROG <vars> <body>) for defining procedural blocks with local variable bindings.[3]
Key features of Micro-Planner include a simplified unification mechanism that uses Lisp-like patterns with variable indicators such as $?var for matching lists and $var for atoms, enabling flexible pattern matching without full first-order logic support. Built-in backtracking is managed implicitly by the goal solver, which retries alternative theorem applications or database entries upon failure, promoting exploratory search in planning tasks. The system integrates tightly with MacLISP, allowing seamless calls to Lisp functions for arithmetic, I/O, or other primitives, which extends Planner's expressiveness while embedding it within a robust host language. These elements made Micro-Planner suitable for rapid prototyping of AI applications, though it omitted advanced features like coroutining from the full Planner specification.[3]
A representative usage example appears in blocks world planning, where the system models stacking and moving blocks through goals and theorems. Consider defining a theorem to achieve an "on" relation:
(DEFTHEO (ON ?X ?Y)
(THGOAL (CLEAR ?X))
(THGOAL (CLEAR ?Y))
(THGOAL (IN-HAND ?X))
(DROP ?X ON ?Y)
(THASSERT (ON ?X ?Y))
(THASSERT (CLEAR ?X)))
(DEFTHEO (ON ?X ?Y)
(THGOAL (CLEAR ?X))
(THGOAL (CLEAR ?Y))
(THGOAL (IN-HAND ?X))
(DROP ?X ON ?Y)
(THASSERT (ON ?X ?Y))
(THASSERT (CLEAR ?X)))
(THGOAL (ON A B)), Micro-Planner would unify the pattern, pursue subgoals such as picking up block A (via other theorems like (DEFTHEO (IN-HAND ?BLOCK) (UNSTACK ?BLOCK FROM TABLE))), and backtrack if a subgoal fails, ultimately updating the world state upon success. This demonstrates the language's procedural attachment to goals, as seen in early AI experiments.[3][23]
