[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Single Page

Top Document: Artificial Intelligence FAQ:1/6 General Questions & Answers [Monthly posting]
Previous Document: [1-9] What are the branches of AI?
Next Document: [1-11] What's the difference between "classical" AI and


[1-10] What are good programming languages for AI?



This topic can be somewhat sensitive, so I'll probably tread on a few
toes, please forgive me.  There is no authoritative answer for this
question, as it really depends on what languages you like programming
in.  AI programs have been written in just about every language ever
created.  The most common seem to be Lisp, Prolog, C/C++,  recently
Java, and even more recently, Python.

LISP- For many years, AI was done as research in universities and
laboratories, thus fast prototyping was favored over fast execution.
This is one reason why AI has favored high-level langauges such as
Lisp.  This tradition means that current AI Lisp programmers can draw
on many resources from the community.  Features of the language that
are good for AI programming include: garbage collection, dynamic
typing, functions as data, uniform syntax, interactive environment,
and extensibility. Read Paul Graham's essay, "Beating the Averages"
for a discussion of some serious advantages:
http://www.paulgraham.com/avg.html

PROLOG- This language wins 'cool idea' competition.  It wasn't until
the 70s that people began to realize that a set of logical statements
plus a general theorem prover could make up a program.  Prolog
combines the high-level and traditional advantages of Lisp with a
built-in unifier, which is particularly useful in AI.  Prolog seems to
be good for problems in which logic is intimately involved, or whose
solutions have a succinct logical characterization.  Its major
drawback (IMHO) is that it's hard to learn.

C/C++- The speed demon of the bunch, C/C++ is mostly used when the
program is simple, and excecution speed is the most important.
Statistical AI techniques such as neural networks are common examples
of this.  Backpropagation is only a couple of pages of C/C++ code, and
needs every ounce of speed that the programmer can muster.

Java- The newcomer, Java uses several ideas from Lisp, most notably
garbage collection.  Its portability makes it desirable for just about
any application, and it has a decent set of built in types.  Java is
still not as high-level as Lisp or Prolog, and not as fast as C,
making it best when portability is paramount.

Python- This language does not have widespread acceptance yet, but
several people have suggested to me that it might end up passing Java
soon.  Apparently the new edition of the Russell-Norvig textbook will
include Python source as well as Lisp.  According to Peter Norvig,
"Python can be seen as either a practical (better libraries) version
of Scheme, or as a cleaned-up (no $@&%) version of Perl."  For more
information, especially on how Python compares to Lisp, go to
http://norvig.com/python-lisp.html

Also see section [6-1] for implementations of new languages that might
be pertainant to AI practitioners and researchers.

(some of the above material is due to the comp.lang.prolog FAQ, and
Norvig's "Paradigms of Artificial Intelligence Programming: Case
Studies in Common Lisp")



Top Document: Artificial Intelligence FAQ:1/6 General Questions & Answers [Monthly posting]
Previous Document: [1-9] What are the branches of AI?
Next Document: [1-11] What's the difference between "classical" AI and

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
crabbe@usna.edu, adubey@coli.uni-sb.de

Last Update October 22 2009 @ 05:22 AM

Some parts © 2009 Advameg, Inc.