tags:

views:

819

answers:

7

Do you think VB is a good language for AI? I originally did AI using mainly Lisp and C/C++ when performance was needed, but recently have been doing some VB programming.

VB has the following advantages: 1. Good debugger (essential!) 2. Good inspector (watch facility) 3. Easy syntax (Intellisense comparable to structure editors of late 80's Lisp environments). 4. Easy to integrate with 3rd party software. 5. Compiles to fast code (CLR performance pretty good) 6. Fast development.

By the way, thanks for all the useful replies. I've upvoted everyone who contributed.

+6  A: 

I would suggest you go with C# rather than VB.Net.

You get all the nice features that you discuss but a better (and more familiar) syntax.

Jeremy Petzold
I would suggest you go with F# rather than C#. You get all the nice features that you discuss but a better (and more expressive) syntax.
Juliet
I'm using VB at work right now, so it's easier not to switch gears. The languages seem equivalent because of the underlying CLR
Larry Watanabe
F# is a good one... I didn't even think about it.Regarding using VB because it is what you have going at work.... I still can't agree with that. AI principals are so much easier to express in C# (and certainly F#). VB was created as a business language. it is verbose and its grammar makes it difficult to express certain things in. Since it is obviously a touring complete language, it CAN do AI, but the question is... do you really want to do AI in it? It is kind of like choosing to sink a 12 inch lag bolt with a cresent wrench rather than a pneumatic impact wrench. more work for eqaul result
Jeremy Petzold
@Jeremy Petzold: laughing at "touring complete" - http://www.amazon.co.uk/Bicycle-Touring-Complete-Cycling-resources/dp/1892495279. FYI, it's Turing.
Emtucifor
yeah... I know. I think I was at work when I wrote that and did not bother to check my spelling.
Jeremy Petzold
+5  A: 

Which VB are you talking about here? If you're talking VB.NET then yes, and no.. I would suggest C# or maybe F#.. F# is a functional language and hence is generally better suited for many of the patterns you'll be dealing with when programming AI. The newer versions of C# also have support for language features such as lambda expressions, anonymous delagates et al which may also benefit you!

Miky Dinescu
Yes, VB .NET of course :) I tried the old VB years back, but could never "get it" because it just seemed too weird. VB .NET was a pleasant surprise.
Larry Watanabe
VB.NET also has features such as lambda expressions and anonymous delegates. C# and Visual Basic .NET have almost identical feature sets.
Jim Mischel
@Jim, I never said VB.NET doesn't have lambdas and anonymous delegates but that my recommendation goes to C#, or F#.. That, I certainly don't consider to be reason enough for down-voting. I'm sorry if I offended you in any way by making a statement for C# in the detriment of VB.NET
Miky Dinescu
@Miky: Since those were the only C# features you pointed out in way of recommendation, one can only assume that you were saying that they are the reason for your recommendation. Were you to provide a reason why you think C# is better, I would not have down-voted. And, no, I'm not offended by your making a statement for C# in detriment to VB.NET. I, too, prefer C#.
Jim Mischel
@Jim: I can see the confusion in the way I phrased it. What I really meant to convey was that C# now has features that allow you to implement constructs that are typical of functional languages. Couple that with the previous statement where I said: "I would suggest C# or maybe F#" and it should be apparent that I was only giving my personal opinion on the choice of language..
Miky Dinescu
+1  A: 

1, 2, and 3 are all aspects that any sufficiently advanced IDE has, so that's not much of an issue for most languages. As for 4, 5, and 6: Python fits 4 and 6, but not 5, as it is not very fast, though some implementations of Python do have better speed than others, depending on their configuration. (Just mentioning Python because you tagged your question with the python tag.)

If you do plan on using the .NET Framework, though, might I suggest C#? The syntax is similar to that of C and C++ (about as similar as the Java syntax is), so it'll be more familiar to you, and it does exactly the same things that VB does (and has all the same IDE features, as they both use the Visual Studio IDE, though I suppose you could use an alternative IDE if you wished, as the VB and C# compilers actually come with the .NET Framework itself and not with Visual Studio).

JAB
+4  A: 

When you say AI what do you mean? Its a very broad field. If you're just skimming the basics, like guided search and simple knowledge bases then yea VB .Net may seem beneficial. But the language structure and syntax makes it very inadequate when you start to delve into theorem proving, ILP and other areas of machine learning you'll begin to realize that language like Lisp are still being used today because they provide a more natural syntax for expressing AI concepts.

SpaceghostAli
Actually my main area was ILP :) Steve Muggleton (who coined the term ILP) presented papers at IJCAI 87 on constructive induction.
Larry Watanabe
Have you read Foundations of ILP (Shan-Hwei Nienhuys-Cheng and Ronald de Wolf)? Great read if you're interested. I am of the opinion that the best way to go (from an ILP standpoint at least) is some kind of interop. I have a question on here about c#/Lisp interop.
SpaceghostAli
No, I haven't read that book. My guess is that one author is the advisor and the other is a former Ph.D. student and this is his dissertation :)
Larry Watanabe
+1  A: 

VB has the following advantages: [...]

But then you go on and list stuff that most modern implementations of Common Lisp offer, especially the commercial ones.

Have you tried Common Lisp recently? What parts of VB.NET do you miss when you're programming in CL?

skypher
I've tried several Common lisp dialects - SBCL, CLISP, Lispworks. I miss having standard, reliable frameworks for threading and GUI, and easy to install, trouble-free IDE (slime was a pain in the butt)
Larry Watanabe
I can see what you mean as far as SBCL and CLISP go. But Lispworks and Allegro have quite a newbie-friendly UI and come with concurrency and GUI. Of course YMMV so you might not have found their IDEs that great.Still that wouldn't be a reason for me to work with any Visual .NET development environment instead of Lisp -- unless maybe 90% of your app programming is GUI stuff.
skypher
I think the problem is that I am comparing Open source with a commercial product (VB .NET) which isn't really a fair comparison. I should really give Allegro or Lispworks a try for a valid comparison.
Larry Watanabe
A: 
MAJBUDDIN B.TECH C.S
This post is total nonsense.
Tom W
I'm really torn as to if I should flag this as spam or not.
aaronasterling
+1  A: 

It depends what you mean by "AI".

One common meaning is just "leading edge software technology" (e.g. chess playing is as of 2010 no longer consider to be very much about artificial intelligence, just a set of basic supporting techniques, because it's not leading edge any longer). For the leading edge stuff, the language should be chosen to suit the particular technology. Neither VB (various variants) nor C++ are likely to be good candidates then.

On the other hand, one might take AI to mean literally "artifical intelligence", the attempt to create true AI, even if just at the level of worm or housefly intelligence. Then the main stumbling block, as noted by Scott Fahlman very very long ago (eighties? seventies?), is the ability to perform huge set intersections in huge semantic nets very rapidly, in parallel, e.g. for recognition of that dangerous animal. And since current hardware isn't up that (the clock speed doesn't at all compensate for the von Neumann bottleneck), except conceivably stuff used by NSA and suchlike, it's a fight for sheer computing efficiency, which means that C++ could be a good choice for the lower levels.

Cheers & hth.,

– Alf

Alf P. Steinbach