AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

General question, just looking at language restraints.
 
 

Is it possible to code the chat-bot in C or C++?  If not, what do I have to use to program this bot with? Thanks.

 

 
  [ # 1 ]

Hi Tyler, welcome to chatbots.org.

The best languages to use are the languages with which you have the most skill. However if you are planning to do more than just dabble, then it is worth learning a more specialized language. There is quite a bit of work done with Java, Perl and Python. Python is particularly well supported with the Natural Language Toolkit, available from http://www.nltk.org, and all these languages have their share of proponents in these forums.

However if you are really serious, you should consider using Common Lisp. All the most advanced artificial intelligence research is still done using this language, and with good reason. It doesn’t suit everybody though, so let me know if you need any help to find out more about this particular language.

For my part I do all my development using a combination of C, Common Lisp and SQL. I was using C++ for a decade or so, but once I started using Common Lisp, C++ started to seem like a terrible waste of time. I still use C for its speed and simplicity, and I use PostgreSQL when there are gigabytes of data to manage.

Hope this helps.

 

 
  [ # 2 ]

Yeah, my comfort area is definitely C and C++, although I do think it might be a good idea to move into some other languages as well. So I’m in school to become a Game Dev and I was just curious, I know that Python is used in the industry but for AI, how often would you say that Lisp is used? And what are the advantages of using Lisp over some other languages? Thanks for the help, I really appreciate it.

 

 
  [ # 3 ]
Tyler Rae - Oct 28, 2010:

Yeah, my comfort area is definitely C and C++, although I do think it might be a good idea to move into some other languages as well. So I’m in school to become a Game Dev and I was just curious, I know that Python is used in the industry but for AI, how often would you say that Lisp is used? And what are the advantages of using Lisp over some other languages? Thanks for the help, I really appreciate it.

First of all, you should make a habit of getting outside your comfort zone on a regular basis or you will cease growing intellectually. From a professional standpoint, I try to learn a completely new technology every year. In recent years I’ve tackled XML, CSS, XSLT and Forth. I doubt that I’d ever want to use Forth again, but the other three technologies are incredibly useful.

I’m not sure what you mean by “industry.” Do you mean the game development industry, or the information technology industry generally? Either way I would say that Lisp doesn’t have a huge market share. It tends to be used in the most complex and demanding projects (e.g. airline ticket reservation systems, real-time banking systems, military command and control and of course artificial intelligence). While I’ve heard Perl described as being “the Swiss army chainsaw” of the internet I’ve similarly heard Common Lisp described as “the tactical nuclear weapons” of software development. There are a lot of situations where you just don’t need nuclear weapons to get the job done.

Anyway, enough whimsy, my own experience is that I can frequently build a useful implementation of a project using Common Lisp in a couple of hours. Having done so, I might find that if I have to rewrite the project using C for performance, scalability, or portability reasons, it might take several weeks of effort to reproduce the functionality of the Common Lisp version. In other words, I use Common Lisp for prototyping and ad hoc programming and resort to lower level programming languages when I need to control what’s going on at the byte level in order to squeeze out every last bit of performance and capacity from my hardware.

To try out Common Lisp for yourself, take a look at the following:

http://www.lispworks.com/—gui programming on Windows
http://www.cliki.net/index—lots of documentation and source code
http://clisp.org/—cli programming on Linux, my favorite

http://www.lisp.org/alu/home—edit: just found this one too

 

 

 
  [ # 4 ]

I’d also say, use what your comfortable with.

 

 
  [ # 5 ]

I was just checking out the website for Google’s Artificial Intelligence challenge and noticed that the leaderboard includes the programming language being used to implement each entry. The thousands of listed entries seem to be pretty evenly distributed between Java, C++, Python and C# and I counted only 26 entries using Lisp.

However the software which is currently winning (and by a considerable margin at that) is implemented using Lisp.

http://www.ai-contest.com/rankings.php

 

 
  [ # 6 ]

Huh, lisp 1? Maybe the rankings have already changed since you looked at them cause I’m seeing a java version as 1 and a C++ one at 3, all close together.
Though of the 3 languages, lisp is the only real self modifying one, I think. Which might explain an advantage, if used correctly.

 

 
  [ # 7 ]
Jan Bogaerts - Oct 30, 2010:

Huh, lisp 1? Maybe the rankings have already changed since you looked at them cause I’m seeing a java version as 1 and a C++ one at 3, all close together. Though of the 3 languages, lisp is the only real self modifying one, I think. Which might explain an advantage, if used correctly.

The leaderboard is being updated in real-time and it has changed since I posted the link to it. I imagine that contest will be hard fought right up until the last minute, much like the Netflix AI contest which was held last year. Mind you, a one million dollar first prize probably had a lot to do with that too.

http://www.netflixprize.com/

Regarding programming languages generally, a very useful website for making comparisons across a wide range of applications can be found at

http://rosettacode.org/wiki/Main_Page

There you can see expertly written code to solve a given problem in many different languages, side by side.

 

 
  [ # 8 ]

Andrew, thanks for answering all these questions!!!!

Tyler, welcome to AI Zone! Why don;t you add a photo to your profile, and a few extra lines of bio with your coding language experience for example, much more personal. As you can see, it’s a habit on Chatbots.org.

 

 
  login or register to react