"Prolog" - a programming language or the basis of artificial intelligence

The appearance of the "Prologue" was due to the development of logic, mathematics and programming. The latter played the most significant role. Specialists in logic and mathematics made an attempt to put programming on the “right path”, but the development of information technology showed a completely different result.

Pragmatic imperative programming turned out to be more promising. The "prologue" as a programming language took place, but did not become the basis for artificial intelligence.

Classic programming versus logic

A person makes complex decisions logically and reasonably. Almost without hesitation, a person acts reasonably. If you do not take into account decisions that require the collection of information, its analysis and complex calculations, then any result is fast, accurate and reasonable.

Human Decisions: Fast and Reasonable




This fact has always given a ghostly basis to consider the creation of a decision-making tool a simple matter. With the advent of Prolog, it seemed: the question of artificial intelligence is a matter of technology, and a reasonable person came up with three laws of robotics. However, artificial intelligence remained a ghost, and the three laws of robotics turned out to be from a fairy tale - "do it, I don’t know what."





Programming in the classical sense of the word (often used the terms “procedural”, “imperative” or “functional”) developed and successfully overcame the “troubled times” of the 80-90s, when there were innumerable programming languages.

The showdown between Pascal and Sea lasted a long time, was fierce, but ended neutrally and quietly. The idea of ​​a good programming language and several successful implementations of it remained.

This is not to say that Prolog as a programming language did not develop. But he did not achieve the stated goals. Today you can not only say, but also substantiate: "Prologue" is an academic language for:

  • learning objectives;
  • predicate logic;
  • mathematicians
  • narrow application.

It is doubtful that this statement can be refuted. Artificial intelligence is not only a widespread use, but also a too serious event that cardinally changes the social structure and picture of the world.

Programming in the Prolog language for artificial intelligence did not take place: for more than forty years of the history of the language, there has not been a single cardinally new event relevant to public consciousness, indicating the opposite.

The objective reality is this: not only the strongest survive, but the demand and relevance.

"Prolog" - declarative programming language

Having a tool for describing facts and rules is good, but what's the point? Facts and rules fit perfectly into a regular database. A skilled classical programmer provides an interactive dialogue for the user, and the latter solves his tasks.





If necessary, the programmer modifies the dialogue, and the user completes the database of facts and rules. An absolutely working and decades-proven version of the implementation of the mass of already solved and solvable problems.

Prologue - Not Artificial Intelligence




A declarative statement of facts and rules on any implementation of the Prolog programming language is a convention, an attempt to formalize reality in its intellectual state. Conventional programming does not touch the intellect. Classical programming suits the position: description and data processing. There are many problems here, but there are many brilliant and working solutions.

"Prologue" as a programming language - these are the facts:

  • mother (Maria, Natasha); - Maria is Natasha’s mother;
  • dad (Eugene, Marina); - Eugene is Marina's dad.

Here, immediately overboard, is a fact: “Maria” and “Marina” are different names. Nothing prevents to add the fact:

  • dad (Eugene, Maria); - Eugene is the pope of Mary.

These descriptions give life to the rules:

  • parent (x, y) <- dad (x, y);
  • parent (x, y) <- mother (x, y);

But they do not allow to conclude that dad is the father of Marina, and Marina is the mother of Mary. This problem is solved, you can add another rule, add another fact. But how many such actions should be taken in a real situation?

In fact, "Prologue" as a programming language is an example of the declaration of facts and rules, but not the logic to which the consciousness of a classical programmer is accustomed. "Prolog" positions itself as a language of predicate logic, but you can learn programming on it only by examples and sample descriptions from developers of a specific implementation of the language.

The Prologue Family

France is considered the birthplace of Prologue, and 1973 is the year of birth. Interest in the language was periodically renewed, but subsided with enviable stability. Motto of the language: “The logic of predicates is elementary! This is a way to explain how thinking works ”- it remained the motto.

Any implementation of the Prolog programming language strictly followed the predicate logic, but always included the classical ideas of procedural programming. It is more correct to say “imperative,” since this term is used with more formality than procedural, functional, object-oriented, or otherwise.

Symbols and predicate logic




Any programming is data and its processing. The language constructs should describe the task to be solved as accurately as possible, which is why all the well-known implementations of the "Prolog": Turbo Prolog, Win Prolog, SWI Prolog, GNU Prolog, Visual Prolog and others contain, in addition to declarative constructions, ordinary imperative expressions.

It is believed that the Prolog family is developing in academic and research organizations and therefore, as a common language, one can speak only in a conceptual sense. Nevertheless, the very fact that the concept of "Prologue" is alive and developing can be considered: this language has a scope, and it is in demand in a certain range of tasks.

The basis of artificial intelligence

Interest in artificial intelligence has never waned; they just start talking about it when another occasion arises, but Prolog has never been associated with artificial intelligence more than the usual classical programming language.

At the end of the 80s there was a real, relevant and sought-after intellectual project “Inventing Machine”. There was a real attempt to apply the "Prolog" to formalize a huge practical knowledge base (data) on inventions, physical, chemical and other laws.

The result was not achieved, too many facts and rules had to be written on the Prolog as a programming language that are banal imperative. Meanwhile, in parallel, a mass of successful software products were implemented in ordinary languages.

Assembler and intelligence




In the early 90s, a project of a real intellectual system was successfully implemented that simulates the behavior of a child under the age of 3 in the language of the assembler of the EU computer! The use of Prolog was not even considered.

This intellectual system not only “understood” what mom and dad are, and how Maria differs from Marina, but without much stress, she independently jumped from acquired knowledge on these issues to balls and their differences from cubes, to the colors of objects and ... (!) To elementary mathematics: simple arithmetic operations proved to be able to do it on the basis of knowledge acquired in solving completely different problems.

It can be argued that classical programming is ahead of Prolog in terms of the development of the territory of artificial intelligence, but it gives real results.

As for intelligence as a task - apparently, the question here is not in the language, but in the idea of ​​implementation. If the assembler of 1991 was able to "become the basis" for the intellectual system of situational intelligence, then the question clearly lies not in the language of implementation, but in the idea.




All Articles