Ask HN: Best language for general AI programming?

34 points by aphextron ↗ HN
I'm interested in building an AI which can take inputs of world events and financial news and make trading decisions. What language has the best libraries and idiomatic features for this?

22 comments

[ 2.8 ms ] story [ 53.9 ms ] thread
Python has sophisticated ML tools and Neural Net packages, I'm honestly not sure what they are called in Python land, but I see Python on the listings all the time for the top ML libraries. Clojure may also have really great frameworks available by now.
Clojure has Flare[1] and Cortex[2] for machine learning. Clojure is also a great language for data processing.

Python, of course, gives you access to a host of useful libraries for NLP (SpaCy[3], NLTK, Textacy), machine learning (Scikit-learn, PyTorch, Tensorflow), and more general data processing (Pandas) and visualization (Matplotlib, Seaborn).

[1]: https://github.com/aria42/flare/blob/master/README.md [2]: https://github.com/thinktopic/cortex [3]: https://spacy.io/index

Python + Tensorflow. Not only for the software but the community and resources. Hardware tensor units in the latest Nvidia GPUs can reduce computing time substantially.
Without a doubt python. I have been doing Machine Learning and Neural Network Programming for over a year now. Availability of good libraries such as scikit-learn and tensorflow along with the easiness of python makes python the go-to language for AI programming in my opinion.
I guess that AIML ( Artificial Intelligence Markup Language ) is the first option when it comes to AI.

This article might help - https://en.wikipedia.org/wiki/List_of_programming_languages_...

AIML is somewhat misnamed and really has little or no applicability w/r/t what the OP is asking for. If you're building a chatbot / conversational dialogue system, then sure, use AIML. That's really all it's meant for.
Python, hands down. By far the best tools, community, documentation etc. Although if you are looking for something 'high frequency' you will need to implement the stuff on the critical fast path in something faster.

PS. What you want to do is called Machine Learning, not AI

It is AI. ML is a subfield of AI, so in the bigger scale it's AI.
AI is a completely over-hyped word.

The guy is trying to digest some pre-defined input (world events / financial news), and predict some output (trading decisions).

That's pretty far from AI in my book.

I agree with your point, but ML is even more over-hyped word IMO.
Python has the libraries you're looking for: numpy, scikit-learn, Keras, TensorFlow, etc.

But because everyone else is going to tell you to use Python, I'll say that R and MATLAB/Octave are both acceptable for prototyping algorithms.

You can't really go wrong with Python, Java (or any JVM language), R, Octave, or probably even C++. Prolog might have some appeal if you already know the language.

If you're really curious as to what languages are being used in this area - and how - one good source is here:

http://mloss.org/software/language/

Personally, I'm a fan of Java and DL4J, Jenetics, SAMOA, Mahout, COLT, OpenNLP, CoreNLP, UIMA, Jena, SparkML and the like. But I'm biased since my background in primarily Java. I've also been doing a lot of Python and R, and some Octave, lately and all of those are nice in their own ways as well.

The syntax of R is a bit, erm, "quirky" in some ways compared to a lot of other languages, but it may have the best support of any language in terms of libraries for cutting-edge statistical techniques (this is because statisticians heavily use R and the first versions of new techniques are usually written in R).

Python for all the reasons people have mentioned here.

Tangential, but does anyone know of a playground environment where you can code (ro)bots in Python? I'm thinking of the old Robocode challenges, which were Java based, where you could write some logic and it would enter your bot in a tournament. Would be fun to do some game AI with Python like that.

Wow, nobody suggested scheme or lisp. These used to be traditional choices for general purpose AI programming. Why did these languages fall out of favor?
Lisp family languages, IIRC, were traditional choices for “AI” when “AI” largely meant expert systems / production rules systems. But, AFAIK, while s-expression like formats remain traditional for rules expressions in such systems, the implementation languages even for those (which usually aren't called “AI” today) are often in other languages.