Artificial intelligence lisp and prolog comparison

First, let's first understand what is an artificial intelligence language.

Artificial intelligence (AI) language is a kind of computer programming language with the ability of symbolic processing and logical reasoning to adapt to artificial intelligence and knowledge engineering. It can be used to program programs to solve complex problems such as non-numeric calculations, knowledge processing, reasoning, planning, and decision making. Typical artificial intelligence languages ​​are LISP, Prolog, Smaltalk, C++, etc.

In general, artificial intelligence languages ​​should have the following characteristics:

• Has symbolic processing capabilities (ie non-numerical processing capabilities);

• Suitable for structured programming and easy to program;

• Recursive and backtracking;

• Have human-computer interaction capabilities;

• Suitable for reasoning;

• Both the ability to mix processes with descriptive data structures, and the pattern matching mechanisms that identify data and determine control.

One might ask, what is the difference between using artificial intelligence to solve problems and traditional methods?

Traditional methods usually express all the knowledge of the problem in a fixed program in various models. The solution of the problem is performed step by step (one by one) according to the pre-arranged steps under the guidance of the program. The solution to the problem and Feng. The Neumann-style computer structure is consistent. At present, large-scale database methods, mathematical model methods, and statistical methods are all strictly structured methods.

For the problems to be solved by artificial intelligence technology, it is often impossible to reflect all the knowledge in a fixed program. It is often necessary to build a knowledge base (including facts and inference rules). The program determines its actions according to the environment and the input information given and the problem to be solved, so it is the reasoning process under the guidance of the environmental model. This approach is extremely flexible, conversational, self-explanatory and learning. This method is not clear or incomplete to solve some conditions and objectives, that is, the unstructured problem is not well-formed and not well described. It is better than the traditional method. It usually adopts heuristic and heuristic strategies to solve it. problem.

So which Lisp and Prolog are more worth learning, which one is more powerful?

Since the development of LlSP by the Massachusetts Institute of Technology in the 1950s, LISP has been the main artificial intelligence language in the United States. Prolog was developed in Europe in the early 1970s and is the language of choice for European artificial intelligence researchers. In addition, Japan's fifth-generation aircraft program also chose Prolog as its software development language. Douglas Partridge, an old scientist who helped develop the internal expert system at the Corporate Artificial Intelligence Center at the Hughes Institute in Calabasas, California, predicted that "this is a complex issue, and many of the things it involves, even if it does not affect the years after the 1980s. It will affect the industry of the next five years.” He believes that the logic programming represented by Prolog and its dialect is sneaking into the field of artificial intelligence in the United States. However, he doubts whether the language can be "consistent with the problem solving method that people use when developing expert systems.

Many of LISP's advocates don't trust Prolog. They are elusive to why the Japanese chose Prolog to develop software for the fifth generation. Some people say, "The Japanese made a serious mistake. Prolog is a good tool for researching problems. It is too limited by its innate structure but for some important applications.

system. The fact that more and more Americans are turning to Prol0B shows that this attitude is due to the general misunderstanding of Prolog and logic programming. Some researchers have spent years studying LSP, so they are very affectionate.

The two languages ​​are not everyone's favorite, avoiding the dispute between lisp and prolog, and the common shortcomings of these two languages ​​are the same. William Kornfeld, chairman of Quintus Computer Software Technology, which develops prolog software, said, "Prolog is easy to use, and programming with him is much easier than using lisp. Lisp is a very complex language that requires programmers to be extremely skilled." At the time of the initial design of the prolog, certain decisions limited the problem classes he was good at...." The differences between Lisp and Prolog and the controversy I will analyze below.

About the LISP language

(1) LISP has the same (that is, the highest theoretical) computing power as the Turing machine; in computer science's computable theory, it has been proved that the recursive function and the Turing machine have the same (that is, the highest theoretical calculation). Capability, usually referred to as a recursive function on a natural set of numbers. This conclusion also holds for the recursive function on the symbol set. J. McCarthy designed a set of symbolic processing functions in LISP that have the computational power of recursive functions on the symbol set, so in principle any symbol processing problem in artificial intelligence can be solved.

(2) The uniqueness of the data type, the consistency of the program and the data; the data type and syntactic structure of LISP are simple, even simple to be unique and consistent: the data and the program are expressed in the same form, all using S - A form of expression. The basic data structure is the table (the table is a special case of S-expressions).

(3) Equivalence of data and procedures; LISP data and programs are not only of the same type, but also equivalent; that is, the program can be processed as data, and the data can be executed as a program.

(4) All functions of LISP are implemented by functions. The running of the program is evaluation; the usual form of LISP program is a series of function definitions, followed by a series of function calls with parameters. The relationship between functions is only called execution. It is only manifested.

(5) The control structure of the LISP language is recursive; the control structure used by most languages ​​is cyclic, some of the programming languages ​​allow recursion, and LISP is recursive. Recursion is the source of LISP capabilities. Of course, LISP now also has a loop structure and iteration. (6) An atom can have any number of values ​​(characteristic values); a very important feature of LISP is that there are many characteristics of each character atom, and each feature has a property table and corresponding property values. Because the multi-value of the atom brings a lot of convenience to the user, it brings benefits to the problem representation, making LISP very useful.

(7) LISP has the flexibility of the structural form and scale of the table, and does not have to be preset;

(8) It has the function of collecting garbage.

About prolog language

(1) WHAT language; Prolog is designed by "How to do the Job" to "What you want to do". The user only needs to explain what the known facts are, define the rules (describe the relationship between the objects), and then tell the problem (inquiry) to be solved. It is not necessary to tell the computer how to do it step by step. The solution of the problem is through the internal mechanism of Prolog. Automatic generated.

(2) Based on the first-order predicate logic, it has both solid theoretical foundation and strong performance ability. Prolog has simple grammar, strong description ability, and is closer to natural language. The program is easy to write and read, and the program is small.

(3) Prolog automatically implements pattern matching (integration function) and automatic backtracking, which are the basic operations commonly used in artificial intelligence systems;

(4) Internal backtracking ability and uncertainty make Prolog give multiple solutions to the same problem; Prolog has two reasons for uncertainty: 1 procedural uncertainty: Prolog predicate call is mode The top-down depth-first search automatic backtracking strategy generates backtracking when the argument value does not satisfy the predicate, and obtains another value of the argument, so that the predicate is true; 2 the uncertainty of the argument characteristic: An argument in a predicate can be used both as an input argument and as an output argument. The non-determinism of the argument characteristics leads to the diversity of questioning methods and enhances the interactive ability (session ability). The uncertainty of the process and the uncertainty of the characteristics of the variables are the intelligent features not available in the traditional programming language and another AI language LISP.

(5) Prolog data and program unification, Prolog provides a unified data structure - term, used to construct data and programs. There is no significant difference between the data and the program, and it is also in the database. And provides instructions to modify the database ADDCL and DELCL, in the program execution, you can modify the data, change the control, so you can compile the program that can modify the program and data, to provide some intelligence to facilitate;

(6) Recursion is one of the important features of the Prolog language.

Disadvantages: (1) On the implementation of the compiler system, on the issue of low execution efficiency, Prolog encounters more difficulties than LISP on the issue of large system overhead; due to the depth-first algorithm, the control mechanism is universal, due to Recursive and automatic backtracking, too many intermediate variables in the Prolog program are a waste of memory, which inevitably has extra backtracking for specific problems, thus wasting more machine time and space and reducing efficiency.

(2) Large Prolog program debugging is not easy; Prolog algorithm is depth-first search and automatic backtracking. The details are controlled by the system during the execution of the program, which reduces the work of design control. But in turn, it is difficult or impossible for the user to control the details of the algorithm. The only way to control the program is through the "cut" operation (but cut affects the completeness of the prolog). Therefore, large prolog programs are much more difficult to debug than LISP programs.

(3) Prolog's "not" is "failed not", not a logical negation. It can only be considered a logical negation on the basis of a closed world hypothesis. Prolog's handling of quantifiers is not enough. It considers all rules in front of all the quantifiers for all the arguments in the rule, and there are quantifiers for the arguments in the query before the query formula. However, the closed world assumption in practical applications may not be appropriate.

(4) Prolog is a description of the language, dealing with relationships, and thus has greater limitations in process control. However, many countries have implemented conversion interfaces between Prolog and LISP languages ​​or between them and traditional languages. Therefore, there are also promotion of Prolog in process control, such as PC-Prolog. As another example, POPLOG is a mixture of LISP, PROLOG, and POP-11, which allows programs written in these three languages ​​to call each other. There is also a style of programming, introducing and taking into account another style, such as LOGLISP (based on the LISP structure, adding logic components).

Prolog details

Prolog (short for Programming in Logic) is a logical programming language. It is based on the theoretical foundations of logic and was originally applied to research fields such as natural language. It has been widely used in the research of artificial intelligence, and can be used to build expert systems, natural language understanding, intelligent knowledge base and so on. It is also helpful for writing some common applications, and can develop programs faster than other languages, because its programming method is more like a logical language to describe the program.

3.5mm Wire To Board Connectors

3.5mm Wire To Board Connectors.Standards
Wire-to-board connectors carry approvals from various national and international organizations. In North America, they often bear marks from Underwriters Laboratories (UL) and/or the Canadian Standards Association (CSA).
A wire to board connector for the European marketplace should comply with the Restriction of Hazardous Substances (RoHS) and Waste Electrical and Electronic Equipment (WEEE) directives from the European Union (EU). Wire-to-board connectors that comply with other requirements are also available.
BS 9526 N0001 - Specification for multi-contact edge socket electrical connectors.

3.5mm Wire To Board Connectors

ShenZhen Antenk Electronics Co,Ltd , http://www.coincellholder.com