开发者

Artificial Intelligence Project - What language should I go for? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 6 years ago.

Improve this question

I am a computer science student and I am going to work on an artificial intelligence project which will compose a musical tune according to the genre and mood inputs. Are the algorithms to be us开发者_Go百科ed for this project likely to be very resource-consuming? Would it make any difference (in terms of speed) if I choose to go with Java rather than C++? (Note : I know only these two languages and I am more comfortable with Java than C++.)

NB : Sorry for my poor English. If someone can, please clean up this post wherever necessary. Thanks.


Go with Java since you are more comfortable with it. That will allow you to concentrate on solving the problem, not the programming. Maybe C++ would end with a faster program, maybe not, but getting there will be slower and you don't categorically state that the program must be blazingly fast.


The resource consumption is way more influenced by the algorithmic approach than the language chosen. If you are comfortable with Java, program your application in that language - even though a C++ implementation might be 10% faster.

That being said, you might be interested with Artificial Intelligence API's for Java.


In my mind, the language mostly associated with AI is Lisp.

See the answers to Why is Lisp used for AI? - top voted mentions this was the case in the 60s and 70s, but these days dynamic languages are used (ruby, python and such).


It looks to me like you're at the proof-of-concept stage of your project. I'd use whatever language your most comfortable with. Well written Java code will run a lot faster then poorly written C.


I would use Common Lisp for a project like this. If you don't know Lisp, I would learn it for this type of project. It would be a great learning experience and since you are a CS student, it will only help you. Lisp is a language that can be a real eye opener.


I did a similar AI project a couple of years ago. I don't know what solution you will be implementing, but AI programs can generally be both resource consuming and may take a long time to run, but on the other hand, you'll need a language you're familiar with to get it done in time.

Therefore, my advice is that if you feel you know C++ (or C), go with one of them. If you don't know them, then consider carefully the time you will need to invest in learning a new language before choosing.


If you're starting from scratch, use whatever you know best. If you want to use established libraries to speed up development, you might want to investigate that first - but Java is certain to have some.

In your shoes, I'd pick Java for sure.


I'd go with Clojure for the following reasons:

  • It's a Lisp, and Lisps are great languages for AI development (partly historical, but also for some real concrete reasons - see this thread and this thread)
  • Clojure runs on the JVM and has great Java interop, so you can exploit all the great Java AI libraries (e.g. Weka) plus you already have some experience of the Java environment
  • JVMs have excellent optimizing JIT compilers nowadays, for all practical purposes you will get performance as fast as C/C++ for this kind of application.


My advice is design everything you need first, every ADT, every algorithm class, hierarchy, everything. This kind of project/programming could be really hard to design in C/C++ family of languages, maybe you could choose other language with less string typed philosophy. So i encourage you with using a language designed for this kind of problem, better suited to your application, functional paradigm ex: LISP, logical paradigm ex: PROLOG or something like that.


My 3rd year dissertation project was an implementation of heuristics for cellular network radio frequency allocation. I chose Java over C++ because it allowed me to visualize the results much easier than if I'd used C++. I don't believe the performance would have been significantly different in C++ - the complexity factor of your algos is going to be the biggest factor probably.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜