AI with LISP
Lisp is used for AI because it supports the implementation of software that computes with symbols very well. Symbols, symbolic expressions and computing with those is at the core of Lisp. Common Lisp (CL) is a dialect of the Lisp programming language. Common Lisp is great for symbolic AI. However, many recent machine learning libraries are coded in more mainstream languages, for example TensorFlow is coded in C++ & Python. Deep learning libraries are mostly coded in C++ or Python or C (and sometimes using OpenCL or Cuda for GPU computing parts).
LISP Advantages
Common Lisp is great for symbolic artificial intelligence because:
Has very good implementations (e.g. SBCL, which compiles to machine code every expression given to the REPL). |
Homoiconic, so it is easy to deal with programs as data, in particular it is easy to generate [sub-]programs, that is use meta-programming techniques. |
Has a Read-Eval-Print Loop to ease interactive programming. |
It provides a very powerful macro machinery (essentially, you define your own domain specific sublanguage for your problem), much more powerful than in other languages like C. |
It mandates a garbage collector (even code can be garbage collected). |
It provides many container abstract data types, and can easily handle symbols. |
Ability to code in high-level (dynamically typed) and low-level (more or less startically typed) code, thru appropriate annotations. |
Easy to define a new language and manipulate complex information. |
Full flexibility in defining and manipulating programs as well as data. |
Fast, as program is concise along with low level detail. |
Good programming environment (debugging, incremental compilers, editors). |
Several symbolic AI systems like Eurisko or CyC have been developed in CL (actually, in some DSL built above CL).
Notice that the programming language might not be very important. In the Artificial General Intelligence research topic, some people work on the idea of a AI system which would generate all its own code (so are designing it with a bootstrapping approach). Then, the code which is generated by such a system can even be generated in low level programming languages like C.
AI is a wide field that goes beyond machine learning, deep learning, neural networks, etc. In some of these fields, the programming language does not matter at all (except for speed issues), so LISP would certainly not be a topic there.
In search or AI planning, for instance, standard languages like C++ and Java are often the first choice, because they are fast (in particular C++) and because many software projects like planning systems are open source, so using a standard language is important (or at least wise in case one appreciates feedback or extensions). Here is a list of the best-known planners: Fast-Downward, FF, VHPOP, SHOP and SHOP2, PANDA.
Systems using LISP
Common Lisp is great for symbolic artificial intelligence because:
Systems using LISP | |
---|---|
Macsyma | First large computer algebra system. |
ACL2 | Widely used theorem prover, for example used by amd. |
DART | Logistics planner used during the first gulf war by the us military. This lisp application alone is said to have paid back for all us investments in ai research at that time. |
SPIKE | The planning and scheduling application for the hubble space telescope. Also used by several other large telescopes. |
CYC | One of the largest software systems written. Representation and reasoning in the domain of human common sense knowledge. |
METAL | One of the first commercially used natural language translation systems. |
SHRDLU | The dissertation of terry winograd (the phd advisor of larry page at stanford university) at mit. It was written in the ai lab created by Minsky to demonstrate a dialog with the machine that could lead to actions taken by the machine in a virtual environment both agents (the human, and the machine) were capable to understand. As macsyma, shrdlu was written in maclisp. |
There are thousands of applications in these areas that are written in Lisp. Very common for those is that they need special capabilities in the area of symbolic processing. One implements special languages that have special interpreters/compilers in these domains on top of Lisp. Lisp allows one to create representations for symbolic data and programs and can implement all kinds of machinery to manipulate these expressions (math formulas, logic formulas, plans, ...).
One of Lisp’s main virtues, is that it enables a programmer to create new linguistic abstractions with ease. So there should be not surprise in the fact that Lisp has influenced many popular programming languages; two of them very close to the AI/Data Science/ML community (besides from Lisp itself) — , which are R and Julia.
R was originally written as a very simple Lisp interpreter using as reference a chapter of a very popular introductory textbook on computer science, and a really good but surprisingly unknown book on Programming Languages. Lisp held an enormous influence in the development and conception of the first R implementation as documented by Ross Ihaka (the creator of R) many times.
Lisp is not a perfect language, it has many flaws (lots of dialects, lack of well-known libraries, weird syntax that does not contribute to attract people in, dynamic typing, etc.), but it was a well-suited tool for the problems AI pioneers were trying to tackle at those days, just the same way C/C++, or Fortran are a perfect choice to implement the underpins of a Deep Learning system (TensorFlow is implemented both in C++ and Python). There’s not a single Swiss army knife programming language, we do need to pick a language that suits the most the particular task we’re approaching.
LISP AI Jobs
These are some positions which can help you have an idea what recruiters are looking for in terms of experience, coding language, education, certificate ... etc.
LISP AI Jobs | |
---|---|
INDEED | Indeed LISP AI Jobs |
Monster | Monster LISP AI Jobs |
LISP AI Videos
These are some videos related to LISP and artificial intelligence. Enjoy!
LISP Code Practice
Would you like to practice your coding skills? Here are some great resources:
LISP Code Practice | |
---|---|
CLiki LISP | Common Lisp Programming Exercises |
Turorials Point | LISP Tutorial |
More information: Lisp is the second-oldest high-level programming language after Fortran and has changed a great deal since its early days, and a number of dialects have existed over its history. Today, the most widely known general-purpose Lisp dialects are Common Lisp and Scheme. Typical AI areas for computing with symbols were/are: computer algebra, theorem proving, planning systems, diagnosis, rewrite systems, knowledge representation and reasoning, logic languages, machine translation, expert systems, and more. It is then no surprise that many famous AI applications in these domains were written in Lisp. Check out our main page for more components of artificial intelligence resources.