Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For a few decades the programming language of choice for AI was either Prolog or LISP, and a few more others that are not so well known. Most of them were designed before the 70's.

Changes happens a lot on many other domains specific languages, but in the AI domain it hadn't surfaced so much as in the web specific languages or scripting etc.

Are there recent programming languages that were intended to change the game in the AI and learn from the insufficiencies of former languages?

share|improve this question

closed as off-topic by gnat, Bart van Ingen Schenau, MichaelT, Ampt, GlenH7 Jun 4 '14 at 2:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, MichaelT, Ampt, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

Octave is a good language for Machine Learning if that branch of AI interests you. – eradicus Oct 6 '12 at 1:44
Consider also a meta-programming approach (i.e. generating programs). Look into J.Pitrat's blog. Then the language you generate might not have a lot of inportance, it could even be C. – Basile Starynkevitch Jan 19 at 21:59
up vote 23 down vote accepted

The AI course I participated in online, taught at Stanford, recommended that Python be used for the homework. I believe Georgia Tech still uses LISP.

The fallacy here is "new" is "good". AI research is one of the oldest computing research disciplines. It keeps calving off subfields as people realize that techniques from it can be used elsewhere. Language Processing, Machine Learning, and Data Mining are all examples of "practical" applications that use a huge host of languages.

So it's less that the main field has changed than it has been refined into a massive array of related disciplines. It's much like saying "Scientific Computing" and expecting it to just mean solving Linear Equations.

The languages you've mentioned have evolved quite a lot on the last 20 or 30 years. Lisp spawned Common Lisp and Clojure. Prolog spawned Visual Prolog (it has objects...) and Mercury (take Haskell and Prolog, lock them in a room together...stand well away and get ready to run).

Given that AI research is more theoretic, it makes sense that it would focus on the theory (math) rather than the practicalities (languages).

All that being said, the biggest innovator of AI technologies I'd wager is Google. They tend to favor Python (and Go and Dart but that's beside the point). Thus I'd say Python is the "recent language of choice" but you could also use Haskell or OCaml or F# or C# or even Java.

share|improve this answer
+1 For mentioning Mercury. – Guy Coder Oct 6 '12 at 14:13

The language of choice for AI that i have used back years ago was Prolog, which has Visual Prolog version that came with IDE like in Delphi.

Prolog (and its GUI version Visual Prolog) is a general purpose logic programming language associated with artificial intelligence and computational linguistics.

However, recent trend shows that any OOP language like C#, Java, Python, Haskell, etc.. are becoming programmable for AI applications.

share|improve this answer
Since when is Haskell OOP? – Andrea Oct 6 '12 at 15:12
you may emulate OOP in Haskell, right ? – Yusubov Oct 6 '12 at 15:21
you can emulate it in any language, doesn't mean you would normally consider any language to be OO – jk. Oct 6 '12 at 16:27

I'd say it depends on what you mean by AI. Machine learning in general has seen some rapid evolution of tooling, so a number of algorithms for classification, clustering, and other forms of supervised and unsupervised learning, especially with probabilistic graphical models, have been implemented in Python, C#, Ruby, OCaml, and Java, just to name a few.

If you're doing large scale manipulation of data for building things like recommendation engines, collaborative filtering, or other types of unsupervised or supervised learning problems, you may want to take a look at Mahout. It's not really a "programming language" per se, but it's a set of tools for this kind of problem. You can write model code in Java, or other JVM languages like groovy (a dynamic, reasonably expressive language) or clojure (lisp-like).

I'm not sure why you'd consider Lisp dated; it's where most of the "new" language features in other languages (closures, etc.) originated from.

Of course, machine learning techniques have generally been moving toward probabilistic models than on the binary logic, decision-tree style approach that most early AI efforts started with, so it's possible to argue that machine learning is a branch or a diversion from the big tent of AI.

share|improve this answer

While most of these answers focus on the word "language" because you used it in your question, I don't believe you should think a specific language when thinking AI.

I have been working with this technology for years and I am currently working with Proof Assistants and converting some code from OCaml to F#. It is not the language that achieves the AI but specific algorithms implemented in the language. For PROLOG this is an inference engine based on unification. Now if you start with unification and look at how it has been customized and advanced over the years I think you will find the progression of advancement you seek. Don't focus on the language, focus on the algorithms.

As an example, type inference in functional languages use Hindley–Milner which is based on unification.

Another example specific to the proof assistant is here, notice The inference engine for prolog is implemented in OCaml and being translated into to F#. So while OCaml and F# are not noted normally as AI languages, they are fully capable of implementing the AI algorithms.

share|improve this answer
I have to say this is exactly what I think about this question : the algorithms are more important than the language you use to write them, that's why every AI book I read insisted on giving pseudocode for the algorithms. – JJP Jul 4 '13 at 16:24

You may find answers to your questions in a recent special issue “Sprachen der KI” (“Languages of AI”) of the German AI journal KI - Künstliche Intelligenz, Volume 26, Number 1 / February 2012, published by Springer. I am the co-author of one part of a discussion paper included in it: “What Language Do You Use To Create Your AI Programs and Why?” Here is a preprint of it:

In summary, some AI researchers still swear by the classic AI languages Lisp and Prolog. Others use mainstream languages like C++, Java, or Python. Still others like to explore new esoteric programming languages.

I believe there is nothing special about AI that would require special programming languages. What researchers in general want is programming languages that allow rapid prototyping. This is something old AI languages (Lisp, Prolog) and newer “scripting” languages (Perl, Python, Ruby, or recent JVM languages such as Clojure) are great for.

Some researchers want to go beyond prototyping, or they have special requirements (e.g. big data) and need to re-implement their algorithms in compiled or strongly typed languages such as C, C++ or Java once the exploratory programming phase is over and they have a better grip of the problem. Some would say that at that point (when the problem is well-understood), you are no longer dealing with AI.

Coming back to your last question, all the significant developments in new AI languages I am aware of are inspired by constraint-based programming. Some have entered Prolog implementations such as SICStus and SWI, others have spawned Prolog-like languages such as Mercury and Mozart/Oz. Of course there are likely to be significant new developments I am not aware of.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.