Skip to main content
Log in

Programmieren durch analoges Schließen

Programming by analogy

  • Published:
Kognitionswissenschaft

Summary

We propose an approach to programming by analogy that is based on the notion of recursive program schemes. If there are no examples with sufficient structural similarity to a new problem, the program scheme is inferred from the scratch using induction from inputoutput examples. Program schemes are stored in a hierarchically organized knowledge structure by constructing generalized schemes from concrete programs. Our approach handles the following processes of analogical reasoning: the similarity between new problems and example solutions is calculated by a structural measure defined on trees. In addition, this similarity measure defines which modifications have to be performed to adapt the example solution to the new problem. In the case of successful transfer the new solution together with a generalized structure, is stored in memory. The problem of handling non-isomorphic structures is discussed and possibilities for handling transfer in such cases are proposed. Our approach is implemented as a first prototype in Lisp.

Zusammenfassung

Es wird ein Ansatz zum Programmieren durch analoges Schließen dargestellt, der auf dem Konzept rekursiver Programmschemata basiert. Ist kein hinreichend ähnliches Beispiel zu einem aktuellen Problem vorhanden, so werden solche Schemata induktiv aus Ein-Ausgabe-Beispielen aufgebaut. Das Gedächtnis ist hierarchisch organisiert, indem ausgehend von konkreten Programmschemata generalisierte Strukturen gebildet und gespeichert werden. Beim analogen Schließen werden folgende Teilprozesse modelliert: Die Ähnlichkeit zwischen einem aktuellen Problem und bereits gelösten Beispielen wird über ein strukturelles Distanzmaß auf (Term-)Bäumen bestimmt. Dieses Ähnlichkeitsmaß definiert gleichzeitig die Modifikationen, die notwendig sind, um ein Beispielprogramm an die neuen Anforderungen anzupassen. Bei erfolgreichem analogen Transfer wird das neu inferierte Schema sowie eine über Beispiel und aktuelles Problem generalisierende Struktur in das Gedä chtnis eingefügt. Das Problem des analogen Transfers bei nicht-isomorphen Strukturen wird diskutiert, und es werden Lösungsideen aufgezeigt. Der Ansatz ist als erster Prototyp in Lisp implementiert.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Literatur

  • Anderson, J. R. (1993) Rules of the mind. Hillsdale, NJ: Erlbaum

    Google Scholar 

  • Anderson, J. R. & Thompson, R. (1989) Use of analogy in a production system architecture. In: S. Vosniadou & A. Ortony (eds.), Similarity and analogical reasoning (pp. 267–297). Cambridge: Cambridge University Press

    Chapter  Google Scholar 

  • Biermann, A. W., Guiho, G. & Kodratoff, Y. (eds.) (1984) Automatic Program Construction Techniques. London: Collier Macmillan

    MATH  Google Scholar 

  • Le Blanc, G. (1994) BMWk revisited: Generalization and formalization of an algorithm for detecting recursive relations in term sequences. In: F. Bergadano & L. de Raedt (eds.), Machine learning. Proc. of ECML-94 (pp. 183–197)

    Chapter  Google Scholar 

  • Dershowitz, N. (1986) Programming by analogy. In: J. G. Carbonell, R. S. Michalski & T. M. Mitchell (eds.), Machine learning — An artificial intelligence approach (Vol. 2, pp. 393–422). Los Altos, CA: Morgan Kaufmann

    Google Scholar 

  • Engelfriet, J. (1974) Simple program schemes and formal languages. Berlin: Springer

    Book  MATH  Google Scholar 

  • Falkenhainer, B., Forbus, K. D. & Gentner, D. (1989) The structure mapping engine: Algorithm and example. Artificial Intelligence, 41, 1–63

    Article  MATH  Google Scholar 

  • Gentner, D. (1983) Structure-mapping: a theoretical framework for analogy. Cognitive Science, 7, 155–170

    Article  Google Scholar 

  • Holland, K. J., Holyoak, J. H., Nisbett, R. E. & Thagard, P. R. (1986) Induction — Processes of inference, learning, and discovery. Cambridge, MA: MIT Press

    Google Scholar 

  • Holyoak, K. J. & Thagard, P. R. (1989) Analogical mapping by constraint satisfaction. Cognitive Science, 13, 295–355

    Article  Google Scholar 

  • Klix, F. (1993) Analytische Betrachtungen über Struktur und Funktion von Inferenzen. Zeitschrift für Psychologie, 201, 393–414

    Google Scholar 

  • Lu, S. (1979) A tree-to-tree distance and its application to cluster analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-1(2), 219–224

    Article  Google Scholar 

  • Manna, Z. & Waldinger, R. (1975) Knowledge and reasoning in program synthesis. Artificial Intelligence, 6, 175–208

    Article  MATH  MathSciNet  Google Scholar 

  • Müller, M. & Schmid, U. (1996) IPAL — a system that integrates problem solving, skill acquisition, and learning by analogy. In. U. Schmid, J. Krems & F. Wysotzki (eds.), Proceedings of the First European Workshop on Cognitive Modelling (14.-16. 11. 96, TU Berlin), pp. 246–247

    Google Scholar 

  • Nilsson, N. J. (1980) Principles of Artificial Intelligence. Berlin: Springer

    MATH  Google Scholar 

  • Novick, L. R. & Holyoak, K. J. (1991) Mathematical problem solving by analogy. Journal of Experimental Psychology: Learning, Memory, and Cognition, 14, 510–520

    Google Scholar 

  • Pirolli, P. L. & Anderson, J. R. (1985) The role of learning from examples in the acquisition of recursive programming skills. Canadian Journal of Psychology, 39, 240–272

    Article  Google Scholar 

  • Reed, S. K. & Bolstad, C. A. (1991) Use of examples and procedures in problem solving. Journal of Experimental Psychology: Learning, Memory, and Cognition, 17(4), 753–766

    Google Scholar 

  • Ross, B. H. & Kennedy, P. T. (1990) Generalizing from the use of earlier examples in problem solving. Journal of Experimental Psychology: Learning, Memory, and Cognition, 16(1), 42–55

    Google Scholar 

  • Riesbeck, C. K. & Schank, R. C. (1989) Inside case-based reasoning. Hillsdale, NJ: Erlbaum

    Google Scholar 

  • Rumelhart, D. E. & Norman, D. A. (1978) Accretion, tuning and restructuring: Three modes of learning. In: J. W. Cotton & R. L. Klatzky (eds.), Semantic Factors in Cognition (pp. 37–53). Hillsdale, NJ: Erlbaum

    Google Scholar 

  • Sadohara, K. & Haraguchi, M. (1995) Analogical logic program synthesis from examples. In: N. Lavrac & S. Wrobel (eds.), Proceedings of the Eighth European Conference in Machine Learning (ECML-95) (pp. 232–244). Berlin: Springer

    Google Scholar 

  • Schädler, K. & Wysotzki, F. (1996) Klassifizierungslernen mit Hilfe spezieller Hopfield-Netze. In: W. Dilger, M. Schlosser, J. Zeidler & A. Ittner (Hrsg.), Beiträge zum 9. Fachgruppentreffen Maschinelles Lernen der GI-Fachgruppe 1.1.3. August 1996, Chemnitzer Informatik-Berichte, CSR-96-06, Technische Universität Chemnitz-Zwickau

    Google Scholar 

  • Schmid, U. & Kaup, B. (1995) Analoges Lernen beim rekursiven Programmieren (Analogical learning in recursive programming). Kognitionswissenschaft, 5, 31–41

    Article  Google Scholar 

  • Schmid, U. & Wysotzki, F. (1996a) Skill acquisition can be regarded as program synthesis. In: U. Schmid, J. Krems & F. Wysotzki (eds.), Proceedings of the First European Workshop on Cognitive Modelling (14.-16. 11. 96, TU Berlin), pp. 39–45

    Google Scholar 

  • Schmid, U. & Wysotzki, F. (1996b) Induktion von rekursiven Programmschemata und Analoges Lernen. In: R. H. Kluwe (Hrsg.), Kognitionswissenschaft: Strukturen und Prozesse intelligenter Systeme. Wiesbaden: Westdeutscher Universitätsverlag (im Druck)

    Google Scholar 

  • Vorberg, D. & Göbel, R. (1991) Das Lösen rekursiver Programmierprobleme: Rekursionsschemata. Kognitionswissenschaft, 1, 83–95

    Google Scholar 

  • Vosniadou, S. & Ortony, A (1989) Similarity and analogical reasoning: A synthesis. In: S. Vosniadou & A. Ortony (eds.), Similarity and Analogical Reasoning, pp. 1–17. Cambridge: Cambridge University Press

    Chapter  Google Scholar 

  • Weber, G. (1994) Fallbasiertes Lernen und Analogien — Unterstützung von Problemlöse- und Lernprozessen in einem adaptiven Lernsystem. Weinheim: PVU

    Google Scholar 

  • Weber, G. (1996) Episodic learner modeling. Cognitive Science, 20, 195–236

    Article  Google Scholar 

  • Williams, R. S. (1988) Learning to program by examining and modifying cases. In: J. Laird (ed.), Proceedings of the Fifth International Conference on Machine Learning, University of Michigan, pp 318–324. San Mateo, CA: Morgan Kaufmann

    Google Scholar 

  • Wysotzki, F. (1983) Representation and induction of infinite concepts and recursive action sequences. In: Proceedings of the 8th IJCAI, Karlsruhe

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ute Schmid.

Additional information

Ich bedanke mich bei Studierenden der Informatik der Technischen Universität Berlin, die in zwei studentischen Projekten große Teile der Implementation durchgeführt haben, insbesondere bei Eric Heymann, Dirk Matzke und Rene Mercy, bei meiner Kollegin Kristina Schädler, die die studentischen Arbeiten mitbetreut hat, und bei Mark Müller, der die Implementationen zu einem Gesamtsystem integriert hat. An Heike Pisch — wie fast immer — vielen Dank für die kritische Durchsicht des Manuskripts. Spezieller Dank gebührt Prof. Fritz Wysotzki, der mir in vielen fruchtbaren Diskussionen wichtige Anregungen zu dieser Arbeit gegeben hat.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Schmid, U. Programmieren durch analoges Schließen. Kognit. Wiss. 6, 127–134 (1997). https://doi.org/10.1007/s001970050036

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s001970050036

Navigation