Denis Kashirski
CSE 151 Essay 1

Programming Languages and AI

Modern programming languages have the same expressive power, which means that any such language could be, potentially, used for making AI applications. What makes languages distinct from one another, however, is a set of features that make certain tasks easier to accomplish. For example, Perl has very strong text manipulation abilities, and is very popular for making text parsing applications. Java, with its object oriented model, security and portability features, is very good for creating web applications. Thus, to understand if language is good or bad for doing AI, we must identify the requirements of the AI applications.

From my experience in AI programming done in CSE150 I learned that, AI applications need fast and efficient data manipulation and searching. AI data is usually of the same type i.e. numbers, letters, words. In Lisp a collection of similar data was kept in lists. Our neural network projects were done in C and we used arrays to represent layers in the network. Even though algorithms in C generally ran faster, I found that it was hard to debug them (especially if data doesn't look very meaningful to a human). Lisp is a declarative language, which is a great feature when heavy debugging is involved.

Most of the searching I did in AI involved recursion. Even thought both C and Lisp allow recursion, Lisp does it in a more concise manner which makes code easier to read and has many list manipulation functions which are very useful for doing AI searches. Also, real AI programs deal with very large amounts of data, thus efficient reclaiming of the storage must be present in the language. In Lisp this is done automatically by a garbage collector. Overall I think C is simply too low level to do AI.

Another feature of AI programs that I noticed is that they have functional structure. Most of my Lisp programs consisted of many small functions that perform one specific task and are used by other functions. The functional languages I have encountered are ML, and Haskell, which are widely used for AI. In fact, there is a project to create Haskell driven robots using Lego Mindstorm kits. From reading several articles on those languages I found that they are somewhat sluggish in performance.

After looking at several languages, I have come to conclusion that Lisp is probably the most optimal language for building AI applications at current time. It has very clean semantics, the performance is not extremely slow, and it is a declarative language which helps a lot in debugging process. My second choice of the language would be Haskell. It is a purely functional language, has object oriented extensions such as O'Haskel, and also presents very clean semantics. In fact, a conducted test of construction of Naval Warfare Center using Haskell, C++ and Ada, clearly showed that Haskell code took much less time to develop, the program was much shorter and easier to understand then its equivalents in other languages. Unfortunately I have never programmed in Haskell, so I cannot confirm any of those statements myself.

Bibliography:
Lisp: Good News, Bad News, How to Win Big
Ada9X Issues for AI Systems
Programming Lego Mindstorm Robots in Haskell Project
Haskell vs Ada vs C++ vs ...