Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z - Internet FAQ Archives

REPOST: Artificial Intelligence FAQ: General Questions & Answers 1/6 [Monthly posting]
Section - [1-8] What are good programming languages for AI?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Counties ]

Top Document: REPOST: Artificial Intelligence FAQ: General Questions & Answers 1/6 [Monthly posting]
Previous Document: [1-7] What are the branches of AI?
Next Document: [1-9] What's the difference between "classical" AI and
See reader questions & answers on this topic! - Help others by sharing your knowledge

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++, and recently

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:

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.

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")

User Contributions:

Comment about this article, ask questions, or add new information about this topic: